HTTP Request: Bulk API Calls, Retries, for Clay & n8n avatar

HTTP Request: Bulk API Calls, Retries, for Clay & n8n

Pricing

from $0.70 / 1,000 request sents

Go to Apify Store
HTTP Request: Bulk API Calls, Retries, for Clay & n8n

HTTP Request: Bulk API Calls, Retries, for Clay & n8n

Send many HTTP requests in one run: GET, POST, PUT, PATCH, DELETE with headers, params and JSON bodies. Retries on 429 and 5xx, parsed JSON, your lookup key on every row, webhook callback. For Clay, n8n, Make. $1 per 1,000.

Pricing

from $0.70 / 1,000 request sents

Rating

0.0

(0)

Developer

Prometheus

Prometheus

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

20 days ago

Last modified

Features

Limited permissions

Share

HTTP Request Runner: Bulk API Calls with Retries

Send hundreds of HTTP requests in one run and get one clean result row for each: status code, headers, and the response body, already parsed if it's JSON. Any method (GET, POST, PUT, PATCH, DELETE, HEAD), your headers, query parameters, and JSON or text bodies. Failed calls are retried the sensible way, and your own lookup key comes back on every row so you can join results to your data.

$1 per 1,000 requests ($0.70 on Gold plans and above). Requests that get no response at all are free.

Use it from Clay or n8n

Call the synchronous endpoint from Clay's HTTP API column or n8n's HTTP Request node (method POST, body type JSON):

https://api.apify.com/v2/acts/prometheus-maker~http-request-runner/run-sync-get-dataset-items?token=YOUR_TOKEN

Send requests (a list of URLs, or objects with url, method, json and lookupKey) and, if the API needs a key, defaultHeaders. For one call, send url, method and json instead. Put your row ID in lookupKey. The response is a JSON array with one row per request. Read json for the parsed body (body if the reply wasn't JSON), statusCode for the status, and lookupKey to match each row back to your table.

Why one run for many calls

The Actor sends the requests in your list in parallel (20 at a time by default, at most 5 per host, both adjustable), so one run with 200 requests finishes sooner than 200 runs of one request each, and your workflow makes one call instead of 200. The price per request is the same either way. Retries, Retry-After waits and the optional callbackUrl webhook work per request inside the run, so one slow or failing call doesn't hold up the rest.

Use cases

  • Clay, n8n, Make and Zapier users: call any API from a workflow, in bulk, without writing a server
  • Data teams: enrich a list of IDs from a REST API and get a dataset back
  • Developers: smoke-test endpoints, check webhooks, or replay a batch of calls
  • AI agents: make many API calls through one Apify run

Input

{
"requests": [
"https://jsonplaceholder.typicode.com/posts/1",
{"url": "https://jsonplaceholder.typicode.com/posts", "method": "POST",
"json": {"title": "Hello"}, "lookupKey": "row-42"}
],
"defaultHeaders": {"Authorization": "Bearer YOUR_KEY"},
"maxRetries": 2
}

Each request is a URL, or an object with url, method, headers, params, json or body, and lookupKey. For a single call, use the url, method and json fields instead.

OptionWhat it does
defaultHeadersAdded to every request (stored as a secret); a request's own headers win
maxRetriesRetries after 408, 429, 5xx and connection errors, waiting as long as the server's Retry-After asks (up to 30 s). A 4xx is your request being wrong, so it is not retried.
parseJsonJSON responses land in json as data; anything else in body as text
maxBodyBytesLonger responses are cut and marked truncated
callbackUrlEach row is also POSTed to your webhook as soon as it's ready
maxConcurrency, maxRequestsPerHostParallel requests overall and per server (default 20 and 5)

Output

One row per request. A real row from a test run (body shortened):

{
"lookupKey": "patch",
"url": "https://httpbin.org/anything",
"method": "PATCH",
"statusCode": 200,
"ok": true,
"attempts": 1,
"finalUrl": "https://httpbin.org/anything",
"responseHeaders": {"content-type": "application/json", "...": "..."},
"json": {"method": "PATCH", "json": {"a": 1}, "...": "..."},
"body": null,
"truncated": false,
"error": null
}

statusCode is null when no response arrived (DNS error, timeout, refused); error then says why. ok is true for a 2xx.

Tested

On a mixed batch: GitHub API and Open-Meteo JSON parsed, a PATCH with a JSON body returned, http://github.com followed to https://github.com/, a 503 retried once and reported, a dead domain reported without a status, and a request to a private address refused. 11 automated tests cover retries, Retry-After, truncation, lookup keys and validation.

Pricing

$0.001 per request that gets a response (any status code, including 4xx and 5xx: the call was made). Bronze $0.0009, Silver $0.0008, Gold and above $0.0007. Requests with no response at all, and refused ones, are free. The run stops cleanly at your spending limit.

Limits

  • No proxies and no bot-detection tricks: requests come from Apify's servers as they are. Use it for APIs and sites that allow automated access.
  • Only public addresses: URLs that point to private networks are refused.
  • Bodies over maxBodyBytes (default 2 MB, max 8 MB) are cut.

Use it from code

curl -X POST "https://api.apify.com/v2/acts/prometheus-maker~http-request-runner/run-sync-get-dataset-items" \
-H "Authorization: Bearer $APIFY_TOKEN" -H "Content-Type: application/json" \
-d '{"requests": ["https://jsonplaceholder.typicode.com/posts/1"]}'

More examples: apify-tools-examples.


Built and maintained by Prometheus. Found a wrong result? Open an issue on the Issues tab and it will be looked at.