HTTP GET
Fetch a URL via HTTP GET and return the response body, status code, and content type. If the body is a JSON object, each top-level field is exposed as a separate step output so downstream steps can reference {{fetch.fieldName}} directly.
Tool ID
http-get
Credential Required
No.
Input Properties
| Property | Type | Default | Description |
|---|---|---|---|
url |
string | — | Required. Full URL to fetch. Must start with http:// or https://. |
authToken |
string | "" |
Optional bearer token. Sent as Authorization: Bearer <token>. Leave blank for no auth. |
headers |
string | "" |
Optional extra request headers as newline-separated Name: Value pairs, e.g. Accept: text/xml\nX-API-Key: abc123. |
timeoutSeconds |
string | "30" |
Request timeout in seconds. Step-level timeout is 60s. |
Published Outputs
| Output | Type | Description |
|---|---|---|
status |
string | HTTP status code ("200", "404", etc.). "0" on transport failure. |
body |
string | Response body as UTF-8 text. Capped at 5 MB. |
contentType |
string | The Content-Type response header. |
isJson |
string | "true" if the body parsed as JSON, "false" otherwise. |
truncated |
string | "true" if body was capped at 5 MB. Only present when truncated. |
error |
string | Transport error message. Only present on transport failure. |
| JSON top-level fields | string | When isJson=true and the body is a JSON object, each top-level field is exposed as a string-valued output. Nested objects/arrays are JSON-stringified. |
Behavior
- 2xx / 3xx / 4xx / 5xx responses all return normally with
statusset to the HTTP code. The step does NOT fail on 4xx/5xx — downstream logic can branch on the status. - Transport failures (DNS, connection refused, timeout) cause the step to FAIL. The caller sees the task marked failed.
- Redirects are followed automatically (urllib default).
- Body cap: 5 MB. Larger responses are truncated and
truncated="true"is set.
Example 1 — Fetch a JSON API
Input:
tool: http-get
properties:
url: "https://jsonplaceholder.typicode.com/posts/1"
Output (actual captured run):
status: 200
contentType: application/json; charset=utf-8
isJson: true
userId: 1
id: 1
title: sunt aut facere repellat provident occaecati excepturi optio reprehenderit
body: {
"userId": 1,
"id": 1,
"title": "sunt aut facere repellat provident occaecati excepturi optio reprehenderit",
"body": "quia et suscipit..."
}
Downstream steps can reference {{fetch.title}} or {{fetch.userId}} directly without JSONPath.
Example 2 — Bearer auth
tool: http-get
properties:
url: "https://api.example.com/me"
authToken: "{{input.apiToken}}"
The tool sends Authorization: Bearer <token>. For other auth styles (basic, custom header), use the headers field.
Example 3 — Custom headers
tool: http-get
properties:
url: "https://api.example.com/data"
headers: |
Accept: application/xml
X-API-Key: {{input.apiKey}}
X-Request-ID: {{workflow.id}}
Each line of headers is Name: Value. Variable references work inside.
Example 4 — Handle a 404 gracefully
- name: fetch
tool: http-get
properties:
url: "https://api.example.com/items/42"
- name: branch
tool: condition
condition: "{{fetch.status}} == 200"
thenSteps: [...]
elseSteps: [...]
Because a 404 returns normally (doesn't fail the step), you can check status and branch.
Chaining Patterns
- http-get → email — fetch a status page, email if down
- http-get → condition → slack — check an API, alert if degraded
- http-get → dataframe — pull JSON data, transform, filter
- http-get + runtime-env (Python/jq) — fetch + process complex responses
- http-get → website-change — snapshot a raw API response, detect changes
Limitations
- GET only. For POST, PUT, DELETE use the raw
httpstep type inside a YAML job — those are one-offs and don't merit a dedicated tool wrapper. - Body capped at 5 MB — for larger downloads, use
runtime-envwithcurlorwget. - Request body is not supported. GET requests shouldn't have one.
- No automatic retries on transient failures. Wrap the step with the job-level retry config if you need it.