{
  "openapi": "3.0.1",
  "info": {
    "title": "HTTP Request Runner: Bulk API Calls with Retries",
    "description": "Send up to 1000 HTTP requests in one batch with retries, redirect chains, and JSON parsing built in. Paste a curl command from DevTools or Postman instead of hand-building requests. Works with n8n, Make, Zapier, and MCP agents. Skip the retry and concurrency code. From $0.0006 per response.",
    "version": "0.0",
    "x-build-id": "ZfxxIxLEEDJU13tlS"
  },
  "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": {
          "requests": {
            "title": "Requests",
            "type": "array",
            "description": "Array of request objects: { id, label, url, method, headers, query, body, expectedStatusCodes }. Only url is required per item.",
            "default": []
          },
          "curlCommand": {
            "title": "Import from curl command",
            "type": "string",
            "description": "Paste a single curl command (copied from browser DevTools, Postman, or a terminal) and it will be parsed into a request. Runs in addition to any requests above.",
            "default": ""
          },
          "maxConcurrency": {
            "title": "Max Concurrency",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Maximum number of requests running at the same time.",
            "default": 5
          },
          "requestsPerSecond": {
            "title": "Requests Per Second (throttle)",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "Independent rate limit separate from concurrency, useful for APIs that reject bursts even under a low concurrency limit. 0 means no extra throttle.",
            "default": 0
          },
          "timeoutSecs": {
            "title": "Timeout Per Attempt",
            "minimum": 1,
            "maximum": 120,
            "type": "integer",
            "description": "Seconds to wait for a response before treating the attempt as failed.",
            "default": 30
          },
          "maxRetries": {
            "title": "Max Retries",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Retry attempts after a network error or a retryable status code, using exponential backoff with jitter.",
            "default": 2
          },
          "retryOnStatusCodes": {
            "title": "Retry On Status Codes",
            "type": "array",
            "description": "Response status codes that trigger a retry. A 4xx code other than 408/425/429 means your request is malformed and will never succeed on retry, so it is not retried by default.",
            "default": [
              408,
              425,
              429,
              500,
              502,
              503,
              504
            ]
          },
          "followRedirects": {
            "title": "Follow Redirects",
            "type": "boolean",
            "description": "Automatically follow HTTP redirects (301, 302, 307, 308).",
            "default": true
          },
          "maxRedirects": {
            "title": "Max Redirects",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "Maximum redirect hops to follow per request.",
            "default": 5
          },
          "parseJson": {
            "title": "Auto-Parse JSON Responses",
            "type": "boolean",
            "description": "When the response Content-Type is JSON, parse it into a structured json field instead of leaving it as raw text.",
            "default": true
          },
          "maxResponseBytes": {
            "title": "Max Response Bytes (inline)",
            "minimum": 1000,
            "maximum": 10000000,
            "type": "integer",
            "description": "Response bodies larger than this are truncated in the body field. Combine with Save Oversized Bodies below to keep the full content without bloating the dataset.",
            "default": 1000000
          },
          "saveOversizedBodyToKeyValueStore": {
            "title": "Save Oversized/Binary Bodies to Key-Value Store",
            "type": "boolean",
            "description": "When a body exceeds Max Response Bytes or is binary (images, PDFs, archives), store the full content in the key-value store and return a link in bodyStoredKey instead of silently truncating it.",
            "default": true
          },
          "failOnErrorStatus": {
            "title": "Treat Non-2xx As Error",
            "type": "boolean",
            "description": "When enabled, a non-2xx response also populates the errorMessage field, on top of the normal statusCode/ok fields.",
            "default": false
          },
          "expectedStatusCodes": {
            "title": "Expected Status Codes (assertion)",
            "type": "array",
            "description": "Optional. If set, every response is checked against this list and the result includes assertionPassed, useful for uptime or contract checks. Leave empty to skip the assertion. A per-request expectedStatusCodes field overrides this default.",
            "default": []
          },
          "authType": {
            "title": "Default Authentication",
            "enum": [
              "none",
              "bearer",
              "basic"
            ],
            "type": "string",
            "description": "Applied automatically to all requests that don't already set an Authorization header of their own.",
            "default": "none"
          },
          "authBearerToken": {
            "title": "Bearer Token",
            "type": "string",
            "description": "Used when Default Authentication is set to Bearer token."
          },
          "authBasicUsername": {
            "title": "Basic Auth Username",
            "type": "string",
            "description": "Used when Default Authentication is set to Basic auth.",
            "default": ""
          },
          "authBasicPassword": {
            "title": "Basic Auth Password",
            "type": "string",
            "description": "Used when Default Authentication is set to Basic auth."
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Optional. Off by default since most API calls should go direct; turn it on for targets that rate-limit or geo-block by IP.",
            "default": {
              "useApifyProxy": false
            }
          },
          "callbackUrl": {
            "title": "Callback URL",
            "type": "string",
            "description": "If set, each result row is POSTed to this URL as JSON the moment it completes, the same pattern tools like n8n and Clay use for streaming results.",
            "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}