# HTTP API - Flexible Client for Prototyping and Automation (`superlativetech/http-api`) Actor

Easily test, integrate, and automate APIs—configure method, headers, query params, body, timeout, and retries, no code or setup required. Ideal for rapid prototyping, endpoint monitoring, workflows, and sales & marketing automation.

- **URL**: https://apify.com/superlativetech/http-api.md
- **Developed by:** [Superlative](https://apify.com/superlativetech) (community)
- **Categories:** Automation, Developer tools, Open source
- **Features:** Limited permissions, Single-tenant, Server interface
- **Stats:** 293 total users, 25 monthly users, 82.5% runs succeeded, 10 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

## 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 API

Make HTTP requests to any API endpoint. Supports GET, POST, PUT, PATCH, DELETE with custom headers, query parameters, and request bodies.

### What does HTTP API do?

HTTP API lets you call any REST API from your Apify workflows — no code required.

- **All HTTP methods** — GET, POST, PUT, PATCH, DELETE
- **Custom headers** — Authentication tokens, content types, custom headers
- **Query parameters** — Build URLs with dynamic parameters
- **Request bodies** — Send JSON, form data, or raw payloads
- **Configurable retries** — Automatic retry with exponential backoff
- **Response metadata** — Optionally capture timing, headers, and retry info
- **[Instant API mode](#standby-mode-instant-api)** — Sub-second HTTP proxying via Standby server

### Use with AI Agents

Available as an MCP tool via the [Apify MCP Server](https://mcp.apify.com).

| Property | Value |
| --- | --- |
| Actor ID | `superlativetech/http-api` |
| Standby URL | `https://superlativetech--http-api.apify.actor` |
| Input | `endpoint` (string, required), `method`, `headers`, `querystring`, `body` |
| Output | `{status, statusText, response, headers, meta}` |
| Pricing | Free — you only pay standard Apify platform usage |

#### Output schema

```json
{ "status": 200, "statusText": "OK", "response": { "data": "..." } }
```

#### Standby (instant API)

Standby is POST-only; a GET returns the landing page.

```
POST https://superlativetech--http-api.apify.actor?token=TOKEN
Content-Type: application/json

{"endpoint": "https://api.example.com/data", "method": "GET"}
```

### Why use HTTP API?

Sometimes you need to call an external API as part of a workflow — fetch data, trigger a webhook, or update a record. HTTP API handles that without writing code.

#### Use cases

- **Webhook triggers** — POST to Slack, Discord, or custom webhooks
- **API integrations** — Call any REST API that doesn't have a dedicated Apify actor
- **Data fetching** — GET data from public APIs to enrich your datasets
- **CRM updates** — PUT or PATCH records in HubSpot, Salesforce, or custom systems
- **Testing & debugging** — Validate API endpoints before building integrations

### How to use HTTP API

1. Enter the API endpoint URL
2. Select the HTTP method (GET, POST, etc.)
3. Add headers and query parameters as needed
4. Click **Start** and view the response

#### Simple GET request

```json
{
  "method": "GET",
  "endpoint": "https://catfact.ninja/fact"
}
```

**Response:**

```json
{
  "status": 200,
  "statusText": "OK",
  "response": { "fact": "Cats make about 100 different sounds.", "length": 37 }
}
```

#### POST with headers and body

```json
{
  "method": "POST",
  "endpoint": "https://postman-echo.com/post",
  "headers": [
    { "key": "Content-Type", "value": "application/json" },
    { "key": "Authorization", "value": "Bearer your-token" }
  ],
  "body": "{\"message\":\"Hello from Apify!\"}",
  "include_meta": true
}
```

### Standby mode (instant API)

Standby mode keeps a warm container running so you get instant HTTP proxying without cold-start delays. Instead of starting a full Actor run, you POST a JSON body describing the request and get results in milliseconds.

This is ideal for:

- **Clay enrichment steps** — single API calls inline
- **Make / n8n HTTP modules** — real-time API proxying in workflows
- **MCP agents** — AI tools that need instant HTTP access

#### Standby URL

```
https://superlativetech--http-api.apify.actor?token=YOUR_API_TOKEN
```

Or use a Bearer token in the `Authorization` header instead of the `token` query parameter.

#### Simple GET proxy

```bash
curl -X POST "https://superlativetech--http-api.apify.actor?token=YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"endpoint": "https://catfact.ninja/fact"}'
```

#### POST with headers and body

```bash
curl -X POST "https://superlativetech--http-api.apify.actor?token=YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "method": "POST",
    "endpoint": "https://postman-echo.com/post",
    "headers": {"Content-Type": "application/json", "Authorization": "Bearer your-token"},
    "body": "{\"message\":\"Hello from Apify!\"}",
    "include_meta": true
  }'
```

#### Request body parameters

| Parameter | Required | Default | Description |
| --- | --- | --- | --- |
| `endpoint` | Yes | — | Target API endpoint URL |
| `method` | No | `GET` | HTTP method: GET, POST, PUT, PATCH, DELETE |
| `headers` | No | — | HTTP headers as `{key: value}` or `[{key, value}]` |
| `querystring` | No | — | Query parameters as `{key: value}` or `[{key, value}]` |
| `body` | No | — | Raw request body (JSON string, form data, etc.) |
| `timeoutSeconds` | No | `30` | Request timeout in seconds |
| `maxRetries` | No | `3` | Retry attempts on network failures |
| `response_headers` | No | `false` | Include response headers in output |
| `include_meta` | No | `false` | Include timing and retry metadata |

#### Response format

Success — same shape as batch output:

```json
{
  "status": 200,
  "statusText": "OK",
  "response": { "fact": "Cats make about 100 different sounds.", "length": 37 }
}
```

#### Error responses

| Code | Cause |
| --- | --- |
| 400 | Missing `endpoint`, invalid JSON request body, or invalid JSON in `body` field |
| 405 | Non-POST request |
| 502 | Target endpoint unreachable after all retries |

HTTP errors from the target (4xx/5xx) are returned in the response with status code 200 — consistent with batch mode.

### How many requests can you make?

Each Actor run makes one HTTP request. For batch requests, run the Actor multiple times or use it within a larger workflow.

### How much will it cost you?

This Actor is **free to use** — there are no per-result charges. You only pay for the Apify platform compute your runs consume, which is typically negligible.

### Input parameters

| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
| `endpoint` | string | — | API endpoint URL (required) |
| `method` | string | `GET` | HTTP method: GET, POST, PUT, PATCH, DELETE |
| `querystring` | array/object | — | Query parameters as `[{key, value}]` or `{key: value}` |
| `headers` | array/object | — | HTTP headers as `[{key, value}]` or `{key: value}` |
| `body` | string | — | Raw request body (JSON string, form data, etc.) |
| `timeoutSeconds` | integer | `30` | Request timeout in seconds |
| `maxRetries` | integer | `3` | Retry attempts on network failures |
| `response_headers` | boolean | `false` | Include response headers in output |
| `include_meta` | boolean | `false` | Include timing and retry metadata |

### During the Actor run

The Actor makes the HTTP request and captures the response. If the request fails due to network issues, it retries with exponential backoff up to `maxRetries` times.

- **HTTP errors (4xx/5xx)** — Returned in the dataset with status code; does not fail the Actor
- **Network failures** — Retried automatically; fails only after all retries exhausted
- **Invalid JSON body** — Fails fast if `Content-Type: application/json` is set with invalid JSON

### Output format

Each run produces one record in the dataset:

```json
{
  "status": 200,
  "statusText": "OK",
  "response": { "data": "..." },
  "headers": { "content-type": "application/json" },
  "meta": { "requestTimestamp": "2026-01-29T12:00:00.000Z", "durationMs": 123, "attempts": 1 }
}
```

| Field | Description |
| --- | --- |
| `status` | HTTP status code |
| `statusText` | HTTP status text (e.g., "OK", "Not Found") |
| `response` | Parsed response body |
| `headers` | Response headers (if `response_headers: true`) |
| `meta` | Timing and retry info (if `include_meta: true`) |

### Integrations

HTTP API works with any tool that can call Apify Actors:

- **Clay** — Call APIs as part of your enrichment workflow
- **Make** — Use the Apify module to make HTTP requests
- **Zapier** — Trigger API calls from your Zaps
- **n8n** — Self-hosted workflow automation

### Using HTTP API with the Apify API

The Apify API gives you programmatic access to run Actors, retrieve results, and manage datasets.

**Node.js:**

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: 'YOUR_API_TOKEN' });

const run = await client.actor('superlativetech/http-api').call({
  method: 'GET',
  endpoint: 'https://api.example.com/data',
  headers: [{ key: 'Authorization', value: 'Bearer token' }]
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items[0].response);
```

**Python:**

```python
from apify_client import ApifyClient

client = ApifyClient('YOUR_API_TOKEN')

run = client.actor('superlativetech/http-api').call(run_input={
    'method': 'GET',
    'endpoint': 'https://api.example.com/data',
    'headers': [{'key': 'Authorization', 'value': 'Bearer token'}]
})

items = client.dataset(run['defaultDatasetId']).list_items().items
print(items[0]['response'])
```

Check out the [Apify API reference](https://docs.apify.com/api) for full details, or click the **API** tab above for more code examples.

### Your feedback

We're always improving our Actors. If you have feature requests, find a bug, or need help with a specific use case, please [open an issue](https://console.apify.com/actors/gzqR1SiIS4QNzjMcq/issues) in the Actor's Issues tab.

When Apify asks to share your run data with us, we encourage you to opt in — it's the fastest way for us to spot edge cases and improve results. Sharing is completely optional (you can toggle it anytime under [Account Settings → Privacy](https://console.apify.com/account#/privacy)), and shared runs are automatically deleted by Apify based on your plan's data retention period. We only use shared data to debug issues and improve this Actor.

### Leave a review

If HTTP API helps with your workflows, please [leave a review](https://console.apify.com/actors/gzqR1SiIS4QNzjMcq). Your feedback helps other users discover the tool and helps us understand what's working well.

***

### More from Superlative

- **[DNS Lookup](https://apify.com/superlativetech/dns-lookup?fpr=8e9l1)** — DNS records: A, AAAA, MX, CNAME, TXT, NS, SOA, DMARC, and reverse lookups
- **[WHOIS Lookup](https://apify.com/superlativetech/whois-lookup?fpr=8e9l1)** — Domain registration data: registrar, dates, domain age, registrant, name servers

Built by Superlative

# Actor input Schema

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

HTTP method

## `endpoint` (type: `string`):

API endpoint URL

## `querystring` (type: `array`):

Querystring parameters

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

Body of the API call

## `headers` (type: `array`):

HTTP headers to send with the API call

## `response_headers` (type: `boolean`):

If checked, include response headers sent in the output

## `timeoutSeconds` (type: `integer`):

How long to wait before aborting the HTTP request

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

Number of times to retry on network failures

## `include_meta` (type: `boolean`):

If true, include timing & retry metadata in the output

## Actor input object example

```json
{
  "method": "GET",
  "endpoint": "https://catfact.ninja/fact",
  "response_headers": false,
  "timeoutSeconds": 30,
  "maxRetries": 3,
  "include_meta": false
}
```

# 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 = {
    "method": "GET",
    "endpoint": "https://catfact.ninja/fact"
};

// Run the Actor and wait for it to finish
const run = await client.actor("superlativetech/http-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 = {
    "method": "GET",
    "endpoint": "https://catfact.ninja/fact",
}

# Run the Actor and wait for it to finish
run = client.actor("superlativetech/http-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 '{
  "method": "GET",
  "endpoint": "https://catfact.ninja/fact"
}' |
apify call superlativetech/http-api --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,superlativetech/http-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/gzqR1SiIS4QNzjMcq/builds/Xdr3hDY1AIXh4cuib/openapi.json
