HTTP API - Flexible Client for Prototyping and Automation avatar
HTTP API - Flexible Client for Prototyping and Automation

Pricing

from $0.14 / 1,000 results

Go to Apify Store
HTTP API - Flexible Client for Prototyping and Automation

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.

Pricing

from $0.14 / 1,000 results

Rating

0.0

(0)

Developer

Superlative

Superlative

Maintained by Community

Actor stats

8

Bookmarked

53

Total users

1

Monthly active users

21 hours ago

Last modified

Share

HTTP API

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

ParameterTypeRequiredDefaultDescription
endpointstring✅ YesAPI endpoint URL (e.g. https://api.example.com/v1/data).
methodstring✅ YesGETHTTP method: GET, POST, PUT, PATCH, DELETE.
querystringarray or objectNoQuery parameters. As array of { key, value } pairs or an object { key: value }.
headersarray or objectNoHTTP headers to send. As array of { key, value } pairs or an object { key: value }.
bodystringNoRaw request body (e.g. JSON string). If Content-Type: application/json, actor pre-validates the JSON format.
timeoutSecondsintegerNo30How many seconds to wait before aborting the HTTP request.
maxRetriesintegerNo3Number of retry attempts on network failures (uses exponential backoff).
response_headersbooleanNofalseInclude response headers in the output dataset if true.
include_metabooleanNofalseInclude metadata (meta field) with timing and retry information if true.

Note: The actor will throw an error if endpoint or method is missing, or if a JSON body is invalid when Content-Type: application/json is set.


Output Dataset

Each run pushes one record with the following fields:

FieldTypeDescription
statusintegerHTTP status code of the response.
statusTextstringHTTP status text (e.g. "OK", "Not Found").
responseanyParsed response body (object, string, or raw data).
headersobjectResponse headers (only present if response_headers: true).
metaobjectMetadata 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": { },
"meta": { "requestTimestamp": "2025-04-20T12:00:00.000Z", "durationMs": 123, "attempts": 1 }
}

Advanced Options & Error Handling

  • Timeouts & Retries: Adjust timeoutSeconds and maxRetries 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 in body, 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.

Integrations

This Actor integrates with automation platforms like Clay, Make, Zapier, and n8n.


More from Superlative

  • Superclean Company Names — Transform messy company names into clean formats for cold email personalization and CRM cleanup.
  • DNS Lookup — Query DNS records for any domain. Check MX, A, TXT, CNAME, and other record types.

🔗 superlative.tech