# HTTP Request Tool: GET/POST via Proxy ($1/1K requests) (`tamnt67/http-request-tool`) Actor

HTTP request tool for APIs: send GET, POST, PUT, PATCH, DELETE or HEAD and get status, headers, body, parsed JSON, redirects and timing. Takes URLs or a batch of requests, each with its own method, headers, params, body and label, plus proxy country and callback URL. Use it to call APIs.

- **URL**: https://apify.com/tamnt67/http-request-tool.md
- **Developed by:** [Tam Ng.](https://apify.com/tamnt67) (community)
- **Categories:** Developer tools, Automation
- **Features:** Limited permissions
- **Stats:** 3 total users, 2 monthly users, 93.8% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.70 / 1,000 responses

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

## HTTP Request Tool: GET/POST via Proxy

Send **HTTP requests** (GET, POST, PUT, PATCH, DELETE, HEAD) to one or many URLs from the Apify cloud, optionally through Apify Proxy, and get every response as a dataset row: status code, headers, body, parsed JSON, final URL after redirects, size and response time.

Use it to call an API from a workflow tool that cannot send custom requests (Clay, Make, Zapier, n8n), send a whole batch of different API calls in one run, check what a URL returns from another country, test webhooks and endpoints, check status codes and redirects of a list of links, or fetch public JSON, XML and CSV files on a schedule.

### How to use

There are two ways to give requests, and you can mix them in one run:

- **URLs**: a list of URLs that all use the same **method**, **headers**, **query parameters** and **body**.
- **Requests**: a JSON list where every request has its own method, headers, query parameters, body and a **label** that is copied to its output row, so you can match each response to the request that produced it.

Then:

1. Optionally add shared **headers** and **query parameters** as JSON objects, and choose a proxy country.
2. Optionally set a **Callback URL**: every response row is also sent there with POST as JSON right after it is saved, for example to a Make, Zapier or n8n webhook or your own API.
3. Run. Each request gives one row. Download JSON, CSV or Excel, or read the dataset from the API.

#### Example: the same POST to several URLs

```json
{
  "urls": [{ "url": "https://httpbin.org/post" }],
  "method": "POST",
  "headers": { "x-api-key": "your key" },
  "body": "{\"hello\": \"world\"}"
}
```

#### Example: a batch of different requests with labels and a callback

```json
{
  "requests": [
    { "url": "https://httpbin.org/get", "params": { "page": 2 }, "label": "list-page-2" },
    { "url": "https://httpbin.org/post", "method": "POST", "body": { "name": "Ann" }, "label": "create-ann" },
    { "url": "https://httpbin.org/delete", "method": "DELETE", "headers": { "x-token": "abc" }, "label": "delete-1" }
  ],
  "callbackUrl": "https://hook.example.com/your-webhook"
}
```

`body` can be a JSON object (sent as JSON) or a string (sent as is). `data` and `json` are accepted as other names for `body`, and `lookupKey` as another name for `label`.

### Output fields

| Field | Example |
|-------|---------|
| `label` | your label from the request, or null |
| `url` / `finalUrl` / `method` | requested URL / URL after redirects / GET |
| `statusCode` / `statusMessage` / `ok` | 200 / OK / true (true for 2xx and 3xx) |
| `contentType` / `sizeBytes` / `durationMs` | application/json / 4512 / 380 |
| `attempts` / `redirectUrls` | 1 / list of redirect hops |
| `headers` | response headers as an object |
| `body` / `bodyTruncated` | response text, cut at **Max body characters** / true when cut |
| `json` | parsed body when the response is JSON |
| `bodyBase64` | body of binary responses up to 1 MB (images, PDF) |
| `requestedAt` | ISO date |

### Pricing

You pay a small fee per record in the dataset. Platform usage and proxy traffic are included. Set a maximum total charge per run in the run options for a hard cap.

Retries are free: a request is charged once, however many attempts it needed. Requests that give no answer at all (DNS error, timeout, refused connection) are listed in the `FAILED_URLS` record of the run and are **not charged**. A response with an error status such as 404 or 500 is still a response and is saved and charged. Callbacks are not charged.

### Limitations

- This is a plain HTTP client. It does not run JavaScript, does not solve CAPTCHAs and does not get around bot protection. Sites that block automated requests will answer 403 or a challenge page.
- Text bodies are cut at **Max body characters** (default 200,000). Binary bodies over 1 MB are not stored.
- Requests with 429, 502, 503 or 504 are retried up to **Max retries** times.
- A callback that fails is retried twice with a short wait, then logged; it never stops the run, and the response is still in the dataset.
- Use it only for URLs and data you are allowed to access.

### Integrations

Works with every Apify integration: API, webhooks, Zapier, Make, Google Sheets, Slack, n8n, LangChain and the Apify MCP server.

### Changelog

- 1.0 update (2026-11-22): new **Requests** list for a batch of different requests in one run (own method, headers, query parameters, body and label per request), shared **Query parameters**, and **Callback URL** to forward each response. Existing inputs work as before.
- 1.0 (2026-11-19): first public release.

# Actor input Schema

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

The http or https URLs to request with the shared method, headers, query parameters and body below. Each URL gives one row in the dataset. Leave empty when you use Requests.

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

Optional batch of different requests in one run. Each item: {"url": "...", "method": "POST", "headers": {...}, "params": {...}, "body": {...} or "text", "label": "my-id"}. Only url is required; missing parts use the shared settings below. The label is copied to the output row so you can match each response to its request. Example: \[{"url": "https://httpbin.org/post", "method": "POST", "body": {"name": "test"}, "label": "row-1"}]

## `method` (type: `string`):

HTTP method used for every URL.

## `headers` (type: `object`):

Request headers as a JSON object, for example {"authorization": "Bearer ..."}. A simple user-agent and accept header are added when you do not set them.

## `params` (type: `object`):

Query parameters added to every URL, for example {"page": 2, "q": "shoes"}. A list value adds the parameter several times. Parameters set inside a request override these.

## `body` (type: `string`):

Request body for POST, PUT, PATCH and DELETE. JSON text gets the content-type application/json unless you set another one in the headers.

## `callbackUrl` (type: `string`):

Optional. Each response row is also sent as JSON with POST to this URL right after it is saved (for example a webhook in Make, Zapier, n8n or your own API). A failing callback is retried twice and never stops the run.

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

Follow 3xx redirects (up to 10) and return the final response. Switch off to see the redirect itself.

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

When the response is JSON, also return it parsed in the json field.

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

How long to wait for each response.

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

How many times to retry a URL after a network error or a 429, 502, 503 or 504 answer.

## `maxBodyChars` (type: `integer`):

Cut text bodies at this length. 0 keeps the whole body.

## `concurrency` (type: `integer`):

How many URLs to request at the same time.

## `proxyConfiguration` (type: `object`):

Optional proxy for the requests. Choose a country to see what the URL returns from there, or switch the proxy off to call from Apify's own servers.

## Actor input object example

```json
{
  "urls": [
    {
      "url": "https://httpbin.org/get"
    }
  ],
  "method": "GET",
  "headers": {},
  "params": {},
  "followRedirects": true,
  "parseJson": true,
  "timeoutSecs": 30,
  "maxRetries": 2,
  "maxBodyChars": 200000,
  "concurrency": 5,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

Dataset with one record per result.

## `responsesCsv` (type: `string`):

The same dataset exported as CSV.

# 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": [
        {
            "url": "https://httpbin.org/get"
        }
    ],
    "headers": {},
    "params": {},
    "timeoutSecs": 30,
    "maxRetries": 2,
    "maxBodyChars": 200000,
    "concurrency": 5,
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("tamnt67/http-request-tool").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": [{ "url": "https://httpbin.org/get" }],
    "headers": {},
    "params": {},
    "timeoutSecs": 30,
    "maxRetries": 2,
    "maxBodyChars": 200000,
    "concurrency": 5,
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("tamnt67/http-request-tool").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": [
    {
      "url": "https://httpbin.org/get"
    }
  ],
  "headers": {},
  "params": {},
  "timeoutSecs": 30,
  "maxRetries": 2,
  "maxBodyChars": 200000,
  "concurrency": 5,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call tamnt67/http-request-tool --silent --output-dataset

```

## MCP server setup

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

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/pB7SqKMNwREHlleZk/builds/TgDGTV5mnE6vY05tf/openapi.json
