{
  "openapi": "3.0.1",
  "info": {
    "title": "Bulk HTTP Requests: Batch API Caller for CSV Rows & URL Lists",
    "description": "Send bulk HTTP requests to any API from CSV, JSON or a URL list: one GET, POST or PUT per row from a {{column}} template. An HTTP client for batch API calls and webhook tests, with retries, per-host rate limits and JSON or regex extraction.",
    "version": "0.1",
    "x-build-id": "Ucta532otcofgNYpS"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/siteacs~bulk-http-request/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-siteacs-bulk-http-request",
        "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/siteacs~bulk-http-request/runs": {
      "post": {
        "operationId": "runs-sync-siteacs-bulk-http-request",
        "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/siteacs~bulk-http-request/run-sync": {
      "post": {
        "operationId": "run-sync-siteacs-bulk-http-request",
        "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 or URL template",
            "type": "string",
            "description": "The address to call. Put {{column}} where a value from each row goes, for example https://api.example.com/users/{{id}}?country={{country}}. Values are URL-encoded; a placeholder at the very start ({{url}}, a column of full addresses) or in triple braces ({{{path}}}) is inserted as is. Leave empty when you give a URL list below."
          },
          "method": {
            "title": "Method",
            "enum": [
              "GET",
              "POST",
              "PUT",
              "PATCH",
              "DELETE",
              "HEAD",
              "OPTIONS"
            ],
            "type": "string",
            "description": "The HTTP method for every request. A body (below) is sent with POST, PUT, PATCH and DELETE only.",
            "default": "GET"
          },
          "csvRows": {
            "title": "Rows: CSV",
            "type": "string",
            "description": "One request per row. The first line names the columns (comma, semicolon or tab separated); each line below is one request. Use the column names as {{placeholders}} in the URL, headers and body."
          },
          "rows": {
            "title": "Rows: JSON",
            "type": "array",
            "description": "One request per item, for example [{\"id\": 1, \"name\": \"Ana\"}, {\"id\": 2, \"name\": \"Bo\"}]. Nested values are reached with dots: {{address.city}}. A list of plain values ([\"a\", \"b\"]) is used as {{value}}."
          },
          "rowsUrl": {
            "title": "Rows: file link",
            "type": "string",
            "description": "A link to a CSV, TSV, JSON or JSON Lines file with the rows, up to 50 MB. A Google Sheet link works when the sheet is shared as \"Anyone with the link can view\"."
          },
          "rowsDatasetId": {
            "title": "Rows: Apify dataset ID",
            "type": "string",
            "description": "Use the items of an Apify dataset as rows, for example the output of another actor run. Its fields become the {{placeholders}}."
          },
          "urls": {
            "title": "Or: plain URL list",
            "type": "array",
            "description": "One full address per line, each called with the method, headers and body set here. Use this instead of rows when you only have URLs (the URL template above can stay empty, or use {{url}} in it).",
            "items": {
              "type": "string"
            }
          },
          "maxRequests": {
            "title": "Max requests",
            "minimum": 0,
            "type": "integer",
            "description": "Send only the first N rows, to test a template before the full run. 0 sends them all.",
            "default": 0
          },
          "headers": {
            "title": "Headers",
            "type": "object",
            "description": "Request headers as a JSON object, for example {\"Authorization\": \"Bearer {{token}}\", \"Accept\": \"application/json\"}. Values can use {{placeholders}} and must be plain ASCII (a row whose value has other characters is saved free as invalid_request). Content-Length, Transfer-Encoding and Connection are set by the actor and ignored here. Authorization and Cookie headers are not sent on to another host after a redirect."
          },
          "jsonBody": {
            "title": "JSON body",
            "type": "object",
            "description": "A JSON body template. A value that is exactly \"{{column}}\" keeps the row's type (number, true/false, list); inside longer text it is inserted as text. Sent as application/json unless you set Content-Type."
          },
          "formBody": {
            "title": "Form body",
            "type": "object",
            "description": "A form body (application/x-www-form-urlencoded) as a JSON object of field names and values, for example {\"email\": \"{{email}}\"}. Use one body type per run."
          },
          "textBody": {
            "title": "Text body",
            "type": "string",
            "description": "Any other body (XML, GraphQL, plain text, a JSON list) as text with {{placeholders}}, inserted as is. Set Content-Type in Headers; the default is text/plain."
          },
          "methodColumn": {
            "title": "Method column",
            "type": "string",
            "description": "Optional. The name of a row column that holds each row's method (GET, POST, PUT, ...). Empty cells use Method above."
          },
          "extract": {
            "title": "Extract into columns",
            "type": "object",
            "description": "Pull values out of each response into the extracted column. Keys are your column names; values are a JSON path (data.items[0].id, items[*].name), regex:PATTERN (first match, or its first group), regexAll:PATTERN (every match) or header:NAME. Example: {\"userId\": \"data.id\", \"title\": \"regex:<title>(.*?)</title>\", \"remaining\": \"header:x-ratelimit-remaining\"}."
          },
          "responseFormat": {
            "title": "Body format",
            "enum": [
              "auto",
              "json",
              "text",
              "base64",
              "none"
            ],
            "type": "string",
            "description": "How the response body is saved. None keeps items small when you only need the status code and extracted columns.",
            "default": "auto"
          },
          "maxResponseKb": {
            "title": "Max body size (KB)",
            "minimum": 1,
            "maximum": 4096,
            "type": "integer",
            "description": "The body is read up to this size; a longer one is cut and marked truncated: true. Extraction runs on what was read.",
            "default": 1024
          },
          "splitItemsPath": {
            "title": "One dataset item per array element",
            "type": "string",
            "description": "Optional. A JSON path to a list in the response (for example data.items). Each element becomes its own dataset item in the item field, next to the request's row and status, up to 1,000 per request (itemsTotal gives the list's length, itemsCut says it was cut). Still charged once per request."
          },
          "includeResponseHeaders": {
            "title": "Save response headers",
            "type": "boolean",
            "description": "Keep the response headers in each item.",
            "default": true
          },
          "includeRow": {
            "title": "Save the input row",
            "type": "boolean",
            "description": "Keep each request's input row in the row field, so results join back to your sheet. Turn off when rows hold secrets.",
            "default": true
          },
          "maxConcurrency": {
            "title": "Requests at a time",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "How many requests are in flight at once across all hosts.",
            "default": 20
          },
          "maxConcurrencyPerHost": {
            "title": "Requests at a time per host",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many requests one server gets at once (at most 20). Host names that point at the same address share this limit. Lower it for small APIs.",
            "default": 5
          },
          "maxRequestsPerMinutePerHost": {
            "title": "Requests per minute per host",
            "minimum": 1,
            "maximum": 1200,
            "type": "integer",
            "description": "Request starts per server per minute, retries and redirects included, spaced evenly (600 = one every 0.1 s; at most 1,200). Host names that point at the same address share this limit. Set it to your API's rate limit.",
            "default": 600
          },
          "timeoutSecs": {
            "title": "Timeout (seconds)",
            "minimum": 1,
            "maximum": 300,
            "type": "integer",
            "description": "How long to wait for a connection and for each part of the answer.",
            "default": 30
          },
          "maxRetries": {
            "title": "Retries",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Extra tries after a timeout, a dropped connection or HTTP 408, 425, 429, 500, 502, 503 or 504, with exponential backoff (1 s, 2 s, 4 s ...). Retry-After is honoured. POST and PATCH are retried only when the request surely never arrived, or on 429 (or 503 with Retry-After), unless you turn on the option below.",
            "default": 2
          },
          "maxRetryAfterSecs": {
            "title": "Longest Retry-After wait (seconds)",
            "minimum": 0,
            "maximum": 600,
            "type": "integer",
            "description": "When a server asks to wait longer than this, the answer (for example the 429) is saved instead of waiting.",
            "default": 60
          },
          "retryUnsafeMethods": {
            "title": "Retry POST and PATCH on any retryable error",
            "type": "boolean",
            "description": "Turn on only when sending the same POST twice is harmless (the API ignores duplicates).",
            "default": false
          },
          "followRedirects": {
            "title": "Follow redirects",
            "type": "boolean",
            "description": "Follow 301, 302, 303, 307 and 308 answers. Every hop is listed in redirects. Off: the 3xx answer itself is saved.",
            "default": true
          },
          "maxRedirects": {
            "title": "Max redirects",
            "minimum": 0,
            "maximum": 30,
            "type": "integer",
            "description": "A longer chain is saved free as too_many_redirects. 0 does not follow: the 3xx answer itself is saved (and charged), as with Follow redirects off.",
            "default": 10
          },
          "ignoreTlsErrors": {
            "title": "Ignore TLS certificate errors",
            "type": "boolean",
            "description": "Accept expired or self-signed certificates.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}