{
  "openapi": "3.0.1",
  "info": {
    "title": "HTTP Request — Bulk API Calls for Clay, n8n & Make",
    "description": "Send HTTP requests to any API (GET, POST, PUT, PATCH, DELETE) from Clay, n8n, Make, Zapier or the Apify API: one call or thousands in a batch, with {{variable}} templating, retries, redirects, JSON field extraction and webhook callbacks. A Clay HTTP API alternative at $2 per 1,000 requests.",
    "version": "0.1",
    "x-build-id": "e4HfSmXUsev5CKsYy"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/actor-forge~http-request-runner/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-actor-forge-http-request-runner",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/actor-forge~http-request-runner/runs": {
      "post": {
        "operationId": "runs-sync-actor-forge-http-request-runner",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/actor-forge~http-request-runner/run-sync": {
      "post": {
        "operationId": "run-sync-actor-forge-http-request-runner",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "url": {
            "title": "URL",
            "type": "string",
            "description": "URL for a single request (http or https). Supports {{field}} placeholders filled from Variables. Leave empty when you use Requests (batch)."
          },
          "method": {
            "title": "HTTP method",
            "enum": [
              "GET",
              "POST",
              "PUT",
              "PATCH",
              "DELETE",
              "HEAD",
              "OPTIONS"
            ],
            "type": "string",
            "description": "HTTP method. If empty: GET, or POST when a body is given."
          },
          "headers": {
            "title": "Headers",
            "type": "object",
            "description": "Request headers as a JSON object, e.g. {\"Content-Type\": \"application/json\"}. Values support {{field}} placeholders. Header values are never written to the run log. Put API keys in the secret Authorization header field below instead, so they are stored encrypted."
          },
          "authorizationHeader": {
            "title": "Authorization header (secret)",
            "type": "string",
            "description": "Optional, stored encrypted. A value like \"Bearer sk_123\" or \"Basic dXNlcjpwYXNz\" is sent as the Authorization header; \"X-Api-Key: abc123\" (name: value) sends that header instead. Added to every request and overrides the same header in Headers."
          },
          "queryParams": {
            "title": "Query parameters",
            "type": "object",
            "description": "Query string parameters as a JSON object, URL-encoded and appended to the URL. Arrays repeat the key (tags=a&tags=b). Alias: params."
          },
          "body": {
            "title": "Body (raw)",
            "type": "string",
            "description": "Raw request body, e.g. a JSON string or form data. A body starting with { or [ is sent as application/json unless you set Content-Type. Placeholders in JSON bodies are JSON-escaped automatically."
          },
          "data": {
            "title": "Body (JSON)",
            "type": "object",
            "description": "Request body as a JSON object (sent as application/json, or form-encoded when Content-Type is application/x-www-form-urlencoded). A string that is exactly one placeholder, like \"{{count}}\", keeps the variable's type. Used when Body (raw) is empty."
          },
          "contentType": {
            "title": "Content type",
            "type": "string",
            "description": "Shortcut for the Content-Type header, e.g. application/json; charset=utf-8."
          },
          "requests": {
            "title": "Requests (batch)",
            "type": "array",
            "description": "List of requests: URL strings or objects {url, method, headers, queryParams, body, lookupKey}. Each item inherits the top-level settings and can override them."
          },
          "variables": {
            "title": "Variables",
            "type": "array",
            "description": "List of objects, e.g. [{\"domain\": \"stripe.com\"}, {\"domain\": \"notion.so\"}]. Every request is sent once per row with {{domain}} replaced. Dot paths work ({{company.name}}, {{tags[0]}}); {{{field}}} inserts raw. A row's lookupKey field is copied to its result."
          },
          "lookupKey": {
            "title": "Lookup key",
            "type": "string",
            "description": "Optional identifier copied to the result row and the callback, e.g. the Clay row ID, so you can match responses to rows."
          },
          "extract": {
            "title": "Extract fields",
            "type": "array",
            "description": "Paths to pull out of JSON responses into the extracted column, e.g. data.items[0].email, results[*].id or email=data.items[0].email (alias=path names the key). Absent paths give null.",
            "items": {
              "type": "string"
            }
          },
          "responseFormat": {
            "title": "Response format",
            "enum": [
              "auto",
              "json",
              "text",
              "base64"
            ],
            "type": "string",
            "description": "How the response body is returned.",
            "default": "auto"
          },
          "maxResponseBytes": {
            "title": "Max response size (bytes)",
            "minimum": 1024,
            "maximum": 9437184,
            "type": "integer",
            "description": "Bodies larger than this are cut off and flagged bodyTruncated. Default 2 MB, maximum 9 MB (the dataset item limit).",
            "default": 2097152
          },
          "includeHeaders": {
            "title": "Include response headers",
            "type": "boolean",
            "description": "Return response headers (names lowercased).",
            "default": true
          },
          "includeBody": {
            "title": "Include response body",
            "type": "boolean",
            "description": "Return the response body. Turn off when you only need status and extracted fields (smaller rows).",
            "default": true
          },
          "timeoutSecs": {
            "title": "Timeout per request (seconds)",
            "minimum": 1,
            "maximum": 120,
            "type": "integer",
            "description": "Maximum time for one attempt (connect, headers and body). Default 30. (alias: responseTimeout in milliseconds)"
          },
          "retries": {
            "title": "Retries",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Retries on network errors, timeouts, 429 and 5xx, with exponential backoff and Retry-After. POST and PATCH are only retried when the server certainly did not process them (429, 503, connection refused). Default 2. (alias: retryOnFailure + maxRetries)"
          },
          "followRedirects": {
            "title": "Follow redirects",
            "type": "boolean",
            "description": "Follow 3xx redirects (up to Max redirects). Off: the 3xx response itself is returned.",
            "default": true
          },
          "maxRedirects": {
            "title": "Max redirects",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Maximum redirect hops per request.",
            "default": 10
          },
          "concurrency": {
            "title": "Concurrency",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Requests in flight at once across all hosts.",
            "default": 5
          },
          "maxConcurrencyPerHost": {
            "title": "Max concurrency per host",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Requests in flight at once to the same host, to stay under API rate limits.",
            "default": 5
          },
          "failOnHttpError": {
            "title": "Fail run on errors",
            "type": "boolean",
            "description": "Mark the run as FAILED if any request got a non-2xx status, a network error or was invalid (rows are still saved). Default off: the status is recorded and the run succeeds.",
            "default": false
          },
          "callbackUrl": {
            "title": "Callback URL",
            "type": "string",
            "description": "Optional: each result row is also POSTed as JSON to this URL (e.g. a Clay table webhook, n8n or Make webhook). Supports {{field}} placeholders."
          },
          "callbackHeaders": {
            "title": "Callback headers",
            "type": "object",
            "description": "Headers for the callback request, e.g. {\"x-clay-webhook-auth\": \"...\"}."
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}