The HTTP Request Node: Call Any API
- Configure the HTTP Request node to call any REST API with the correct method, URL, and authentication
- Use dynamic expressions in URL and body fields to make API calls data-driven
- Handle API key, Bearer token, and Basic Auth patterns correctly
Your Escape Hatch for Any Service
n8n has 400+ dedicated nodes for popular services. But there are thousands of APIs in the world, and not every service has its own node. The HTTP Request node solves this: it can call any REST API endpoint and treat the response as workflow data, just like any other node.
Even for services that have a dedicated node, the HTTP Request node is sometimes more flexible — it gives you direct access to API endpoints that the dedicated node might not expose.
Configuring the Node
Add an HTTP Request node and configure these core fields:
- Method — GET (read data), POST (create/send), PUT/PATCH (update), DELETE (remove). Most data retrieval uses GET; most data creation uses POST.
- URL — The full API endpoint. Can use expressions:
https://api.example.com/users/{{ $json.userId }} - Authentication — Choose "Predefined Credential Type" to reuse an existing n8n credential, "Generic Credential Type" to specify a custom header or query parameter, or "None" for public APIs.
- Headers — Key-value pairs added to the request. For Bearer token auth: Key =
Authorization, Value =Bearer {{ $json.token }} - Body — For POST/PUT requests. Set to JSON and provide the body as key-value pairs or a raw JSON expression.
A Practical Example: Weather API
Open-Meteo (open-meteo.com) provides free weather data with no API key. To fetch current weather for London:
- Method: GET
- URL:
https://api.open-meteo.com/v1/forecast?latitude=51.5&longitude=-0.12¤t_weather=true
Click Test Step. The response appears as a JSON item in the output panel — you can then use {{ $json.current_weather.temperature }} in downstream nodes to display the temperature in an email or Slack message.
Handling Authentication
Most real APIs require authentication. Common patterns:
- API Key in header: Add a header with Key =
X-API-Key(or whatever the API specifies) and Value = your key. Store the key in an n8n credential and reference it with an expression rather than pasting it directly into the URL field. - Bearer token: Add header
Authorization: Bearer YOUR_TOKEN - Basic Auth: Select Basic Auth in the authentication dropdown and enter username/password
Handling Pagination
Many APIs return data in pages — the first response contains 100 items and a cursor or page number for the next batch. n8n's HTTP Request node has built-in pagination support. Enable Pagination in the node settings, set the type (cursor-based or page-based), and n8n automatically loops through all pages and merges the results into one set of items.
With the HTTP Request node in your toolkit, you are not limited by what has a dedicated n8n integration. If a service has a REST API and documentation, you can automate it.
- The HTTP Request node connects n8n to any REST API — it is your escape hatch when no dedicated node exists
- Authentication goes in a header (e.g. Authorization: Bearer TOKEN) or as a query parameter — store keys in n8n credentials, never paste them directly
- Enable built-in Pagination in the node to automatically loop through multi-page API responses and merge all results