{
  "openapi": "3.0.1",
  "info": {
    "title": "HTTP Request API: Send HTTP Requests in Bulk via Proxy",
    "description": "Send an HTTP request to any URL or API through a proxy and get the response back: any method, custom headers and body, datacenter or residential IP, country per request. Returns status code, headers, body or parsed JSON and a JSON path or CSS extract. From $5 per 1,000; failed requests are free.",
    "version": "1.0",
    "x-build-id": "x9AV8Ea25IxeSwtMZ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/tenfoldfleet~http-request-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-tenfoldfleet-http-request-api",
        "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/tenfoldfleet~http-request-api/runs": {
      "post": {
        "operationId": "runs-sync-tenfoldfleet-http-request-api",
        "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/tenfoldfleet~http-request-api/run-sync": {
      "post": {
        "operationId": "run-sync-tenfoldfleet-http-request-api",
        "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",
        "required": [
          "requests"
        ],
        "properties": {
          "requests": {
            "title": "Requests",
            "type": "array",
            "description": "The HTTP requests to send. Each item is a URL string or an object: {\"url\", \"method\", \"headers\", \"body\", \"json\"}. \"method\" defaults to GET (POST when a body is given). \"json\" is sent as a JSON body. Optional per-request overrides: \"country\", \"responseType\", \"extract\", \"timeoutSecs\", \"followRedirects\". One request = one result row. Free Apify plan: the first 20 requests per run."
          },
          "country": {
            "title": "Proxy country",
            "type": "string",
            "description": "Optional 2-letter country code for the exit IP, e.g. US, GB, DE, JP. Applies to every request unless a request sets its own \"country\". Residential covers most countries; the datacenter pool covers fewer, and a country it does not have comes back as a free error row."
          },
          "responseType": {
            "title": "Response format",
            "enum": [
              "auto",
              "json",
              "text",
              "base64"
            ],
            "type": "string",
            "description": "auto: JSON responses are parsed into \"json\", text and HTML go to \"body\", binary files are returned as base64. json / text / base64 force one format.",
            "default": "auto"
          },
          "extract": {
            "title": "Extract (JSON path or CSS selector)",
            "type": "string",
            "description": "Optional. Pull one part out of every response into the \"extracted\" field. For JSON responses use a JSON path such as $.data.items[0].name or $.results[*].id. For HTML use a CSS selector such as h1 or a.product@href (the part after @ is an attribute)."
          },
          "followRedirects": {
            "title": "Follow redirects",
            "type": "boolean",
            "description": "Follow 301, 302, 303, 307 and 308 redirects (up to 10) and return the last response. Turn off to get the redirect response itself.",
            "default": true
          },
          "proxyType": {
            "title": "Proxy",
            "enum": [
              "datacenter",
              "residential",
              "none"
            ],
            "type": "string",
            "description": "Where the requests come from. Datacenter: fast and cheap, right for most APIs. Residential: a home IP for sites that refuse datacenter IPs (paid Apify plans only, responses capped at 500 KB). None: sent straight from the Actor server.",
            "default": "datacenter"
          },
          "timeoutSecs": {
            "title": "Timeout per attempt (seconds)",
            "minimum": 1,
            "maximum": 120,
            "type": "integer",
            "description": "How long one attempt may take, redirects and download included.",
            "default": 30
          },
          "maxRetries": {
            "title": "Retries on network errors",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "How many times to retry a request that got no HTTP response (timeout, connection reset, proxy error), each time from a new IP. Retries are never charged. A response with any status code, including 4xx and 5xx, is returned as it is and not retried. POST and PATCH are sent again only when the first try never reached the target. A host that gave no response to 5 requests in a row gets one 10-second try per request until it answers again.",
            "default": 2
          },
          "maxResponseBytes": {
            "title": "Max response size (bytes)",
            "minimum": 1,
            "maximum": 5000000,
            "type": "integer",
            "description": "The download stops at this size and the row is marked \"truncated\": true. Default and upper limit: 5,000,000 bytes (5 MB) on datacenter or no proxy, 500,000 bytes (500 KB) on residential."
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "How many requests run in parallel.",
            "default": 10
          },
          "maxRequests": {
            "title": "Max requests per run",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Safety limit: requests after this number are skipped and not charged. Free Apify plan: 20 requests per run.",
            "default": 1000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}