n8n HTTP Request Node: Call Any API Without a Connector
The n8n HTTP Request node in depth: auth with credentials, pagination, batching, retries, rate limits, binary data and importing cURL to call any API.
Executive Summary: The n8n HTTP Request node is the reason a missing connector rarely blocks you. It can call any REST API with stored credentials, follow pagination, batch requests, retry failures and handle files. The hard part is not making the first call; it is making the thousandth call behave under rate limits, partial failures and changing APIs. I cover authentication, pagination, batching, error handling and binary data, using my social media publishing pipelines as the running example.
Social media APIs change faster than any connector library can keep up. A platform adds a field, deprecates an endpoint or tightens a rate limit, and the prebuilt node lags behind for weeks. That is why my social media pipelines lean on the n8n HTTP Request node rather than waiting for a dedicated integration.
The pattern behind those pipelines is simple. A workflow prepares a post, calls the platform’s API, checks the response and sends a Telegram notification with the result. Every step except the notification is an HTTP call, so getting the HTTP layer right decides whether the whole thing is trustworthy.
This guide is about that layer. It assumes you know how items flow between nodes; if not, read how the n8n execution model works first, because the HTTP node runs once per item like most nodes.
Why the n8n HTTP Request Node Matters
n8n ships hundreds of built-in integrations, yet no catalogue covers every API, every endpoint or every internal service. The n8n HTTP Request node closes that gap. If a service has an HTTP API, you can call it.
It is also often the better choice even when a connector exists. A dedicated node exposes the operations its authors chose. The HTTP node exposes the whole API, including new endpoints the connector does not support yet. On the other hand, connectors handle authentication quirks and pagination for you, so prefer them for simple, stable operations.
Start with Import cURL
Most API documentation includes cURL examples. The HTTP node can import them directly: open the node, choose Import cURL and paste the command. n8n fills in the method, URL, headers, query parameters and body.
This saves time and avoids typos, but review the result before you publish. Imported commands often contain a real token in a header. Move that token into a credential immediately, then delete it from the node, or it will live forever in your workflow JSON and in every export.
Authentication Done Properly
The n8n HTTP Request node offers two routes for authentication, and choosing the right one keeps secrets out of workflows.
- Predefined credential type. If n8n already supports the service, you can reuse its credential, including OAuth2 token refresh, in the HTTP node. This is the easiest and safest option.
- Generic credentials. For other APIs, use Basic auth, Header auth, OAuth1, OAuth2 or a custom auth credential. The token lives in n8n’s encrypted credential store, not in the node.
Never paste API keys into headers or expressions. Credentials are encrypted at rest, can be shared with specific users and can be rotated in one place. Hard-coded keys spread through exports, screenshots and Git history. If OAuth flows are new to your team, my guide to OAuth 2.0 and OIDC for backend engineers explains the token types the credential handles for you.
Pagination Without a Loop
Many APIs return results in pages. Before n8n added built-in pagination, people built loops with IF nodes and counters. Now the n8n HTTP Request node handles it through the Pagination option.
There are two modes. “Update a Parameter in Each Request” changes a query parameter, header or body field on every call, typically a page number or cursor. “Response Contains Next URL” follows a link that the API returns. Both modes can use the special variables $pageCount, $request and $response.
Here is a page-number setup that I tested against GitHub’s public releases API. It fetches up to three pages of five releases each, waits half a second between calls, and stops early if a page comes back empty:
{
"name": "GitHub releases",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [220, 0],
"parameters": {
"url": "https://api.github.com/repos/n8n-io/n8n/releases",
"sendQuery": true,
"queryParameters": {
"parameters": [{ "name": "per_page", "value": "5" }]
},
"options": {
"pagination": {
"pagination": {
"parameters": {
"parameters": [
{ "type": "qs", "name": "page", "value": "={{ $pageCount + 1 }}" }
]
},
"paginationCompleteWhen": "responseIsEmpty",
"limitPagesFetched": true,
"maxRequests": 3,
"requestInterval": 500
}
}
}
}
}
Always set a page limit, at least while building. An API that never returns an empty page, or a completion rule that never matches, will otherwise loop until something breaks. The HTTP Request node documentation lists every pagination option and its variables.
Batching and Rate Limits
Because the HTTP node runs once per item, 500 input items mean 500 requests. Fired as fast as possible, that is a good way to hit a rate limit or get an API key suspended.
The Batching option controls this. Set Items per Batch and a Batch Interval in milliseconds, and n8n spaces the requests out. For a publishing pipeline that posts a handful of items, this rarely matters. For a backfill that touches thousands of records, it is essential.
Rate limits still happen, so plan for HTTP 429 responses. Enable Retry On Fail in the node settings with a sensible wait between tries. For APIs that return a Retry-After header, turn on Include Response Headers and Status, read the header and use a Wait node to pause for exactly that long. The retry and backoff advice in my post on calling the OpenAI API with retries applies to any rate-limited API, not just model providers.
Handling Errors as Data
By default, the n8n HTTP Request node treats any non-2xx response as a failure and stops the workflow. That is safe, but it hides useful information. A 404 for a deleted post and a 500 from an overloaded server need different handling.
Two options change this behaviour. Never Error makes the node succeed regardless of status code, and Include Response Headers and Status adds the status code and headers to the output. Combined, they let a Switch node route responses by status:
| Status | Meaning | Typical route |
|---|---|---|
| 2xx | Success | Continue, record the result |
| 400, 422 | Bad request or validation error | Alert the owner; do not retry |
| 401, 403 | Auth problem | Alert immediately; credentials may have expired |
| 404 | Resource missing | Log and skip, or mark the record |
| 429 | Rate limited | Wait, then retry |
| 5xx | Server error | Retry with backoff, then alert |
Alternatively, set the node’s On Error setting to use the error output, which sends failed items down a separate branch. Either way, the principle is the same: a failed HTTP call should become a decision, not a dead end.
In my social media pipelines, this is where the Telegram notification earns its place. Success and failure both send a message, but the failure message includes the status code and the platform’s error text. That small detail turns “the post did not go out” into “the token expired” within seconds.
A Worked Example: The Publishing Call
To make this concrete, here is how the publishing step in a social media pipeline fits together. The shape is the same whichever platform you post to, so I describe it in general terms.
- Prepare. An Edit Fields node builds the request body: text, link and media references. Keeping this in one node makes the payload easy to inspect in every execution.
- Upload media first. Many platforms need media uploaded in a separate call that returns an ID. One HTTP node uploads the binary file, and the next one creates the post with that ID.
- Publish. The second HTTP node sends the post with a predefined or generic credential, Never Error turned on and response headers included.
- Route. A Switch node reads the status code and splits success, retryable failures and permanent failures.
- Notify. Each branch ends in a Telegram message. Success includes the post URL. Failure includes the status code and the error text from the API.
Two refinements make this version production grade. First, the workflow stores the platform’s post ID once publishing succeeds, so a rerun can detect that the post already exists instead of posting twice. Second, retryable failures go to a Wait node and loop back a limited number of times before they escalate. In other words, the pipeline handles the boring failures itself and only interrupts a human for the interesting ones.
Pagination shows up in the same pipelines on the reading side. Fetching recent posts or comments to avoid duplicates usually means paging through an API, and the rules differ by provider. GitHub, for example, documents both page numbers and Link headers in its REST pagination guide. Read the provider’s rules before you choose a pagination mode.
Files, Timeouts and Other Production Details
A few settings matter once real traffic arrives.
- Binary data. To upload images or video, send a binary property as form data or as the raw body. To download files, set the response format to File. Large files are stored according to your binary data mode rather than in memory.
- Timeouts. Set an explicit Timeout. A slow API without a timeout can hold an execution open far longer than you expect.
- Proxies. Use the Proxy option, or the standard proxy environment variables, when calls must leave through a corporate egress.
- SSL. Leave Ignore SSL Issues off in production. Turning it on to “make it work” disables a protection you will want later.
When the HTTP Node Is the Wrong Tool
The n8n HTTP Request node is flexible, but it is not always the best fit. Use a dedicated node when one exists and covers your operation, since it will handle auth and pagination details for you. Write a small service when the API needs complex request signing, streaming or stateful sessions that are awkward to express in node settings.
Also be careful with internal network access on self-hosted instances. An HTTP node that accepts a URL from user input can reach internal services. Validate destinations, or restrict them with your network rules, before any workflow lets outside input decide where requests go.
Frequently Asked Questions
How do I paginate in the n8n HTTP Request node?
Open Options, add Pagination and choose either “Update a Parameter in Each Request” or “Response Contains Next URL”. Use $pageCount or $response in expressions, and set a maximum number of pages.
Can I use existing n8n credentials in the HTTP Request node?
Yes. Choose Predefined Credential Type and select the service. The node then reuses that credential, including OAuth2 token refresh.
How do I stop the HTTP node from failing on 404?
Turn on Never Error and Include Response Headers and Status, then route by status code. Or set On Error to use the error output branch.
Make the Thousandth Call Boring
Anyone can make the n8n HTTP Request node work once. The goal is to make it boring at scale: credentials in the store, pagination with limits, batching that respects the API and every status code mapped to a decision. My social media pipelines became reliable not when the first post went out, but when a failed post started telling me exactly why.
Last updated on 29 November 2026