Sparround

HTTP Request: connecting to any API

HTTP Request is n8n's most important node. The ready-made nodes cover thousands of services, but when the one you need has no node — or the node does not support the operation you need — this is how you reach any REST API.

The parameters are familiar: method (GET, POST, PUT, PATCH, DELETE), URL, query parameters, headers and body.

The body has several formats: JSON, Form-Data, Form URLencoded, Raw and n8n Binary File — the last for uploading a file.

The fastest way to start: cURL import. Copy a curl command from the API docs or Postman and import it into the node — n8n fills in every parameter for you.

OptionWhat it doesWhen you need it
Predefined Credential TypeUses the ready-made credential type of a service n8n knowsThe service has a node but not the operation you need — this is n8n's recommended route
Generic Credential TypeGeneric types: header, basic, bearer, query, OAuth2Your own or an unknown API
PaginationWalks a paginated response automatically: by incrementing a parameter or following the next URL in the responseWhen the API returns more than a page of records
BatchingSplits requests into batches with an interval between themWhen the API has a rate limit
TimeoutHow long to wait for the response to start (milliseconds)A slow or unreliable service
Never ErrorTreats any status code as successWhen you want to handle error codes yourself
Include Response Headers and StatusReturns headers and the status code as well as the bodyWhen branching on the status code, or reading rate-limit headers

Pagination is handled by the node's own option, in two modes:

  • Update a Parameter in Each Request — you change a parameter (page number, offset) on each request
  • Response Contains Next URL — the API returns the next page's URL and you point at it with an expression

While configuring pagination n8n exposes three variables: $pageCount (how many pages have been fetched), $request (the request sent) and $response (the response received — including $response.body, $response.headers and $response.statusCode).

APIs paginate differently, so before building it either read the documentation or send one request and look at the response shape. For a non-standard scheme, building the loop by hand with Loop Over Items is the alternative.

Ten items into an HTTP Request node means ten requests. That is the fastest way to burn a rate limit. The node's own Batching option (items per batch plus an interval between batches) exists exactly for this — look at it before building a Loop Over Items.

📚 Sources and documentation