# Bulk HTTP & API Request Runner: Batch Calls with Retries (`steady-scrape/bulk-http-request-runner`) Actor

Send thousands of HTTP or API requests (GET, POST, PUT, PATCH, DELETE) with custom headers and JSON bodies, retries, per-host rate limits and optional proxy. Every response (status, headers, JSON or text) becomes a dataset row. Pay per response.

- **URL**: https://apify.com/steady-scrape/bulk-http-request-runner.md
- **Developed by:** [SteadyScrape](https://apify.com/steady-scrape) (community)
- **Categories:** Developer tools, Integrations
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.50 / 1,000 request completeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Bulk HTTP & API Request Runner: Batch Calls with Retries

Send **hundreds or thousands of HTTP / API requests in one run** and get every response back as a clean dataset row: status code, headers, parsed JSON or text, timing and retries. Use it for API backfills, webhook fan-out, uptime and status checks, bulk enrichment calls from Clay, n8n, Make or Zapier, or any job that is "call this endpoint for every row".

### What it does

- Any method: GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS.
- Per-request **headers**, **JSON** or text **body**, and a **label** copied to the output so you can join results back.
- **Retries** with exponential backoff on timeouts, connection errors and HTTP 408/425/429/5xx, honouring `Retry-After`.
- **Rate limits:** total parallel requests (1-50) and per-host limit (1-20), plus an optional delay.
- **Redirects** followed (up to 5), response size cap, JSON parsed automatically, binary returned as base64 + SHA-256.
- Optional **Apify datacenter proxy** and country.
- Private and internal addresses (localhost, 10.x, 192.168.x, cloud metadata) are always blocked.

### Input example

```json
{
  "requests": [
    {"url": "https://api.example.com/v1/users/1", "label": "row-1"},
    {"url": "https://api.example.com/v1/users", "method": "POST", "json": {"name": "Ada"}, "label": "row-2"}
  ],
  "defaultHeaders": {"Authorization": "Bearer YOUR_TOKEN", "Accept": "application/json"},
  "maxConcurrency": 10,
  "maxPerHost": 4,
  "maxRetries": 2
}
```

Simple lists work too: put plain URLs in `urls` and they are sent with the default method and headers.

### Output example

```json
{"index": 0, "label": "row-1", "method": "GET", "url": "https://api.example.com/v1/users/1",
 "ok": true, "status": 200, "finalUrl": "https://api.example.com/v1/users/1", "contentType": "application/json",
 "bytes": 182, "truncated": false, "timeMs": 143, "attempts": 1, "error": null,
 "headers": {"content-type": "application/json"}, "json": {"id": 1, "name": "Ada"}}
```

Requests that never get a response have `ok: false`, `status: null` and an `error`. The `OUTPUT` record summarises responses, 2xx, failures and events charged.

### Pricing

Pay per event: a small fee per run that gets at least one response, plus a fee per request that **received an HTTP response** (any status code, after retries). Not charged: blocked or invalid URLs, requests that never got a response (DNS, connection or timeout errors after retries), requests skipped by your maximum charge or the free-plan limits, and mock runs. Set **Maximum cost per run** to cap spend.

**Free Apify plan:** up to 200 requests per run.

### Good to know

- Default headers are a secret input (encrypted), so API keys there are not shown in the run input. Request bodies and per-request headers are not encrypted; avoid putting secrets in them.
- Request headers are never written to the output or logs.
- Only call APIs and sites you are allowed to use, and respect their rate limits and terms.
- Up to 50,000 requests per run; responses up to 10 MB each (default 1 MB).
- If most requests get no response, the run stops early to protect you; the rest are not sent or charged.

### FAQ

**Can I call it from n8n, Make or Zapier?** Yes. Start it with the Apify integration and read the dataset items when it finishes.

**Are 404 and 500 responses charged?** Yes, they are real responses (the server answered). Requests with no response at all are free.

**Can I use residential proxies?** Not in this version.

# Actor input Schema

## `urls` (type: `array`):

Each URL is sent with the default method and headers.

## `requests` (type: `array`):

Array of {url, method, headers, json | body, label}. 'json' sends a JSON body; 'body' sends text. 'label' is copied to the output row.

## `defaultMethod` (type: `string`):

Used for 'urls' and for requests without a method.

## `defaultHeaders` (type: `object`):

Sent with every request, e.g. {"Authorization": "Bearer ...", "Accept": "application/json"}. Per-request headers override them.

## `maxConcurrency` (type: `integer`):

Requests in flight at once (1-50).

## `maxPerHost` (type: `integer`):

Protects the APIs you call from overload (1-20).

## `delayBetweenRequestsMs` (type: `integer`):

Extra pause per request slot, for strict rate limits.

## `timeoutSecs` (type: `integer`):

1-120 seconds.

## `maxRetries` (type: `integer`):

Retries on timeouts, connection errors and HTTP 408/425/429/5xx, with backoff and Retry-After support.

## `followRedirects` (type: `boolean`):

Up to 5 redirects.

## `maxResponseKb` (type: `integer`):

Longer bodies are cut and marked truncated (1 KB-10 MB).

## `parseJson` (type: `boolean`):

JSON bodies are returned as objects in 'json'; others as text in 'body'.

## `includeResponseHeaders` (type: `boolean`):

Adds the response headers to each row.

## `proxy` (type: `object`):

Optional Apify datacenter proxy (residential is not supported).

## `mock` (type: `boolean`):

Returns sample responses without sending anything. Nothing is charged.

## Actor input object example

```json
{
  "urls": [
    "https://api.github.com/repos/apify/crawlee",
    "https://httpbin.org/status/404"
  ],
  "requests": [
    {
      "url": "https://httpbin.org/post",
      "method": "POST",
      "json": {
        "hello": "world"
      },
      "label": "demo"
    }
  ],
  "defaultMethod": "GET",
  "maxConcurrency": 10,
  "maxPerHost": 4,
  "delayBetweenRequestsMs": 0,
  "timeoutSecs": 30,
  "maxRetries": 2,
  "followRedirects": true,
  "maxResponseKb": 1024,
  "parseJson": true,
  "includeResponseHeaders": true,
  "proxy": {
    "useApifyProxy": false
  },
  "mock": false
}
```

# Actor output Schema

## `responses` (type: `string`):

No description

## `summary` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "urls": [
        "https://api.github.com/repos/apify/crawlee",
        "https://httpbin.org/status/404"
    ],
    "requests": [
        {
            "url": "https://httpbin.org/post",
            "method": "POST",
            "json": {
                "hello": "world"
            },
            "label": "demo"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("steady-scrape/bulk-http-request-runner").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "urls": [
        "https://api.github.com/repos/apify/crawlee",
        "https://httpbin.org/status/404",
    ],
    "requests": [{
            "url": "https://httpbin.org/post",
            "method": "POST",
            "json": { "hello": "world" },
            "label": "demo",
        }],
}

# Run the Actor and wait for it to finish
run = client.actor("steady-scrape/bulk-http-request-runner").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "urls": [
    "https://api.github.com/repos/apify/crawlee",
    "https://httpbin.org/status/404"
  ],
  "requests": [
    {
      "url": "https://httpbin.org/post",
      "method": "POST",
      "json": {
        "hello": "world"
      },
      "label": "demo"
    }
  ]
}' |
apify call steady-scrape/bulk-http-request-runner --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,steady-scrape/bulk-http-request-runner"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/ihXz2N2NwAhkdf9Tp/builds/elgwBdpSsnx3QExTU/openapi.json
