{
  "openapi": "3.0.1",
  "info": {
    "title": "HTTP Request Runner: Bulk API Calls & Checks",
    "description": "Send a batch of HTTP requests and API calls (GET, POST, PUT, PATCH, DELETE) with headers, JSON body and query. Fill URLs from variables or CSV. Get status, response time, headers, parsed JSON and redirects, with retries, checks and hidden secrets.",
    "version": "0.1",
    "x-build-id": "qORrvzejzbTaJKzg5"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/maliksaid~http-request-runner/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-maliksaid-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/maliksaid~http-request-runner/runs": {
      "post": {
        "operationId": "runs-sync-maliksaid-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/maliksaid~http-request-runner/run-sync": {
      "post": {
        "operationId": "run-sync-maliksaid-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 the requests to send. Each one needs a url. Optional fields: method (GET, POST, PUT, PATCH, DELETE, HEAD or OPTIONS), headers, query, body (text, or JSON sent as application/json), label, expect (checks) and extract (values to pick). Use {{name}} to fill a value from Variables, and {{secret.NAME}} to fill a value from Secrets."
          },
          "urls": {
            "title": "URLs",
            "type": "array",
            "description": "A quick list of URLs. Each one is sent with the Method below and the shared Headers, Query parameters and Body. Use Requests for full control.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "method": {
            "title": "Method",
            "enum": [
              "GET",
              "POST",
              "PUT",
              "PATCH",
              "DELETE",
              "HEAD",
              "OPTIONS"
            ],
            "type": "string",
            "description": "Set the method for the URLs list.",
            "default": "GET"
          },
          "headers": {
            "title": "Headers",
            "type": "object",
            "description": "Add headers to every request. A header set on one request replaces the shared one. Put tokens and API keys in Secrets, then write {{secret.NAME}} here.",
            "default": {}
          },
          "query": {
            "title": "Query parameters",
            "type": "object",
            "description": "Add these query parameters to every URL in the URLs list. Values can use {{placeholders}} and {{secret.NAME}}.",
            "default": {}
          },
          "body": {
            "title": "Body",
            "type": "object",
            "description": "Send this JSON body with every URL in the URLs list, as application/json. Used with POST, PUT, PATCH, DELETE and OPTIONS only; GET and HEAD send no body. Values can use {{placeholders}} and {{secret.NAME}}."
          },
          "secrets": {
            "title": "Secrets",
            "type": "string",
            "description": "Store tokens and API keys here, one per line, as NAME=value. Use them as {{secret.NAME}} in a URL, header, query or body. Secrets are encrypted by Apify, never logged, and replaced with [secret] in the results. Headers that hold a secret are dropped when a redirect goes to another host."
          },
          "variables": {
            "title": "Variables",
            "type": "array",
            "description": "Give one object per row, for example {\"postId\": 1}. Each request with a {{placeholder}} runs once per row. In URLs, {{name}} is URL-encoded and {{{name}}} is inserted as written. In a JSON body, a value that is only \"{{name}}\" keeps the variable's type."
          },
          "variablesCsv": {
            "title": "Variables as CSV",
            "type": "string",
            "description": "Paste CSV text. The first line names the columns. Each later line is one row of variables."
          },
          "variablesDatasetId": {
            "title": "Variables from a dataset",
            "type": "string",
            "description": "Pick an Apify dataset. Each item is one row of variables, so you can chain this Actor after another one."
          },
          "expect": {
            "title": "Checks for every response",
            "type": "object",
            "description": "Check each response. Keys: status (\"2xx\", \"200\", \"200,201\" or \"200-299\"), bodyContains, bodyNotContains, maxTimeMs, json (path to expected value, or \"*\" for any value) and headerContains. A request's own expect adds to these checks.",
            "default": {}
          },
          "extract": {
            "title": "Values to pick",
            "type": "object",
            "description": "Pick values from each JSON response into the extracted field. Map a name to a path such as \"data.items[0].id\", \"items[*].name\" or \"header:etag\".",
            "default": {}
          },
          "callbackUrl": {
            "title": "Callback URL",
            "type": "string",
            "description": "Optional. After each request, POST its result record as JSON to this URL, for example an n8n, Make or Zapier webhook. Secrets stay replaced with [secret]. Private and local addresses are refused, and the callback host's robots.txt must allow it. One retry, 10 s timeout. A failed callback is logged and never stops the run. Callbacks cost nothing extra."
          },
          "failRunOnError": {
            "title": "Mark the run failed when a request fails",
            "type": "boolean",
            "description": "Mark the run as failed when any sent request fails, answers with an error status, or fails a check. All results are still saved and charged as usual. Use it with Apify's run-failed alert to watch an API on a schedule.",
            "default": false
          },
          "maxRequests": {
            "title": "Maximum requests",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Stop after this many requests. Set 0 for the limit of 5,000 requests per run.",
            "default": 100
          },
          "maxConcurrency": {
            "title": "Parallel requests",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Set how many requests run at the same time, across all hosts. One host never gets more than 2 at a time.",
            "default": 5
          },
          "minDelayMsPerHost": {
            "title": "Delay per host (ms)",
            "minimum": 200,
            "maximum": 60000,
            "type": "integer",
            "description": "Wait at least this long between two requests to the same host. The lowest allowed value is 200 ms.",
            "default": 250
          },
          "timeoutSecs": {
            "title": "Timeout per request (seconds)",
            "minimum": 1,
            "maximum": 60,
            "type": "integer",
            "description": "Stop waiting for one answer after this time, including the body.",
            "default": 30
          },
          "maxRetries": {
            "title": "Retries",
            "minimum": 0,
            "maximum": 2,
            "type": "integer",
            "description": "Retry after a network error, a timeout, or status 408, 425, 429, 500, 502, 503 or 504. Waits 1 s, then 2 s, or the time in the Retry-After header up to 30 s.",
            "default": 2
          },
          "followRedirects": {
            "title": "Follow redirects",
            "type": "boolean",
            "description": "Follow up to 10 redirects. Every hop is listed in the redirects field. Turn off to get the 3xx answer itself.",
            "default": true
          },
          "maxBodyKb": {
            "title": "Maximum body size (KB)",
            "minimum": 1,
            "maximum": 1024,
            "type": "integer",
            "description": "Keep at most this much of each response body, up to 1,024 KB. A longer body is cut and marked bodyTruncated.",
            "default": 256
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}