🥞
Glif Docs/Guide
  • Getting Started
    • 👋What is Glif?
    • 💡What can I do with a glif?
      • 🏃Run a glif
      • 🔌Build a glif
      • 🔀Remix a glif
      • 🗣️Comment on a glif
      • 🔳Embed a glif
    • ⚒️How do I build a glif?
      • 📽️Video tutorial: Building a simple image generator
      • 🟰Using variables
    • ⚙️Profile Settings
    • 🪙Credits and Payments
    • ❓FAQs
  • Blocks
    • 🙋Inputs
      • ✍️Text Input Block
      • 🖼️Image Input Block
      • 📋Multipick Block
    • 🪄Generators
      • 📃Text Block
      • 🖼️Image Block
      • ➡️Image to Text Block
        • Florence2Sam2Segmenter
    • 🧰Tools
      • 🔀Text Combiner Block
      • 🔬JSON Extractor Block
    • 💅Styling
      • 🎨HTML Block
      • 🖼️Canvas Block
    • 🧑‍🔬Advanced/Experimental
      • 🎙️Audio Input Block
      • ↔️Glif Block
      • 🌐Web Fetcher Block
      • 🔊Audio Spell
      • 🧱ComfyUI Block
      • 📡Audio to Text Block
      • 🎥Video Input Block
      • 🔧JSON Repair Block
  • Apps
    • 🎨Glif It! Browser Extension
  • Glif University
    • 🎥Video Tutorials
      • 🐲How To: D&D Character Sheet Generator
      • 🧠How To: Expanding Brain Meme Generator
      • 🦑How To: Occult Memelord Generator
      • 🥸How To: InstantID Portrait Restyle Glif
      • 🕺How To: Style and Pose a Character with InstantID + Controlnet
      • 😱How To: Create a Simple Cartoon Portrait Animation Glif (LivePortrait + Custom Blocks)
      • 👗How to Create a Clothing Restyler App (IP Adapter, ControlNet + GPT Vision)
      • 🤡How to Create a 4+ Panel Storyboard/Comic (Flux Schnell)
      • 🎂How to Create a Recipe Generator with Accompanying Pictures
      • How to Use JasperAI Depth Controlnet on Flux Dev
      • 🦸‍♂️How to Make a Consistent Comic Panel Generator
    • 🧑‍🏫Prompt Engineering 101
    • 🖼️ControlNet
    • 📚AI Glossary
  • API - for Developers
    • ⚡Running glifs via the API
    • 🤖Using AI Assistants to build with the Glif API
    • 📙Reading & writing data via the API
    • 🗾Glif Graph JSON Schema
    • 📫Embed player & custom webpages
    • 📫Sample code
    • ❓What can I make with the Glif API?
      • Browser Extensions
      • Discord Bots
      • Games
      • Social Media Bots
      • Experimental Projects
  • Policies
    • 👨‍👩‍👧‍👦Community Guidelines
  • Programs
    • 🖼️Loradex Trainer Program
  • Community Resources
    • 🧑‍🤝‍🧑Resources Created by Glif Community Members
  • Contact Us
    • 📣Send us your feedback
    • 🚔Information for law enforcement
Powered by GitBook
On this page
  • POSTing JSON data
  • Selecting specific fields using JSON Path
  • Building simple APIs to use with WebFetcher
  1. Blocks
  2. Advanced/Experimental

Web Fetcher Block

PreviousGlif BlockNextAudio Spell

Last updated 11 months ago

Advanced/Experimental or 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 or to build and work with simple APIs from glifs. Here's a few examples

Val to get current weather in a location:

Val to fetch the image URL for a given Ethereum NFT

Val for storing & fetching data (demonstrates GET + POST in one val + use of Valtown's blob storage for persistence):

🧑‍🔬
🌐
Val.town
Replit
https://www.val.town/v/jamiedubs/weatherLivestream
https://www.val.town/v/jamiedubs/nftImage
https://www.val.town/v/jamiedubs/databin
Contact us
join Discord