
HTTP API - Flexible Client for Prototyping and Automation
Pricing
$3.99/month + usage

HTTP API - Flexible Client for Prototyping and Automation
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.
0.0 (0)
Pricing
$3.99/month + usage
6
Total users
36
Monthly users
5
Runs succeeded
95%
Last modified
16 days ago
HTTP API
A Apify Actor to make HTTP requests (GET, POST, PUT, PATCH, DELETE) to any API endpoint. Configure headers, query parameters, request body, timeout, retries, and more — no setup or authentication required for public APIs.
🛠️ Features
- All common HTTP methods: GET, POST, PUT, PATCH, DELETE
- Custom headers & query parameters: Pass arrays or objects of key/value pairs
- Raw request body: Send any payload, including JSON or plain text
- Configurable timeout & retries: Set request timeout and retry on failures with exponential backoff
- Optional response metadata: Include timing, retry attempts, and headers in your output
📥 Input Parameters
Provide a JSON object with any of the following fields:
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
endpoint | string | ✅ Yes | — | API endpoint URL (e.g. https://api.example.com/v1/data ). |
method | string | ✅ Yes | GET | HTTP method: GET , POST , PUT , PATCH , DELETE . |
querystring | array or object | ❌ No | — | Query parameters. As array of { key, value } pairs or an object { key: value } . |
headers | array or object | ❌ No | — | HTTP headers to send. As array of { key, value } pairs or an object { key: value } . |
body | string | ❌ No | — | Raw request body (e.g. JSON string). If Content-Type: application/json , actor pre-validates the JSON format. |
timeoutSeconds | integer | ❌ No | 30 | How many seconds to wait before aborting the HTTP request. |
maxRetries | integer | ❌ No | 3 | Number of retry attempts on network failures (uses exponential backoff). |
response_headers | boolean | ❌ No | false | Include response headers in the output dataset if true . |
include_meta | boolean | ❌ No | false | Include metadata (meta field) with timing and retry information if true . |
Note: The actor will throw an error if
endpoint
ormethod
is missing, or if a JSONbody
is invalid whenContent-Type: application/json
is set.
📦 Output Dataset
Each run pushes one record with the following fields:
Field | Type | Description |
---|---|---|
status | integer | HTTP status code of the response. |
statusText | string | HTTP status text (e.g. "OK", "Not Found"). |
response | any | Parsed response body (object, string, or raw data). |
headers | object | Response headers (only present if response_headers: true ). |
meta | object | Metadata with requestTimestamp , durationMs , and attempts (only if include_meta: true ). |
Errors (HTTP status ≥400) do not throw by default: you will still get the response in your dataset, and a warning is logged. Network failures after all retries will throw an error and stop the actor.
🚀 Examples
1. Simple GET (Random Cat Fact)
Input:
{"method": "GET","endpoint": "https://catfact.ninja/fact"}
Output (sample):
{"status": 200,"statusText": "OK","response": { "fact": "Cats make about 100 different sounds.", "length": 29 }}
2. POST with Query & Headers
Input:
{"method": "POST","endpoint": "https://postman-echo.com/post","querystring": [{ "key": "testParam", "value": "hello" }],"headers": [{ "key": "Content-Type", "value": "application/json" },{ "key": "X-Custom-Header", "value": "ApifyTest" }],"body": "{\"message\":\"Hello from Apify actor!\"}","response_headers": true,"include_meta": true}
Output (sample):
{"status": 200,"statusText": "OK","response": { "args": { "testParam": "hello" }, "json": { "message": "Hello from Apify actor!" }, "url": "https://postman-echo.com/post?testParam=hello" },"headers": { /* response headers */ },"meta": { "requestTimestamp": "2025-04-20T12:00:00.000Z", "durationMs": 123, "attempts": 1 }}
🔧 Advanced Options & Error Handling
- Timeouts & Retries: Adjust
timeoutSeconds
andmaxRetries
to control how long the actor waits and how many retry attempts are used for network errors. - Invalid JSON Body: If you set
Content-Type: application/json
in headers and provide an invalid JSON string inbody
, the actor fails fast with an error. - HTTP Errors (4xx/5xx): Responses with status codes ≥400 do not cause the actor to fail — they are logged as warnings and returned in the dataset. To treat them as errors, add custom logic in a workflow or use error handling in your integration.
🧩 Explore More Actors by xyzzy
Boost your automation and intelligence workflows:
-
OpenRouter - Unified LLM Interface for ChatGPT, Claude, Gemini
Use the best AI models (OpenAI, Claude, Gemini, Llama, Mistral) with a single interface. -
DNS Lookup - Forward and Reverse (A, MX, TXT, DMARC, PTR)
Perform standard and reverse DNS lookups easily for domains or IP addresses.
🔗 Visit the full collection on xyzzy's Apify profile