{
  "openapi": "3.0.1",
  "info": {
    "title": "HTTP Request Runner",
    "description": "Sends the HTTP requests you define to any API and returns each response as a row with status, timing, JSON or text and the fields you pick. Fills URL and body templates from rows, follows pagination and retries 429 and 5xx with backoff.",
    "version": "0.1",
    "x-build-id": "Q97mg8MZ0LQK9ZlgK"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/deriverge~http-request-runner/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-deriverge-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/deriverge~http-request-runner/runs": {
      "post": {
        "operationId": "runs-sync-deriverge-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/deriverge~http-request-runner/run-sync": {
      "post": {
        "operationId": "run-sync-deriverge-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": "A JSON list of requests. Each one is an object with \"url\" and optionally \"method\", \"headers\", \"query\", \"json\" (a JSON body), \"body\" (a text body), \"form\" (form fields), \"label\" and \"userData\" (copied to the output row). {{field}} placeholders are filled from Template rows. A plain URL string also works."
          },
          "urls": {
            "title": "URLs",
            "type": "array",
            "description": "A quicker way to add requests: one URL per line, sent with the method, headers, query parameters and body below.",
            "items": {
              "type": "string"
            }
          },
          "method": {
            "title": "Method",
            "enum": [
              "GET",
              "POST",
              "PUT",
              "PATCH",
              "DELETE",
              "HEAD",
              "OPTIONS"
            ],
            "type": "string",
            "description": "Method for URLs and for requests that do not set their own.",
            "default": "GET"
          },
          "headers": {
            "title": "Headers",
            "type": "object",
            "description": "Headers for every request, such as {\"Accept\": \"application/json\"}. Put API keys and Authorization in Secret headers instead, where they are stored encrypted."
          },
          "secretHeaders": {
            "title": "Secret headers",
            "type": "object",
            "description": "Headers with credentials, such as {\"Authorization\": \"Bearer ...\"} or {\"X-API-Key\": \"...\"}. Stored encrypted, never logged and never written to the output. They are dropped when a redirect leads to another host."
          },
          "queryParams": {
            "title": "Query parameters",
            "type": "object",
            "description": "Query parameters added to every URL, such as {\"limit\": 100, \"lang\": \"en\"}. A list value repeats the parameter."
          },
          "secretQueryParams": {
            "title": "Secret query parameters",
            "type": "object",
            "description": "Query parameters with credentials, such as {\"api_key\": \"...\"}. Stored encrypted and added to every URL when it is sent; their values show as REDACTED in the output."
          },
          "body": {
            "title": "Body",
            "type": "string",
            "description": "Body for URLs and for requests without their own. Valid JSON is sent as application/json, other text as text/plain unless you set Content-Type in Headers."
          },
          "templateRows": {
            "title": "Template rows",
            "type": "array",
            "description": "A JSON list of objects, such as [{\"id\": 1}, {\"id\": 2}]. A request with {{id}} in it is sent once per row; requests without placeholders are sent once. Nested fields work as {{user.id}}."
          },
          "templateDatasetId": {
            "title": "Template rows from a dataset",
            "type": "string",
            "description": "A dataset whose items are used as template rows, after the ones above. The run can read only the dataset you pick."
          },
          "paginationMode": {
            "title": "Pagination",
            "enum": [
              "none",
              "nextUrl",
              "cursor",
              "page",
              "offset",
              "linkHeader"
            ],
            "type": "string",
            "description": "How to find the next page.",
            "default": "none"
          },
          "nextPath": {
            "title": "Next page path",
            "type": "string",
            "description": "JSON path to the next page URL (for Next page URL) or the next cursor (for Cursor), such as next, links.next or meta.next_cursor."
          },
          "cursorParam": {
            "title": "Cursor parameter",
            "type": "string",
            "description": "Query parameter that carries the cursor, such as cursor, after or starting_after. Defaults to cursor."
          },
          "pageParam": {
            "title": "Page or offset parameter",
            "type": "string",
            "description": "Query parameter for page numbers or offsets, such as page, offset or skip. Defaults to page, or offset in offset mode."
          },
          "pageStart": {
            "title": "First page or offset",
            "type": "integer",
            "description": "Value of the page or offset parameter on the first request when the URL does not have it. Defaults to 1 for pages and 0 for offsets."
          },
          "offsetStep": {
            "title": "Offset step",
            "minimum": 1,
            "type": "integer",
            "description": "How much the offset grows per page, usually your page size. Leave it empty to use the number of items on the previous page."
          },
          "itemsPath": {
            "title": "Items path",
            "type": "string",
            "description": "JSON path to the list of results in each response, such as data, results or items. Pagination stops at a page where this list is empty. Needed for page and offset pagination unless the response itself is a list."
          },
          "maxPages": {
            "title": "Maximum pages",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Most pages to request for each request in the input, the first one included.",
            "default": 10
          },
          "extract": {
            "title": "Fields to extract",
            "type": "object",
            "description": "Output names and JSON paths to copy from each JSON response into the extracted field, such as {\"name\": \"$.data.name\", \"ids\": \"$.items[*].id\"}. Paths support dots, [0], [-1], [*] and .."
          },
          "saveBody": {
            "title": "Save the response body",
            "enum": [
              "full",
              "extracted",
              "none"
            ],
            "type": "string",
            "description": "What to keep from each response. Bodies over 4 MB are cut and marked with bodyTruncated.",
            "default": "full"
          },
          "saveResponseHeaders": {
            "title": "Save response headers",
            "type": "boolean",
            "description": "Adds the response headers (without set-cookie) to each row. Request headers are never saved.",
            "default": false
          },
          "successStatuses": {
            "title": "Success status codes",
            "type": "array",
            "description": "Status codes that count as success (ok is true), as codes (404), ranges (200-299) or classes (2xx). Other codes still return a row with error filled in, and they end pagination.",
            "default": [
              "2xx"
            ],
            "items": {
              "type": "string"
            }
          },
          "maxConcurrency": {
            "title": "Parallel requests",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "How many requests run at the same time across all hosts.",
            "default": 10
          },
          "requestsPerSecondPerHost": {
            "title": "Requests per second per host",
            "minimum": 0.1,
            "maximum": 20,
            "type": "number",
            "description": "Highest rate for any one host, 20 at most. Lower it to stay inside the rate limit of the API you call.",
            "default": 5
          },
          "maxRetries": {
            "title": "Retries",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "How many times to retry after HTTP 429, a 5xx status, a timeout or a dropped connection. Waits 1, 2, 4, 8 s and so on, or as long as the Retry-After header asks, up to 300 s.",
            "default": 3
          },
          "retryNonIdempotent": {
            "title": "Retry POST and PATCH on any error",
            "type": "boolean",
            "description": "POST and PATCH requests are retried after 429 and 503 only, because a server error or a dropped connection may mean the server already acted on them. Turn this on to retry them like the other methods.",
            "default": false
          },
          "timeoutSecs": {
            "title": "Timeout",
            "minimum": 1,
            "maximum": 300,
            "type": "integer",
            "description": "Time for one attempt, redirects included.",
            "default": 30
          },
          "followRedirects": {
            "title": "Follow redirects",
            "type": "boolean",
            "description": "Follow up to 10 redirects. When off, a 3xx response is returned as it is.",
            "default": true
          },
          "ignoreTlsErrors": {
            "title": "Ignore TLS certificate errors",
            "type": "boolean",
            "description": "Accept expired or self-signed certificates. Only for servers you trust.",
            "default": false
          },
          "maxResponseMegabytes": {
            "title": "Maximum response size",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Responses larger than this are stopped and reported as too_large.",
            "default": 5
          },
          "maxRequests": {
            "title": "Maximum requests",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many requests, pages included, so the cost of a run stays predictable. Leave it empty for no limit."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}