Skip to main content

API Request

Controlled node

Overview

The API Request node performs HTTP requests to external APIs or web services. It supports standard HTTP methods (GET, POST, PUT, DELETE, PATCH) and can handle both single requests and batch requests with configurable concurrency. The node includes built-in retry logic, timeout controls, and optional proxy rotation to avoid rate limiting.

When making batch requests (by providing an array of URLs), the node processes them in parallel chunks based on the concurrency setting, making it efficient for bulk data fetching or webhook notifications.

Output events

  • Done: Fires when the request completes, regardless of success or failure. Check the output data to determine if the request succeeded.

Inputs

InputTypeDescriptionDefault
RunEventTriggers the HTTP request.-
MethodEnumHTTP method to use: GET, POST, PUT, DELETE, or PATCH.GET
URLTextThe target URL. Can be a single string or an array of strings for batch processing.-
HeadersDictionaryHTTP headers to include in the request (e.g., {"Authorization": "Bearer token"}).-
QueryDictionaryQuery parameters to append to the URL (e.g., {"page": 1, "limit": 10}).-
DataDictionaryRequest body data for POST, PUT, or PATCH requests.-
ConcurrencyNumberNumber of parallel requests for batch processing (only used when URL is an array).1
TimeoutNumberRequest timeout in milliseconds.30000 (30s)
RetriesNumberNumber of retry attempts on failure.0
Use ProxyBooleanEnable to rotate IP addresses via proxy to avoid rate limiting.false

Outputs

OutputTypeDescription
OutputDataResponse data from the API. For single requests, returns the response body. For batch requests, returns an array of responses in the same order as the input URLs. Returns an error object with error and errorCode properties if the request fails.
DoneEventFires when the request completes.

Runtime behavior and defaults

The API Request node validates and normalizes all numeric inputs:

  • Concurrency: Defaults to 1 if not provided or invalid. Maximum is 100.
  • Timeout: Defaults to 30000ms (30 seconds) if not provided. Maximum is 3600000ms (60 minutes).
  • Retries: Defaults to 0 if not provided. Maximum is 10 attempts.
  • Method: Defaults to GET if not specified.

When Use Proxy is enabled, the node rotates through available proxy sessions for each request (or retry attempt), helping to avoid IP-based rate limiting.

For batch requests (when URL is an array), the node processes URLs in parallel chunks based on the concurrency setting. If any request in the batch fails, the error is captured in the corresponding index of the output array rather than failing the entire batch.

Error responses are returned as objects with the structure:

{
"error": "Error message string",
"errorCode": "HTTP status code or error code"
}

Example

Single API request

Connect a Start node to the Run input of the API Request node to fetch data from a JSON API:

  • Method: GET
  • URL: https://api.example.com/users/123
  • Headers: {"Accept": "application/json", "Authorization": "Bearer {{token}}"}
  • Timeout: 10000

The Output will contain the parsed JSON response from the API.

Batch processing with concurrency

To fetch multiple pages of data in parallel:

  • Method: GET
  • URL: ["https://api.example.com/page/1", "https://api.example.com/page/2", "https://api.example.com/page/3"]
  • Concurrency: 3
  • Retries: 2

The Output will be an array containing the response data for each URL in the same order as the input array.