{
  "openapi": "3.0.1",
  "info": {
    "title": "Bulk HTTP Request Runner: retries, pagination & JSONPath",
    "description": "Run thousands of HTTP/API requests from a list or a template: auth (bearer, basic, API key), per-host rate limits, retries with Retry-After, pagination (Link header, cursor, page/offset), JSONPath/JMESPath extraction and HTML-to-Markdown. Secrets are never echoed. By Steadyline Data.",
    "version": "0.1",
    "x-build-id": "Fs9ybCUKE5VbFli1a"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/steadyline~http-request-runner/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-steadyline-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/steadyline~http-request-runner/runs": {
      "post": {
        "operationId": "runs-sync-steadyline-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/steadyline~http-request-runner/run-sync": {
      "post": {
        "operationId": "run-sync-steadyline-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": {
          "requests": {
            "title": "Requests",
            "type": "array",
            "description": "List of {id?, method?, url, headers?, query?, body?}. Body objects are sent as JSON."
          },
          "template": {
            "title": "Request template",
            "type": "object",
            "description": "Optional template with {{placeholders}}, e.g. {\"url\": \"https://api.example.com/users/{{id}}\", \"method\": \"GET\"}. One request per item in Variables."
          },
          "variables": {
            "title": "Template variables",
            "type": "array",
            "description": "List of objects, e.g. [{\"id\": 1}, {\"id\": 2}]. Secrets are not available as variables; use the Authentication fields."
          },
          "globalHeaders": {
            "title": "Global headers",
            "type": "object",
            "description": "Headers added to every request (request headers override).",
            "default": {}
          },
          "authType": {
            "title": "Authentication",
            "enum": [
              "none",
              "bearer",
              "basic",
              "apiKeyHeader"
            ],
            "type": "string",
            "description": "Added to every request. Secret values are redacted from all output.",
            "default": "none"
          },
          "bearerToken": {
            "title": "Bearer token",
            "type": "string",
            "description": "For authType=bearer."
          },
          "basicUsername": {
            "title": "Basic auth username",
            "type": "string",
            "description": "For authType=basic."
          },
          "basicPassword": {
            "title": "Basic auth password",
            "type": "string",
            "description": "For authType=basic."
          },
          "apiKeyHeaderName": {
            "title": "API key header name",
            "type": "string",
            "description": "For authType=apiKeyHeader.",
            "default": "x-api-key"
          },
          "apiKey": {
            "title": "API key",
            "type": "string",
            "description": "For authType=apiKeyHeader."
          },
          "maxConcurrency": {
            "title": "Concurrency",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Parallel requests overall. Hard cap 20.",
            "default": 5
          },
          "ratePerHostPerSec": {
            "title": "Requests per second per host",
            "minimum": 0.1,
            "maximum": 10,
            "type": "number",
            "description": "Hard cap 10/s per host.",
            "default": 2
          },
          "maxRetries": {
            "title": "Max retries",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "Retries on network errors, 408, 425, 429 and 5xx (not 501). Honors Retry-After (capped at 120 s), else exponential backoff with jitter.",
            "default": 3
          },
          "retryBaseMs": {
            "title": "Backoff base (ms)",
            "minimum": 100,
            "maximum": 30000,
            "type": "integer",
            "description": "First retry delay; doubles each attempt.",
            "default": 1000
          },
          "timeoutSecs": {
            "title": "Timeout (s)",
            "minimum": 1,
            "maximum": 300,
            "type": "integer",
            "description": "Per attempt.",
            "default": 30
          },
          "maxRequests": {
            "title": "Max requests (incl. pages)",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Safety cap on recorded requests including pagination pages.",
            "default": 1000
          },
          "pagination": {
            "title": "Pagination",
            "type": "object",
            "description": "{type: none|linkHeader|jsonCursor|page|offset, maxPages (≤1000), cursorPath ($.next), cursorParam (cursor), pageParam (page), startPage (1), offsetParam (offset), startOffset (0), pageSize, sizeParam, itemsPath (stop on empty page)}. A full URL in the cursor is followed directly.",
            "default": {
              "type": "none"
            }
          },
          "extract": {
            "title": "Extraction rules",
            "type": "object",
            "description": "Map of outputName → expression, evaluated on JSON responses."
          },
          "extractLanguage": {
            "title": "Expression language",
            "enum": [
              "jsonpath",
              "jmespath"
            ],
            "type": "string",
            "description": "JSONPath ($.items[*].id) or JMESPath (items[].id).",
            "default": "jsonpath"
          },
          "parseAs": {
            "title": "Parse response as",
            "enum": [
              "auto",
              "json",
              "text"
            ],
            "type": "string",
            "description": "auto = JSON when content-type says so or the body looks like JSON.",
            "default": "auto"
          },
          "outputMarkdown": {
            "title": "HTML → Markdown",
            "type": "boolean",
            "description": "Add a markdown field for HTML responses (main/article content; nav, scripts and footers removed).",
            "default": false
          },
          "storeBody": {
            "title": "Store body",
            "type": "boolean",
            "description": "Store the parsed JSON (json) or raw text (body). Turn off to keep only status, headers and extracted values.",
            "default": true
          },
          "maxBodyBytes": {
            "title": "Max body size (bytes)",
            "minimum": 1024,
            "maximum": 10485760,
            "type": "integer",
            "description": "Bodies are truncated beyond this (hard cap 10 MB). Truncated JSON is not parsed.",
            "default": 1048576
          },
          "allowedStatusCodes": {
            "title": "Also treat as success",
            "type": "array",
            "description": "Extra status codes counted as success (and charged), e.g. [404] when 'not found' is a valid answer.",
            "default": []
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}