{
  "openapi": "3.0.1",
  "info": {
    "title": "Bulk HTTP Request Runner: Call Any API or URL from a List",
    "description": "Run a list of HTTP requests or one template over many rows. Retries, JSON capture, per-host rate limits, robots.txt. $0.80 per 1,000. No proxies.",
    "version": "0.1",
    "x-build-id": "jJYzUjsF5s2orcwiv"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ataism~http-runner/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ataism-http-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/ataism~http-runner/runs": {
      "post": {
        "operationId": "runs-sync-ataism-http-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/ataism~http-runner/run-sync": {
      "post": {
        "operationId": "run-sync-ataism-http-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": {
          "requests": {
            "title": "Requests",
            "type": "array",
            "description": "A list of requests. Each item is a URL string or an object with \"url\" and optionally \"method\" (GET, HEAD, POST, PUT, PATCH, DELETE), \"headers\" (object), \"body\" (text, or a JSON object/array) and \"id\" (copied to the result row). Items can use {{field}} placeholders filled from the Rows below. POST, PUT, PATCH and DELETE are only sent to hosts you list in Write hosts. At most 100,000 requests per run."
          },
          "urls": {
            "title": "URLs (one shared request)",
            "type": "array",
            "description": "A plain list of URLs that all use the shared Method, Headers and Body below. URLs can contain {{field}} placeholders filled from Rows (values are percent-encoded in the URL). You can use this together with Requests.",
            "items": {
              "type": "string"
            }
          },
          "rows": {
            "title": "Rows (for {{field}} templates)",
            "type": "array",
            "description": "Optional list of objects, for example [{\"id\": 1, \"name\": \"Ann\"}]. Every request in Requests and URLs is sent once per row, with {{id}}, {{name}} (and dotted paths like {{user.id}}) replaced in the URL, header values and body. A missing field makes that request a free error row. Requests times rows must not exceed 100,000."
          },
          "method": {
            "title": "Shared method",
            "enum": [
              "GET",
              "HEAD",
              "POST",
              "PUT",
              "PATCH",
              "DELETE"
            ],
            "type": "string",
            "description": "Method for URLs and for requests that do not set their own. POST, PUT, PATCH and DELETE need Write hosts.",
            "default": "GET"
          },
          "headers": {
            "title": "Shared headers",
            "type": "object",
            "description": "Headers sent with every request, for example your own API key: {\"Authorization\": \"Bearer ...\"}. Values are never logged and never saved in the results (rows list header names only). The User-Agent header cannot be set: the Actor always sends its own honest User-Agent (use User agent suffix to add text). Host, Content-Length and proxy headers are not allowed. Headers are dropped when a redirect leads to another origin. Method-override, client-address (Forwarded, X-Forwarded-*, True-Client-IP, anything with client-ip, real-ip, user-ip or remote-addr in its name, ...) and routing headers (Via, X-Host, X-Http-Host, X-Override-URL, X-Original-*, X-Envoy-*, ...) are not allowed, and header values may only contain characters up to U+00FF. A server may echo headers back in its response body, which is saved as the response."
          },
          "body": {
            "title": "Shared body (text or JSON)",
            "type": "string",
            "description": "Body for POST, PUT, PATCH and DELETE requests that do not set their own. Text that is a JSON object or array is sent as application/json (set a Content-Type header to override). {{field}} is filled from Rows. At most 1 MB. GET and HEAD cannot have a body."
          },
          "writeHosts": {
            "title": "Write hosts",
            "type": "array",
            "description": "Exact host names that may receive POST, PUT, PATCH and DELETE, for example api.example.com. No wildcards. A write request to any other host is not sent (free write-host-not-allowed row). Only list hosts you are allowed to write to. Write requests are never redirected to another host.",
            "items": {
              "type": "string"
            }
          },
          "requestsPerSecondPerHost": {
            "title": "Requests per second per host",
            "minimum": 0.2,
            "maximum": 5,
            "type": "number",
            "description": "How fast one host is called. Default 1, from 0.2 to 5 at 256 MB. The minimum rises with the run's memory so one wait never costs more than 10% of the request price: 0.37 at 512 MB, 0.73 at 1,024 MB (a lower value is raised, with a warning in the log). The limit applies to the registrable domain and to the IP address, so a.example.com and b.example.com, or two names for one server, share it. Retries, redirects and robots.txt count. A robots.txt Crawl-delay slows a host further and is never shortened. There is also a cap of 10,000 requests per host (registrable domain) per run and at most 10 requests in flight overall.",
            "default": 1
          },
          "timeoutSecs": {
            "title": "Timeout (seconds)",
            "minimum": 1,
            "maximum": 120,
            "type": "integer",
            "description": "Per request, including redirects. Time spent waiting for the rate limit or a Crawl-delay is not counted. A timeout is a free error row.",
            "default": 30
          },
          "maxRetries": {
            "title": "Retries",
            "minimum": 0,
            "maximum": 3,
            "type": "integer",
            "description": "Retries (at most 3) after a network error, timeout, 5xx or 429, with growing waits that honour Retry-After. GET, HEAD, PUT and DELETE are retried on all of these; POST and PATCH only on 429 (unless you turn on Retry unsafe methods). Refusals (401, 403, challenge pages) are never retried.",
            "default": 2
          },
          "maxRetryAfterSecs": {
            "title": "Longest Retry-After to wait (seconds)",
            "minimum": 0,
            "maximum": 30,
            "type": "integer",
            "description": "If a server asks to wait longer than this, the request is not retried and its row is free (status 429, error code refused).",
            "default": 30
          },
          "retryNonIdempotent": {
            "title": "Retry unsafe methods",
            "type": "boolean",
            "description": "Also retry POST and PATCH after timeouts, network errors and 5xx. Only turn this on if sending the same request twice is harmless.",
            "default": false
          },
          "followRedirects": {
            "title": "Follow redirects",
            "type": "boolean",
            "description": "Follow 301, 302, 303, 307 and 308 (every hop is checked again: public address only, platform hosts, robots.txt for GET and HEAD). Write requests are followed only within the same origin.",
            "default": true
          },
          "maxRedirects": {
            "title": "Max redirects",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "At most 5.",
            "default": 5
          },
          "captureBody": {
            "title": "Response body",
            "enum": [
              "auto",
              "text",
              "none"
            ],
            "type": "string",
            "description": "auto: JSON responses are parsed into the body field, other text is kept as text. text: always text. none: status and headers only. Binary responses are not saved (bodyOmitted: binary).",
            "default": "auto"
          },
          "maxBodyKb": {
            "title": "Max body size (KB)",
            "minimum": 1,
            "maximum": 1024,
            "type": "integer",
            "description": "Per response, default 256, maximum 1,024. Longer bodies are cut and the row says truncated: true.",
            "default": 256
          },
          "responseHeaders": {
            "title": "Response headers",
            "enum": [
              "common",
              "all",
              "none"
            ],
            "type": "string",
            "description": "common: a short list (content-type, content-length, cache-control, etag, location, retry-after, rate-limit headers, ...). all: every header, at most 50, values cut at 2,000 characters. none: no headers. Headers with names like set-cookie, authorization, token or secret are saved as [redacted].",
            "default": "common"
          },
          "responseHeaderNames": {
            "title": "Only these response headers",
            "type": "array",
            "description": "Optional list of header names. When set, only these are saved (redaction still applies).",
            "items": {
              "type": "string"
            }
          },
          "maxConcurrency": {
            "title": "Max requests in flight",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Across all hosts. At most 10.",
            "default": 10
          },
          "allowSlowHosts": {
            "title": "Allow slow hosts",
            "type": "boolean",
            "description": "Off: GET and HEAD requests to a host whose robots.txt asks for a Crawl-delay above 3 seconds are skipped (free slow-host rows), because waiting makes the run slow and its run-time cost approaches the request price. On: delays up to 5.5 seconds are honoured in full (never shortened) and the waiting is billed as run time. Hosts asking for more than 5.5 seconds are always skipped. Both limits shrink with memory (multiply by 256, divide by the run's MB).",
            "default": false
          },
          "userAgentSuffix": {
            "title": "User agent suffix",
            "type": "string",
            "description": "Text appended after the Actor's own User-Agent (http-runner-actor/0.1 (https://apify.com/ataism/http-runner)), for example the name of your project, so a server operator can tell who is calling. The Actor's own User-Agent cannot be replaced. Do not put personal data here."
          },
          "maxDurationMinutes": {
            "title": "Max duration (minutes)",
            "minimum": 1,
            "maximum": 720,
            "type": "integer",
            "description": "The run stops cleanly at this time and keeps the results so far. Default 240.",
            "default": 240
          },
          "mode": {
            "title": "Mode",
            "type": "string",
            "description": "Internal: \"selfTest\" runs the maintainer health check and saves no items.",
            "default": "run"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}