{
  "openapi": "3.0.1",
  "info": {
    "title": "HTTP Request Runner",
    "description": "Send many HTTP requests to public web addresses and APIs in one run: GET, POST, PUT, PATCH, DELETE, HEAD or OPTIONS with your own headers and body. Each request gives one row with status, headers, body, parsed JSON, redirect chain and timing. Secret field for API keys.",
    "version": "1.0",
    "x-build-id": "DdEa3A8t50PdgEJ3L"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/cyber1nj3ct0r~http-request-runner/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-cyber1nj3ct0r-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/cyber1nj3ct0r~http-request-runner/runs": {
      "post": {
        "operationId": "runs-sync-cyber1nj3ct0r-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/cyber1nj3ct0r~http-request-runner/run-sync": {
      "post": {
        "operationId": "run-sync-cyber1nj3ct0r-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": {
          "urls": {
            "title": "Web addresses",
            "type": "array",
            "description": "The addresses to send requests to, for example <code>https://api.example.com/items/1</code>. Add them one by one, paste many at once with <b>Bulk edit</b>, or link a text file with one address per line. They are sent with the method, headers and body set below. An entry can also carry its own <code>method</code> (other than GET), <code>payload</code> (the body) and <code>headers</code>, as in the example. Every entry is sent, also when it appears twice. For many requests that differ from each other, use <b>Requests (JSON)</b> instead.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "requests": {
            "title": "Requests (JSON)",
            "type": "array",
            "description": "A list of request objects, sent after the addresses above. Each object has a <code>url</code> and may have <code>method</code>, <code>headers</code>, <code>query</code> (an object that is added to the address), <code>body</code> (text, or any JSON value that is sent as JSON) and <code>userData</code> (anything you want back in the result row). Settings you leave out come from the fields below. Example: <code>[{\"url\": \"https://api.example.com/items\", \"method\": \"POST\", \"body\": {\"name\": \"test\"}}]</code>"
          },
          "method": {
            "title": "Method",
            "enum": [
              "GET",
              "POST",
              "PUT",
              "PATCH",
              "DELETE",
              "HEAD",
              "OPTIONS"
            ],
            "type": "string",
            "description": "The HTTP method for every request that does not set its own.",
            "default": "GET"
          },
          "headers": {
            "title": "Headers",
            "type": "object",
            "description": "Headers sent with every request, for example <code>{\"Accept\": \"application/json\", \"X-Api-Version\": \"2\"}</code>. A request can replace a header, or remove it by giving <code>null</code>. The <code>User-Agent</code> cannot be changed: the tool always tells the site who is calling. This field is not encrypted: put keys and passwords in <b>Authorization</b> below."
          },
          "authorization": {
            "title": "Authorization (secret)",
            "type": "string",
            "description": "The complete value of the <code>Authorization</code> header for every request, for example <code>Bearer YOUR_TOKEN</code>. It is stored encrypted, is never written to the run log or the results, and is not passed on when a redirect leads to another website."
          },
          "body": {
            "title": "Body",
            "type": "string",
            "description": "The body sent with every POST, PUT, PATCH and DELETE request that does not set its own. Text is sent exactly as written. Text that is a JSON object or list is sent with the content type <code>application/json</code> unless you set another one under Headers. GET and HEAD requests never carry a body."
          },
          "followRedirects": {
            "title": "Follow redirects",
            "type": "boolean",
            "description": "Follow 301, 302, 303, 307 and 308 redirects and report each step. Turn it off to get the redirect itself as the result. Redirects to private or local addresses are never followed.",
            "default": true
          },
          "maxRedirects": {
            "title": "Maximum redirects",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many redirects are followed for one request before it is reported as TOO_MANY_REDIRECTS.",
            "default": 10
          },
          "timeoutSecs": {
            "title": "Time limit per request",
            "minimum": 1,
            "maximum": 120,
            "type": "integer",
            "description": "How long one request may take, redirects and reading the answer included, before it is counted as not answering.",
            "default": 30
          },
          "retries": {
            "title": "Retries",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "How many more times a request is tried after a network error, a 429 (too many requests) or a server error (500, 502, 503, 504), with a growing pause between tries. A pause the server asks for with <code>Retry-After</code> is respected up to 30 seconds. POST and PATCH requests are only repeated after 429, 503 or when no connection could be made, because the first try may already have been carried out. Set 0 to try each request once.",
            "default": 1
          },
          "maxBodyKb": {
            "title": "Largest answer kept",
            "minimum": 1,
            "maximum": 4096,
            "type": "integer",
            "description": "The part of an answer that is kept, in kilobytes. A longer answer is cut and the result says <code>truncated: true</code>. A cut JSON answer cannot be parsed.",
            "default": 1024
          },
          "includeBody": {
            "title": "Include the answer text",
            "type": "boolean",
            "description": "Add the body of the answer as text. Turn it off together with <b>Parse JSON answers</b> to send requests and keep only the status, which also keeps the results small.",
            "default": true
          },
          "parseJson": {
            "title": "Parse JSON answers",
            "type": "boolean",
            "description": "When an answer is JSON, add it as a parsed value in <code>json</code>, ready to use in a table or in your own code.",
            "default": true
          },
          "includeHeaders": {
            "title": "Include response headers",
            "type": "boolean",
            "description": "Add every header of the answer to the result, for example <code>content-type</code>, <code>x-ratelimit-remaining</code> or <code>set-cookie</code>.",
            "default": true
          },
          "concurrency": {
            "title": "Requests at the same time",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "How many requests are in flight at once, in total. A higher number finishes a long list sooner. Large answers need more memory when this is high.",
            "default": 10
          },
          "perHostConcurrency": {
            "title": "Requests at the same time per website",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many of those may go to the same website at once. Keep it low for sites you do not run. The default is 4.",
            "default": 4
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}