Nodes/ComfyUI Web Viewer/JSON URL Loader @ vrch.ai
ComfyUI Node

JSON URL Loader @ vrch.ai

Pulling live JSON into your ComfyUI graph

By VrchStudio·Created 2 years ago·Updated 18 days ago· 356
JSON URL Loader @ vrch.ai
    • JSON
    url
    print_to_consolefalse

    Most of the ComfyUI Web Viewer pack is about streaming input from browsers and controllers into your workflow in real time. This node is the quiet one: it fetches a JSON document from a URL and hands it to your graph as a JSON object. Nothing fancy, but once you realize you can pull live data in on every queue, you'll find uses for it everywhere.

    What it does

    You give it one thing - a url (any http or https address that returns JSON) - and it outputs JSON. There's a single optional toggle, print_to_console, that dumps whatever came back into your terminal. That's the whole node. It isn't an output node, meaning it's a source: wire its JSON output into anything that eats JSON further down the line, whether that's a text node, a logic node, or your own custom parsing.

    The name is a lie in the best way: it calls no API, needs no key, and does no schema checking. It fetches, parses, and outputs. Where people get burned is forgetting that the fetch happens on the ComfyUI server's side, not your browser's. If your ComfyUI runs on a remote box, a http://localhost:... URL that works fine in your browser will fail here - the URL has to be reachable from whatever machine is running the workflow.

    Why you'd reach for it

    The obvious use is pulling live data into a generation: a scheduler feed, an API endpoint your other code writes to, a config blob you tweak without reopening the workflow. Because it re-fetches every time the queue runs, the JSON is fresh on each run - no stale cached values sneaking into your prompt logic. It's the boring kind of useful, but it slots neatly into the pack's "text nodes" family and pairs well with the logic and text nodes the README documents.

    Installing it

    It ships with the whole pack, so install once and every node in this article set comes along:

    cd ComfyUI/custom_nodes
    git clone https://github.com/VrchStudio/comfyui-web-viewer
    pip install -r comfyui-web-viewer/requirements.txt
    

    Or skip the terminal entirely and search ComfyUI Web Viewer in ComfyUI Manager. Either way, restart ComfyUI afterward. No models to download - the only optional extra in the pack is the Music2Emotion submodule, and that's just for the emotion-detector node, not this one.

    Troubleshooting

    If your JSON output is empty, flip print_to_console on first. That tells you whether the fetch failed, the URL returned an error page, or the content wasn't valid JSON. If it's a CORS error in a browser viewer, that's a different problem - the pack's own docs walk you through --enable-cors-header for that - but for this node, plain server-side fetching sidesteps CORS entirely. You do still need the URL to return proper JSON; a 404 page or an HTML error will just fail to parse.

    Categoryvrch.ai/text

    Inputs (2)

    NameTypeDefaultDescription
    urlSTRING
    print_to_consoleoptBOOLEANfalse

    Outputs (1)

    NameTypeDescription
    JSONJSON