{
  "openapi": "3.0.1",
  "info": {
    "title": "HTTP Request Runner: Single or Bulk API Calls with curl Import",
    "description": "Send one API call or thousands per run. Paste curl commands, fill URL templates from your rows, follow pagination, retry safely and extract JSON fields. Works with Clay, n8n, Make and Zapier. Private and cloud-metadata addresses are always blocked, so agents can use it safely.",
    "version": "0.0",
    "x-build-id": "FH1Y15GEADn7G6Gg7"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/getascraper~http-request-runner/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-getascraper-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/getascraper~http-request-runner/runs": {
      "post": {
        "operationId": "runs-sync-getascraper-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/getascraper~http-request-runner/run-sync": {
      "post": {
        "operationId": "run-sync-getascraper-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": "The address to call, including https://. For one request this is all you need. Private network and cloud-metadata addresses are always blocked.",
            "default": "https://jsonplaceholder.typicode.com/todos/1"
          },
          "method": {
            "title": "HTTP method",
            "enum": [
              "GET",
              "POST",
              "PUT",
              "PATCH",
              "DELETE",
              "HEAD",
              "OPTIONS"
            ],
            "type": "string",
            "description": "Method for this request, and the default for every batch request that does not set its own. If you add a body and leave GET selected, POST is used.",
            "default": "GET"
          },
          "headers": {
            "title": "Headers",
            "type": "object",
            "description": "Request headers as key-value pairs, applied to every request in the run. A batch request can override single keys. Headers often carry tokens, so this field is stored encrypted and hidden in saved tasks."
          },
          "params": {
            "title": "Query parameters",
            "type": "object",
            "description": "Query-string parameters added to the URL. Parameters already in the URL are kept, and a key set here replaces the same key in the URL.",
            "default": {}
          },
          "data": {
            "title": "Request body",
            "type": "object",
            "description": "JSON body for POST, PUT and PATCH. It is sent as JSON, or as a form when you set the content-type header to application/x-www-form-urlencoded.",
            "default": {}
          },
          "rowId": {
            "title": "Row ID",
            "type": "string",
            "description": "Any identifier you want echoed back on the result row as lookupKey, so you can join the response to the row it came from in Clay, n8n, Make or Sheets.",
            "default": ""
          },
          "requests": {
            "title": "Request objects",
            "type": "array",
            "description": "Array of request objects: id (or lookupKey), label, url, method, headers, params, data, expectedStatusCodes, expectedBodyContains. Only url is required. Run-level method, headers, params and data act as defaults.",
            "default": []
          },
          "urls": {
            "title": "List of URLs",
            "type": "array",
            "description": "URLs to fetch with the run-level method, headers and settings. Add them one by one, paste many, or upload a text file.",
            "default": [],
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "urlTemplate": {
            "title": "URL template",
            "type": "string",
            "description": "A URL with {{placeholders}}, for example https://api.example.com/users/{{id}}. One request is created for every row in Template values. Values are URL-encoded automatically.",
            "default": ""
          },
          "templateValues": {
            "title": "Template values",
            "type": "array",
            "description": "Rows that fill the template. Use plain values (available as {{value}}) or objects such as {\"id\": 42, \"name\": \"Ada\"}. Placeholders also work inside headers and the request body.",
            "default": []
          },
          "curlCommand": {
            "title": "Import from curl",
            "type": "string",
            "description": "Paste one or more curl commands copied from browser DevTools, Postman or a terminal. Each one becomes a request. Stored encrypted and hidden in saved tasks, because curl commands often contain tokens and cookies."
          },
          "paginationMode": {
            "title": "Pagination type",
            "enum": [
              "none",
              "pageNumber",
              "offset",
              "nextUrl",
              "cursor"
            ],
            "type": "string",
            "description": "How to reach the next page: increase a page number, increase an offset, follow a next URL from the response (or a Link header), or pass a cursor from the response.",
            "default": "none"
          },
          "maxPages": {
            "title": "Max pages",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Stop after this many pages per request. Set 1 to fetch only the first page.",
            "default": 1
          },
          "pageParam": {
            "title": "Page parameter name",
            "type": "string",
            "description": "Query parameter that carries the page number, offset or cursor. Defaults to page, offset or cursor depending on the pagination type.",
            "default": ""
          },
          "pageStart": {
            "title": "First page or offset",
            "minimum": 0,
            "maximum": 1000000000,
            "type": "integer",
            "description": "Value of the page parameter on the first request. Leave empty to start at 1 for page numbers and at 0 for offsets."
          },
          "pageSize": {
            "title": "Offset step",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "How much the offset grows per page. Match the page size your API returns.",
            "default": 100
          },
          "nextPagePath": {
            "title": "Next page path",
            "type": "string",
            "description": "Path to the next URL or cursor in the JSON response, for example next or meta.nextCursor. For Next URL pagination, leave empty to use the Link header.",
            "default": ""
          },
          "stopWhenEmptyPath": {
            "title": "Stop when empty path",
            "type": "string",
            "description": "Path to the list of items in the JSON response, for example results or data.items. Pagination stops at the first page where this list is empty, and that empty page is not returned.",
            "default": ""
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Maximum number of requests running at the same time. Lower it if the target API rejects bursts.",
            "default": 10
          },
          "requestsPerSecond": {
            "title": "Requests per second",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "Extra rate limit on top of concurrency, applied to every attempt including retries. 0 means no throttle.",
            "default": 0
          },
          "dedupeRequests": {
            "title": "Skip duplicate requests",
            "type": "boolean",
            "description": "Drop requests that repeat the same method, URL, parameters and body, so you are not charged twice for the same call.",
            "default": false
          },
          "timeoutSecs": {
            "title": "Timeout per attempt",
            "minimum": 1,
            "maximum": 120,
            "type": "integer",
            "description": "Seconds to wait for a complete response before the attempt counts as failed.",
            "default": 30
          },
          "maxRetries": {
            "title": "Max retries",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Extra attempts after a network error or a retryable status, with exponential backoff. A Retry-After header from the server is respected.",
            "default": 2
          },
          "retryOnStatusCodes": {
            "title": "Retry on status codes",
            "type": "array",
            "description": "Response status codes that trigger a retry. Other 4xx codes mean the request itself is wrong and are not retried.",
            "default": [
              408,
              425,
              429,
              500,
              502,
              503,
              504
            ]
          },
          "retryUnsafeMethods": {
            "title": "Retry POST and PATCH on server errors",
            "type": "boolean",
            "description": "By default POST and PATCH are only retried when the server clearly did not process them (429, 503, connection refused), so an order or payment is never sent twice. Turn on to retry them like other methods.",
            "default": false
          },
          "followRedirects": {
            "title": "Follow redirects",
            "type": "boolean",
            "description": "Automatically follow HTTP redirects. Every hop is checked against the private-network block.",
            "default": true
          },
          "maxRedirects": {
            "title": "Max redirects",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "Maximum redirect hops to follow per request.",
            "default": 5
          },
          "ignoreTlsErrors": {
            "title": "Ignore TLS certificate errors",
            "type": "boolean",
            "description": "Accept expired, self-signed or mismatched certificates. Use only for staging servers you trust.",
            "default": false
          },
          "parseJson": {
            "title": "Parse JSON responses",
            "type": "boolean",
            "description": "Parse JSON responses into a structured json field you can read directly, instead of only raw text.",
            "default": true
          },
          "extract": {
            "title": "Extract fields",
            "type": "object",
            "description": "Pull values out of JSON responses into an extracted object. Map a name to a path, for example {\"title\": \"data.title\", \"ids\": \"data.items[*].id\"}. Supports dots, [0], [*] and quoted keys.",
            "default": {}
          },
          "bodyMode": {
            "title": "Response body output",
            "enum": [
              "auto",
              "none",
              "keyValueStore"
            ],
            "type": "string",
            "description": "Auto keeps the body in the row, None returns only status and timing, and Key-value store saves every full body to storage and links it from the row.",
            "default": "auto"
          },
          "maxResponseBytes": {
            "title": "Max inline body size",
            "minimum": 1000,
            "maximum": 10000000,
            "type": "integer",
            "description": "Bodies larger than this are cut in the row. Combine with the option below to keep the full content in storage.",
            "default": 1000000
          },
          "saveOversizedBodyToKeyValueStore": {
            "title": "Save oversized and binary bodies",
            "type": "boolean",
            "description": "Store bodies that are too large or binary (images, PDFs, archives) in the key-value store and link them in bodyStoredKey instead of cutting them.",
            "default": true
          },
          "includeResponseHeaders": {
            "title": "Include response headers",
            "type": "boolean",
            "description": "Add the response headers to every row. Turn off to keep rows small on large batches.",
            "default": true
          },
          "failOnErrorStatus": {
            "title": "Fill error for non-2xx",
            "type": "boolean",
            "description": "Also fill the error field when the response is not 2xx. The row is returned either way.",
            "default": false
          },
          "expectedStatusCodes": {
            "title": "Expected status codes",
            "type": "array",
            "description": "If set, every response is checked against this list and the row gets assertionPassed. Useful for uptime and contract checks. A per-request list overrides it.",
            "default": []
          },
          "expectedBodyContains": {
            "title": "Expected text in body",
            "type": "string",
            "description": "If set, the response body must contain this text for assertionPassed to be true.",
            "default": ""
          },
          "authType": {
            "title": "Default authentication",
            "enum": [
              "none",
              "bearer",
              "basic"
            ],
            "type": "string",
            "description": "Adds an Authorization header to all requests that do not already set one.",
            "default": "none"
          },
          "authBearerToken": {
            "title": "Bearer token",
            "type": "string",
            "description": "Used when Default authentication is Bearer token."
          },
          "authBasicUsername": {
            "title": "Basic auth username",
            "type": "string",
            "description": "Used when Default authentication is Basic auth."
          },
          "authBasicPassword": {
            "title": "Basic auth password",
            "type": "string",
            "description": "Used when Default authentication is Basic auth."
          },
          "secretHeaders": {
            "title": "Secret headers",
            "type": "object",
            "description": "Same as Headers, kept for existing tasks: headers that carry keys or tokens, for example {\"X-API-Key\": \"...\"}. Stored encrypted, hidden in saved tasks, and masked in result rows."
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Choose proxy groups and a country for geo-specific responses. Residential routing reads at most 64 KB of each response.",
            "default": {
              "useApifyProxy": false
            }
          },
          "proxyRouting": {
            "title": "When to use the proxy",
            "enum": [
              "always",
              "fallback"
            ],
            "type": "string",
            "description": "Always sends everything through the proxy. Only when blocked tries each request directly first and switches to the proxy after a 403, 429 or network failure.",
            "default": "always"
          },
          "proxyRotation": {
            "title": "IP rotation",
            "enum": [
              "perRequest",
              "perRun"
            ],
            "type": "string",
            "description": "A new IP for every request, or one sticky IP for the whole run (useful when an API ties a session to an address).",
            "default": "perRequest"
          },
          "clientProfile": {
            "title": "Browser identity",
            "enum": [
              "auto",
              "chrome-desktop",
              "firefox-desktop",
              "safari-desktop",
              "chrome-android",
              "safari-ios",
              "none"
            ],
            "type": "string",
            "description": "Which browser's default headers and TLS behaviour to present. Auto lets the client choose. None sends only the headers you set.",
            "default": "auto"
          },
          "callbackUrl": {
            "title": "Callback URL",
            "type": "string",
            "description": "Each result row is POSTed to this URL as JSON as soon as it completes. Private network addresses are not allowed.",
            "default": ""
          },
          "callbackHeaders": {
            "title": "Callback headers",
            "type": "object",
            "description": "Headers sent with every callback, for example an authorization header for your webhook. Stored encrypted."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}