๐ŸŒWeb Fetcher Block

Advanced/Experimental Contact us or join Discord to report issues

The WebFetcher block can be used to make GET and POST requests to HTTP endpoints

This is useful for both fetching data (via GET) and sending data, usually JSON, to various APIs endpoints (via POST).

POSTing JSON data

You can build a JSON payload inside the body field that re-uses {variables} from other blocks, allowing you to dynamically construct payloads based on user inputs or image or text blocks.

Selecting specific fields using JSON Path

You can use a simple jq-style dot-notation syntax like ".name" to fetch a specific field from a JSON response. e.g. given a GET of the following JSON response:

{
  "data": {
    "id": "asfasdfasdf",
    "description": "I am the walrus"
  }
}

You would use the selector data.description in the WebFetcher in order to fetch "I am the walrus"

Alternately, we sometimes build simple vals for doing more complex data processing. See below.

Building simple APIs to use with WebFetcher

We often use code platforms like Val.town or Replit to build and work with simple APIs from glifs. Here's a few examples

Last updated