{
  "openapi": "3.0.1",
  "info": {
    "title": "HTTP Request Runner: Send API Calls, Get JSON",
    "description": "Send HTTP requests you define: GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS with headers, query, JSON body and secret bearer or basic auth. Get status, headers, timings, redirects and the parsed JSON or text body as rows. For Make, n8n, Zapier and AI agents.",
    "version": "0.1",
    "x-build-id": "XtDZgfHBgOZHhGExK"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/forgeloop~http-request-runner/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-forgeloop-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/forgeloop~http-request-runner/runs": {
      "post": {
        "operationId": "runs-sync-forgeloop-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/forgeloop~http-request-runner/run-sync": {
      "post": {
        "operationId": "run-sync-forgeloop-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": "URLs",
            "type": "array",
            "description": "Simple form: one request per URL, all with the method, headers and body below. URLs without a scheme get https://. Format: a list of strings like [\"https://api.example.com/items?page=1\"].",
            "items": {
              "type": "string"
            }
          },
          "method": {
            "title": "Method (for URLs)",
            "enum": [
              "GET",
              "POST",
              "PUT",
              "PATCH",
              "DELETE",
              "HEAD",
              "OPTIONS"
            ],
            "type": "string",
            "description": "HTTP method for the URLs above. Also the default for entries under Requests without their own method.",
            "default": "GET"
          },
          "body": {
            "title": "Body (for URLs)",
            "type": "string",
            "description": "Request body for the URLs above, for example {\"name\": \"test\"}. Valid JSON is sent with Content-Type application/json, other text as text/plain, unless you set Content-Type under Headers. Ignored for HEAD."
          },
          "requests": {
            "title": "Requests",
            "type": "array",
            "description": "Full form: a JSON array of request objects. Each object: url (required), method, headers (object), query (object), body (string, or object/array sent as JSON), form (object sent URL encoded), bodyBase64 (binary body) and label (copied to the output to match rows). Example: [{\"label\": \"create\", \"url\": \"https://httpbin.org/post\", \"method\": \"POST\", \"headers\": {\"X-Request-Id\": \"42\"}, \"body\": {\"name\": \"test\"}}]. Can be used together with URLs."
          },
          "headers": {
            "title": "Headers",
            "type": "object",
            "description": "Headers for every request, as a JSON object like {\"Accept\": \"application/json\"}. Headers of a single entry under Requests win. Set a header to null to remove a default, for example {\"User-Agent\": null}. Put tokens in the secret fields below, not here."
          },
          "query": {
            "title": "Query parameters",
            "type": "object",
            "description": "Query parameters added to every URL, as a JSON object like {\"page\": 1, \"tags\": [\"a\", \"b\"]}. Arrays repeat the parameter. Parameters already in the URL stay."
          },
          "bearerToken": {
            "title": "Bearer token",
            "type": "string",
            "description": "Optional. Sent as Authorization: Bearer <token> with every request that has no Authorization header of its own. Stored encrypted, masked in the output and the log, and dropped when a redirect leads to another host."
          },
          "basicAuth": {
            "title": "Basic auth",
            "type": "string",
            "description": "Optional. username:password, sent as Authorization: Basic with every request that has no Authorization header of its own. Stored encrypted, masked in the output and the log. Use either this or the bearer token."
          },
          "responseFormat": {
            "title": "Response body format",
            "enum": [
              "auto",
              "json",
              "text",
              "base64"
            ],
            "type": "string",
            "description": "Auto parses JSON content types into objects, returns text types as text and everything else (images, PDFs, ZIP) as base64. JSON always tries to parse, Text always decodes as text, Base64 always returns raw bytes as base64.",
            "default": "auto"
          },
          "includeResponseHeaders": {
            "title": "Include response headers",
            "type": "boolean",
            "description": "Add all response headers to each item (lower case names).",
            "default": true
          },
          "maxResponseBytes": {
            "title": "Max response size (bytes)",
            "minimum": 1024,
            "maximum": 10485760,
            "type": "integer",
            "description": "Read at most this many bytes of each response body (after decompression). Longer bodies are cut and get truncated: true. Default 5 MB, maximum 10 MB.",
            "default": 5242880
          },
          "followRedirects": {
            "title": "Follow redirects",
            "type": "boolean",
            "description": "Follow 301, 302, 303, 307 and 308 redirects and record every hop. Turn off to get the redirect response itself.",
            "default": true
          },
          "maxRedirects": {
            "title": "Max redirects",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Stop after this many redirects and return the last redirect response with redirectLimitReached: true.",
            "default": 10
          },
          "timeoutSecs": {
            "title": "Timeout (seconds)",
            "minimum": 1,
            "maximum": 120,
            "type": "integer",
            "description": "Give up on one attempt after this many seconds, redirects included.",
            "default": 30
          },
          "retries": {
            "title": "Retries",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "Retries after network errors, timeouts, HTTP 408, 429 and 5xx (not 501, 505). Waits 1, 2, 4 s or what the server asks for in Retry-After (up to 60 s). Retries send the request again, so use 0 for calls that must not run twice.",
            "default": 2
          },
          "maxConcurrency": {
            "title": "Parallel requests",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many requests run at the same time.",
            "default": 5
          },
          "delayMs": {
            "title": "Delay between requests (ms)",
            "minimum": 0,
            "maximum": 60000,
            "type": "integer",
            "description": "Minimum pause between the start of two requests across the whole run. Use it to respect the rate limit of an API, for example 1000 for one request per second.",
            "default": 0
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}