# HTTP Request API: Send HTTP Requests in Bulk via Proxy (`tenfoldfleet/http-request-api`) Actor

Send an HTTP request to any URL or API through a proxy and get the response back: any method, custom headers and body, datacenter or residential IP, country per request. Returns status code, headers, body or parsed JSON and a JSON path or CSS extract. From $5 per 1,000; failed requests are free.

- **URL**: https://apify.com/tenfoldfleet/http-request-api.md
- **Developed by:** [Tenfold Fleet](https://apify.com/tenfoldfleet) (community)
- **Categories:** Developer tools, Agents, MCP servers
- **Features:** Limited permissions
- **Stats:** 1 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.50 / 1,000 request (datacenter or no proxy)s

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

### What does HTTP Request API do?

**HTTP Request API** lets you **send HTTP requests** to any public URL or REST API from an [Apify](https://apify.com) proxy IP and get the raw response back. Give it a list of requests, each with its own **method, headers and body**, and it returns one row per request with the **status code, response headers, body or parsed JSON**, timing and the proxy that was used.

It is an **HTTP client as an API**: one call from n8n, Make, Zapier, Clay, a script or an AI agent, and the request leaves from a **datacenter or residential proxy IP**, with the exit country set per run or per request. Nothing is rendered and no browser is started, so it is fast and cheap.

- **Any method**: GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS.
- **Bulk**: up to 5,000 requests per run, up to 50 in parallel.
- **Country per request**: set one country for the run and override it on single requests. Residential covers most countries; the datacenter pool covers few (see Tips).
- **Built-in extraction**: a JSON path or a CSS selector pulls the one value you need out of each response.
- **Hard size cap**: the download stops at the limit and the row says `"truncated": true`, so one huge file cannot blow up your bill.
- **Failed requests are free**: you pay only when an HTTP response comes back.

### Why use HTTP Request API?

- **Call an API that blocks your server's IP** or that answers differently per country (prices, availability, geo-restricted content).
- **Give an AI agent a safe "fetch" tool**: it runs on the [Apify MCP server](https://apify.com/apify/actors-mcp-server) and returns compact JSON an agent can read.
- **Add a proxied HTTP step to a no-code workflow** when the built-in HTTP module is rate-limited or blocked.
- **Check many endpoints at once**: status codes, redirects, response times and headers for a list of URLs.
- **Fetch a value, not a page**: `"extract": "$.data.price"` or `"extract": "title"` returns only that part in `extracted`.

### What data can HTTP Request API return?

| Field | Description |
|---|---|
| `index` | Position of the request in your input list |
| `url`, `finalUrl` | The URL you asked for and the URL after redirects |
| `method` | HTTP method that was sent |
| `statusCode`, `ok` | Response status and whether it is 2xx |
| `headers`, `contentType` | Response headers (lower-case names) |
| `json` | Parsed body when the response is JSON |
| `body`, `bodyEncoding` | Body as text, or base64 for binary files |
| `extracted`, `extractError` | Result of your JSON path or CSS selector |
| `truncated`, `bytes` | Whether the size cap cut the body, and how many bytes were kept |
| `durationMs`, `attempts`, `redirects` | Timing, tries and redirect hops |
| `proxyType`, `country` | Proxy and exit country used |
| `error` | Why a request failed (such rows are free) |

### How to send HTTP requests in bulk

1. Open the Actor and paste your requests into **Requests**: plain URLs, or objects with `url`, `method`, `headers` and `body` or `json`.
2. Pick the **Proxy**: datacenter for most APIs, residential for sites that refuse datacenter IPs, or none.
3. Optional: set a **Proxy country**, an **Extract** expression and a response size limit.
4. Click **Start**. Each request becomes one row in the dataset.
5. Read the rows over the API, or download them as JSON, CSV or Excel.

### How much does it cost to send HTTP requests?

Pay per event, no subscription:

- **$5 per 1,000 requests** ($0.005 each) over the datacenter proxy or with no proxy.
- **$12 per 1,000 requests** ($0.012 each) over the residential proxy.
- A run start costs $0.00005.

A request is charged when an HTTP response arrives, whatever its status code (a 404 or 500 from the target is still a delivered response). **Not charged**: network errors, timeouts, DNS failures, proxy errors, blocked destinations, invalid input rows and every retry. Proxy and compute are included in the price.

**Free Apify plan**: up to 20 requests per run, datacenter proxy or no proxy. Residential needs a paid plan.

### Input

```json
{
    "requests": [
        "https://example.com",
        {
            "url": "https://jsonplaceholder.typicode.com/posts",
            "method": "POST",
            "headers": { "Authorization": "Bearer YOUR_KEY" },
            "json": { "title": "hello", "userId": 1 }
        },
        {
            "url": "https://jsonplaceholder.typicode.com/todos/1",
            "country": "US",
            "extract": "$.title"
        }
    ],
    "proxyType": "datacenter",
    "timeoutSecs": 30,
    "maxRetries": 2,
    "followRedirects": true,
    "responseType": "auto",
    "maxConcurrency": 10
}
```

`method` defaults to GET, or POST when the request has a body. `json` is serialized and sent with `Content-Type: application/json`; `body` is sent as it is. Per request you can override `country`, `responseType`, `extract`, `timeoutSecs` and `followRedirects`. A run-level `"country"` applies to every request that does not set its own.

**Extract syntax.** JSON responses: `$.data.items[0].name`, `$.results[*].id` (a `*` returns a list), `$['odd key']`, negative indexes such as `[-1]`. HTML responses: any CSS selector returns the text of every match (`title`, `h1`, `.price`, `table td:nth-child(2)`); add `@attribute` for an attribute (`a.product@href`, `meta[property="og:image"]@content`).

### Output

![Sample output of HTTP Request API: Send HTTP Requests in Bulk via Proxy, rows from a real run: #, Method, URL, Status, 2xx, Content type](https://api.apify.com/v2/key-value-stores/4TBgG7fopkYMNWnX2/records/http-request-api-output.png)

```json
{
    "index": 2,
    "url": "https://jsonplaceholder.typicode.com/todos/1",
    "finalUrl": "https://jsonplaceholder.typicode.com/todos/1",
    "method": "GET",
    "statusCode": 200,
    "ok": true,
    "headers": { "content-type": "application/json; charset=utf-8", "cache-control": "max-age=43200" },
    "contentType": "application/json; charset=utf-8",
    "body": null,
    "json": { "userId": 1, "id": 1, "title": "delectus aut autem", "completed": false },
    "bodyEncoding": "json",
    "extracted": "delectus aut autem",
    "extractError": null,
    "truncated": false,
    "bytes": 83,
    "durationMs": 412,
    "proxyType": "datacenter",
    "country": "US",
    "attempts": 1,
    "redirects": 0,
    "error": null
}
```

You can download the dataset as JSON, CSV, Excel, XML or HTML, or read it through the Apify API.

### Tips

- **Start with datacenter.** It is the cheaper option and enough for most APIs. Switch to residential only when the target answers 403 or shows a challenge page to datacenter IPs.
- **Response size limits**: 5 MB on datacenter or no proxy, 500 KB on residential. Lower `maxResponseBytes` when you only need the start of a page.
- **Your own headers win.** If you send a `User-Agent`, the request goes out with exactly your headers. Without one, a realistic browser header set is added.
- **Retries** apply only when no response arrived. A 429 or 503 from the target is returned to you so your workflow can decide what to do. POST and PATCH are sent again only when the first try never reached the target (for example the proxy could not connect), so a timeout cannot create the same record twice.
- **Dead hosts fail fast.** When a host gives no response to 5 requests in a row, the next requests to it get one 10-second try each until it answers again. These rows are free.
- **The timeout covers one whole attempt**, redirects and download included.
- **Datacenter countries are limited.** The datacenter pool depends on your Apify plan: in our test run US worked, while DE and GB had no datacenter IP. A country the pool does not have comes back as a free `error` row. Use residential when the country matters.
- **Use it from an agent**: add this Actor to the Apify MCP server and the agent can make proxied calls with a single tool.

### FAQ

#### Can I send POST requests with a JSON body?

Yes. Put the object in `json`, or a raw string in `body` with your own `Content-Type` header. Form posts work the same way with `body: "a=1&b=2"` and `Content-Type: application/x-www-form-urlencoded`.

#### Does it run JavaScript or render pages?

No. It sends one HTTP request and returns the response as the server sent it. That is why it is fast. For rendered pages use a browser-based Actor from [Apify Store](https://apify.com/store).

#### Which destinations are refused?

Only public internet hosts are allowed. Private and internal addresses (10.x, 172.16-31.x, 192.168.x, 127.x, 169.254.x, IPv6 local ranges), cloud metadata endpoints, the Apify proxy and the Apify API are refused, also when a public URL redirects to them. These rows carry an `error` and cost nothing.

#### What happens with large files?

The download is cut at the size limit, the part that was received is returned (as base64 for binary files) and `truncated` is `true`. You are charged for one request as usual. Responses over 500 KB are stored a few at a time, so very large batches of big files run slower than small API calls.

#### Are my headers and API keys stored?

Request headers and bodies are used to send the request and are not written to the dataset. The response, including response headers, is stored in your own dataset under your Apify account, so treat the dataset like any other place that may hold API data.

#### Can I keep the same IP across requests?

Each request, and each retry, uses a fresh proxy IP. Sticky sessions are not supported yet; open an issue on the Actor page if you need them.

### Disclaimer

Use this Actor only for requests you are allowed to make. You are responsible for following the terms of the sites and APIs you call and the laws that apply to you, including rules on personal data. Do not use it to attack, overload or probe systems you do not own.

### More tools from Tenfold Fleet

| Actor | Output |
|---|---|
| [Alibaba RFQ Scraper - New Buying Requests Monitor](https://apify.com/tenfoldfleet/alibaba-rfq-scraper-buying-requests-monitor) | new buying request |
| [Journalist Requests Monitor - HARO Alternative for PR Links](https://apify.com/tenfoldfleet/journalist-requests-monitor-haro-alternative) | new journalist request |
| [HTML to Text & URL to Markdown - LLM Ready Web Content](https://apify.com/tenfoldfleet/url-to-markdown) | page |
| [1688 Alibaba AliExpress Image Search: Compare Prices by Photo](https://apify.com/tenfoldfleet/1688-alibaba-aliexpress-image-search) | matched product |
| [1688 Image Search API - Reverse Image Search for Factory Prices](https://apify.com/tenfoldfleet/1688-image-search-suppliers-by-photo) | image search |
| [1688 Product Details API: Price Tiers, MOQ, Specs & Supplier](https://apify.com/tenfoldfleet/1688-product-details-scraper) | product details |
| [1688 Products Search: Wholesale Prices, Sales & Suppliers](https://apify.com/tenfoldfleet/1688-products-search) | product |
| [ALDI Australia Scraper - AU Products, Unit Prices & Catalogue](https://apify.com/tenfoldfleet/aldi-australia-scraper) | product |
| [Alibaba Image Search - Reverse Lookup of Suppliers by Photo](https://apify.com/tenfoldfleet/alibaba-image-search) | matched product |
| [Alibaba Scraper - Wholesale Suppliers, MOQ & Price Breaks](https://apify.com/tenfoldfleet/alibaba-products-scraper) | product |
| [Alibaba Verified Suppliers Scraper - Company Profiles](https://apify.com/tenfoldfleet/alibaba-verified-suppliers-scraper) | supplier profile |
| [AliExpress Reverse Image Search - Similar Products & Prices](https://apify.com/tenfoldfleet/aliexpress-reverse-image-search) | image search |

All 122 tools: [apify.com/tenfoldfleet](https://apify.com/tenfoldfleet). If this Actor saves you time, save it (the bookmark on its Store page) and leave a review: both help other people find it. Found a bug or need another field? Tell us on the Issues tab of this page.

# Changelog

This Actor's version history is a separate document: https://apify.com/tenfoldfleet/http-request-api/changelog.md

# Actor input Schema

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

The HTTP requests to send. Each item is a URL string or an object: {"url", "method", "headers", "body", "json"}. "method" defaults to GET (POST when a body is given). "json" is sent as a JSON body. Optional per-request overrides: "country", "responseType", "extract", "timeoutSecs", "followRedirects". One request = one result row. Free Apify plan: the first 20 requests per run.

## `country` (type: `string`):

Optional 2-letter country code for the exit IP, e.g. US, GB, DE, JP. Applies to every request unless a request sets its own "country". Residential covers most countries; the datacenter pool covers fewer, and a country it does not have comes back as a free error row.

## `responseType` (type: `string`):

auto: JSON responses are parsed into "json", text and HTML go to "body", binary files are returned as base64. json / text / base64 force one format.

## `extract` (type: `string`):

Optional. Pull one part out of every response into the "extracted" field. For JSON responses use a JSON path such as $.data.items\[0].name or $.results\[\*].id. For HTML use a CSS selector such as h1 or a.product@href (the part after @ is an attribute).

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

Follow 301, 302, 303, 307 and 308 redirects (up to 10) and return the last response. Turn off to get the redirect response itself.

## `proxyType` (type: `string`):

Where the requests come from. Datacenter: fast and cheap, right for most APIs. Residential: a home IP for sites that refuse datacenter IPs (paid Apify plans only, responses capped at 500 KB). None: sent straight from the Actor server.

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

How long one attempt may take, redirects and download included.

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

How many times to retry a request that got no HTTP response (timeout, connection reset, proxy error), each time from a new IP. Retries are never charged. A response with any status code, including 4xx and 5xx, is returned as it is and not retried. POST and PATCH are sent again only when the first try never reached the target. A host that gave no response to 5 requests in a row gets one 10-second try per request until it answers again.

## `maxResponseBytes` (type: `integer`):

The download stops at this size and the row is marked "truncated": true. Default and upper limit: 5,000,000 bytes (5 MB) on datacenter or no proxy, 500,000 bytes (500 KB) on residential.

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

How many requests run in parallel.

## `maxRequests` (type: `integer`):

Safety limit: requests after this number are skipped and not charged. Free Apify plan: 20 requests per run.

## Actor input object example

```json
{
  "requests": [
    {
      "url": "https://example.com"
    },
    {
      "url": "https://jsonplaceholder.typicode.com/posts",
      "method": "POST",
      "json": {
        "title": "hello",
        "userId": 1
      }
    },
    {
      "url": "https://jsonplaceholder.typicode.com/todos/1",
      "headers": {
        "Accept": "application/json"
      },
      "extract": "$.title"
    }
  ],
  "responseType": "auto",
  "followRedirects": true,
  "proxyType": "datacenter",
  "timeoutSecs": 30,
  "maxRetries": 2,
  "maxConcurrency": 10,
  "maxRequests": 1000
}
```

# Actor output Schema

## `results` (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 = {
    "requests": [
        {
            "url": "https://example.com"
        },
        {
            "url": "https://jsonplaceholder.typicode.com/posts",
            "method": "POST",
            "json": {
                "title": "hello",
                "userId": 1
            }
        },
        {
            "url": "https://jsonplaceholder.typicode.com/todos/1",
            "headers": {
                "Accept": "application/json"
            },
            "extract": "$.title"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("tenfoldfleet/http-request-api").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 = { "requests": [
        { "url": "https://example.com" },
        {
            "url": "https://jsonplaceholder.typicode.com/posts",
            "method": "POST",
            "json": {
                "title": "hello",
                "userId": 1,
            },
        },
        {
            "url": "https://jsonplaceholder.typicode.com/todos/1",
            "headers": { "Accept": "application/json" },
            "extract": "$.title",
        },
    ] }

# Run the Actor and wait for it to finish
run = client.actor("tenfoldfleet/http-request-api").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 '{
  "requests": [
    {
      "url": "https://example.com"
    },
    {
      "url": "https://jsonplaceholder.typicode.com/posts",
      "method": "POST",
      "json": {
        "title": "hello",
        "userId": 1
      }
    },
    {
      "url": "https://jsonplaceholder.typicode.com/todos/1",
      "headers": {
        "Accept": "application/json"
      },
      "extract": "$.title"
    }
  ]
}' |
apify call tenfoldfleet/http-request-api --silent --output-dataset

```

## MCP server setup

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

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/xmhMhSO1pVP3dMyNK/builds/x9AV8Ea25IxeSwtMZ/openapi.json
