ComfyUI Node

Runware Get

Pull one field out of a JSON firehose

By Runware·Created 2 years ago·Updated about a month ago· 140
Runware Get
    • value
    result_json
    path

    Runware Get is the tiny utility that makes the pack's escape hatches usable. When a node hands you raw JSON - which is exactly what Runware (custom) returns - you don't want to read the whole blob and hand-copy a URL. This node walks into that JSON by a dot-path and pulls out one value. It's boring, it's obvious, and it's the difference between the custom node being a curiosity and being a real tool.

    It pairs with the custom node like a socket and a plug. Custom node fires an untyped request, returns result_json; Get walks 0.imageURL and hands you the URL as a plain STRING; you feed that to Runware Load Image or any URL-based loader and you're back in familiar IMAGE territory. Once you've used that chain, you understand why the pack ships both.

    What you set

    • result_json (required) - the response JSON, wired from the custom node (or any node that emits JSON as a string).
    • path - the dot-path into the response, e.g. 0.imageURL, 0.videoURL, or 0.outputs.files.0.url. Numeric segments index into lists, so the leading 0 picks the first task in the result array. Leave it empty and it just grabs the first URL it finds anywhere - the common single-output case.

    Output is value, a STRING.

    How it works

    The node parses the JSON and walks your path segment by segment, indexing lists when it hits a number and keys when it hits text. Empty path falls back to a depth-first search for the first http(s) or data: string, which is why the empty-path default "just works" for most single-result calls. If the walk fails or the field is missing, you get an empty string back - no crash, just nothing, which is your cue to check the path. Non-string values (a nested object, a number) come back JSON-encoded so you don't lose data.

    Installing

    ComfyUI Manager → search Runware → install → restart. Manual:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Runware/ComfyUI-Runware
    pip install -r ComfyUI-Runware/requirements.txt
    

    No model downloads, no heavy dependencies - the pack needs runware-sdk, pillow, and soundfile. One thing to note: this node itself never touches the API, so it works even while your key situation is unresolved; the key matters for the nodes that actually send requests.

    Troubleshooting

    The classic failure is an empty value with a confident-looking path. Always peek at the raw result_json with a Show Text node first - Runware responses nest in ways that surprise (outputs.files arrays are the usual culprit). Copy the exact key spelling; JSON keys are case-sensitive and imageURL is not image_url. If you're chaining multiple extractions, either call Get once per field or grab the enclosing object with one path and parse it downstream.

    CategoryRunware/Params

    Inputs (2)

    NameTypeDefaultDescription
    result_jsonSTRING
    pathoptSTRINGDot-path into the response, e.g. 0.imageURL or 0.outputs.files.0.url. Empty = first URL found.

    Outputs (1)

    NameTypeDescription
    valueSTRING