---
title: HTTP Request
description: Makes a HTTP request and returns the response data
---

*Formerly **Http Request**. The step was renamed in AWFlow 0.9; searching for the old name still finds it.*

Call any web address or API and use the response in the next steps.

Optional: pick a saved connection in the **Authentication** field when the service needs one.

## What it does

HTTP Request sends a request (GET, POST, PUT, DELETE, PATCH, OPTIONS or HEAD) to **URL**, with the headers, query parameters and body you set, and returns what the server sends back.

* **Authentication** takes a saved [connection](/app/connections/): a bearer token, basic auth, or an **API key** sent in a header or in the query. The key stays out of the workflow. A connection locked to its **Allowed sites** is never sent anywhere else, not even after a redirect.
* **Query Params** are added to the URL for you, merged with any query already in it.
* **Body** is sent as JSON, as a URL-encoded form or as multipart form data, depending on **Body Content Type**.
* Redirects are followed by the browser (up to **Max redirects**, 5 by default) unless you turn **Follow redirects** off; the final address is checked again before the response is used.
* There is no time limit unless you set **Timeout**.
* The response is read as JSON, text or a file. **Response format** set to *Autodetect* (or left empty) decides from the server's content type; *File* returns the body as a file under `$binary.data`.

### What the step returns

New HTTP Request steps (version 2) choose under **Return**:

* **One item per entry when the response is a list** (default): a JSON list becomes one item per entry, so the next steps work on each entry. An object or a text stays one item; an empty list gives no items.
* **One item per entry of a list inside the response**: set **Path to items**, for example `data.items`.
* **The whole response as one item**: `{ data }`, as older steps did.

Steps saved before AWFlow 0.9 keep returning `{ data }`. **Update** in the step's header switches them to version 2 while keeping *The whole response as one item*; if the last output was a list, the step suggests **Split into items**.

### Raw JSON body

Under **Body**, **Write the body as** offers **Fields** (one row per field, the default) or **Raw JSON**: the whole body as JSON text, sent with `Content-Type: application/json`. `{{ }}` works inside and is filled in JSON-aware: a mapped text lands quoted and escaped (a quote or a line break can't break the JSON), numbers stay numbers. Text that isn't valid JSON fails the step with a plain message.

### Paste cURL

**Paste cURL** in the step's header turns a `curl` command (copied from API docs or the browser's network tools, bash or Windows style) into the step's settings: method, URL, query, headers and body. A token, password or API key in the command becomes **one connection draft**, never a value in the step; save it and it is picked in the step. Unsupported options are listed as warnings.

### Fetch every page

**Options › Pagination** fetches more pages with the same setup:

* **Find the next page in**: a next link (in the `Link` header or a field of the body), a page or offset number you add to the query or the body (**Parameter**, **Start at**, **Add each time**), or a cursor (**Field with the next cursor**).
* **Stop when**: there is no next page, the list is empty, a **Status codes that stop** answer comes, or a **Stop expression** is true.
* **Return**: one item per entry from every page (default), one item per page, or everything in one item. **Path to the list** says where the entries are.
* **Max pages** is 10 by default (at most 100); **Wait between pages** slows it down. When the limit cuts it short, a hint and the run log say so.

Under the settings, a line says what it will do: *Will fetch up to 10 pages. Stops sooner when there's no next link.* For page numbers it spells out the values it sends (*offset = 0, 100, 200 … 900*); for a cursor, what keeps it going. After a run it adds how many entries each page had (*Up to 10 pages, about 1,000 items (the last run got 100 per page)*). When a run stops at **Max pages** while more pages exist, the **Output** shows an amber note (*Stopped at 10 pages, the limit*) with **Raise to 25**, and the **Last run** bar says *more exist*, with **Raise**.

### Errors as data

By default a 4xx or 5xx answer fails the step, and the error shows the status, the status text and the start of the body. Turn on **Options › Response › Never error** to get the whole answer instead (`status`, `statusText`, `headers`, `url`, `data`) and decide yourself with an [If](/nodes/builtin/flow/if/). Network errors and timeouts still fail. With **Try again automatically**, a 429 or 503 with `Retry-After` is waited out (up to 5 minutes).

A file response (an image, a PDF, a download) arrives as binary data under the `data` key, ready for file uploads such as Slack **File → Upload**, Google Drive **File → Create** or Gmail attachments.

### Send an idempotency key

Some services (payments such as Stripe, Adyen or PayPal) can ignore a request they already received, if it carries the same idempotency key. That way a retry never charges twice. In the step's **Advanced** tab, turn on **Send an idempotency key**. It is off by default, and nothing is sent until you turn it on.

* **Header name**: `Idempotency-Key` by default, which most services use. Change it if your service expects another header. The key replaces a header of the same name that you set on the step.
* **Value sent**: one key per run, step and item (shown as `run_… · Charge card · item 1`). It stays the same when the step tries again (**Try again automatically**) and when a paused run continues. A new run gets a new key.
* With [pagination](#fetch-every-page), only the first page's request carries the key. The later pages go without it.

When a retry sends the request again, the run log says *Item 1: sent again with the same idempotency key.*

## When to use it

* Call an API that has no dedicated node.
* Download a file or a JSON feed.
* Send data to a webhook (Zapier, Make, your own server).

For apps that have their own node, such as [Slack](/nodes/builtin/integration/slack/) or [Notion](/nodes/builtin/integration/notion/), that node is easier. To read a web page as text, [Get All Text from Link](/nodes/builtin/core/getalltextfromlink/) is simpler.

## Inputs and settings

**Pagination** changes shape with its **How pages work** choice:

## Outputs

With **The whole response as one item**, the item is `{ data }`, the response body. Turn on **Include response header and status** to also get `status`, `statusText`, `headers` and the final `url` after redirects.

## Dependencies and credentials

* **Authentication** (connection): optional. See [Create a connection](/app/connections/).

Choose a connection of the kind your API expects: bearer token, basic auth (an empty password works, for keys like Stripe's), or an API key in a header or the query. The field lists every non-sign-in connection with its kind and sites. See [Add a connection](/app/connections/create/).

## Example workflow

1. A [Context Menu](/nodes/builtin/trigger/contextmenu/) trigger on a link.
2. HTTP Request, **POST** to your webhook URL, **Body Content Type** `application/json`, with a body field `url` = `{{ $input.linkUrl }}`.
3. [Browser Notification](/nodes/extension/browsernotification/): "Sent".

## Common issues

* **"Response status: 401" or "403".** The credential is missing, wrong or lacks permission. Check the **Authentication** field and the key's rights.
* **"Response status: 404".** Check the URL and the query parameters.
* **"URL validation failed".** The URL is malformed or not allowed. Use a full `https://` address.
* **"Redirect blocked: …"**. The request was redirected to an address that isn't allowed (or, with a connection locked to its sites, to another site).
* **Redirects off**: with **Follow redirects** off (or **Max redirects** 0), a redirect fails with a clear message.
* **It works in the extension but fails in the web app.** Some sites refuse requests sent from another website (a browser rule called CORS). Run the workflow from the extension.
* **The request times out.** Set or raise **Options › Timeout**. Without one, the request waits as long as the server does.
* **"Response is not valid JSON"**. The server said JSON but sent something else; set **Response format** to *Text* to see it.
* **The next step runs once per entry when you expected one item.** The step splits lists (version 2). Choose **The whole response as one item** under **Return**.

## Related nodes

* [Poll Until](/nodes/builtin/flow/polluntil/): call a URL repeatedly until it reports done.
* [HTML Extract](/nodes/builtin/datatransformation/html-extract/): pull values out of an HTML response.
* [JSON](/nodes/builtin/datatransformation/json/): reshape a JSON response.
* [HTTP Request Tool](/nodes/builtin/ai/aidependencies/tools/http-request/): let an AI agent make requests.