{
  "openapi": "3.0.1",
  "info": {
    "title": "HTTP Request: Bulk API Calls, curl Import, JSON & Markdown",
    "description": "Send one or thousands of HTTP requests (GET, POST, PUT, PATCH, DELETE, HEAD) from a list, pasted curl commands, or a URL template with rows. Get status, timing, JSON fields as columns, or clean Markdown. Failed requests are free.",
    "version": "0.1",
    "x-build-id": "2P93jCZvUJFeYZ2SN"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ctriolab~http-request/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ctriolab-http-request",
        "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/ctriolab~http-request/runs": {
      "post": {
        "operationId": "runs-sync-ctriolab-http-request",
        "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/ctriolab~http-request/run-sync": {
      "post": {
        "operationId": "run-sync-ctriolab-http-request",
        "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 item: {\"url\": \"...\", \"method\": \"GET|POST|PUT|PATCH|DELETE|HEAD\", \"headers\": {...}, \"query\": {...}, \"body\": \"text\" or {JSON}, \"bodyType\": \"json|form|text|raw\", \"label\": \"...\", \"userData\": {...}}. Only url is required. A plain string is read as a GET URL. Leave all request fields empty to try a small public sample API."
          },
          "curlCommands": {
            "title": "curl commands",
            "type": "string",
            "description": "Paste one or more curl commands (for example \"Copy as cURL\" from browser developer tools or API docs). Each command starts with the word curl. Supported: -X, -H, -d, --data-raw, --data-binary, --data-urlencode, --json, -u, -A, -e, -b, -G, -I, --url. Ignored: -L, -s, -k, --compressed and output options. Not supported: -F (file upload) and -d @file."
          },
          "urlTemplate": {
            "title": "URL template",
            "type": "string",
            "description": "A URL with {{field}} placeholders, sent once per row of \"Template rows\". Values are URL-encoded; a placeholder at the very start (for example {{url}}) is inserted as is. Dot paths work: {{company.domain}}."
          },
          "templateRows": {
            "title": "Template rows",
            "type": "array",
            "description": "JSON list of objects, for example [{\"id\": 1}, {\"id\": 2}]. Each row is also returned in the result as userData, so you can join results back to your table."
          },
          "templateMethod": {
            "title": "Template method",
            "enum": [
              "GET",
              "POST",
              "PUT",
              "PATCH",
              "DELETE",
              "HEAD"
            ],
            "type": "string",
            "description": "HTTP method for template requests.",
            "default": "GET"
          },
          "templateHeaders": {
            "title": "Template headers",
            "type": "object",
            "description": "Headers for template requests. Values may use {{field}}."
          },
          "templateBody": {
            "title": "Template body",
            "type": "string",
            "description": "Body for template requests, with {{field}} placeholders. With body type JSON, text values are escaped for use inside JSON strings, for example {\"name\": \"{{name}}\", \"age\": {{age}}}."
          },
          "templateBodyType": {
            "title": "Template body type",
            "enum": [
              "json",
              "form",
              "text",
              "raw"
            ],
            "type": "string",
            "description": "Sets the Content-Type of the template body.",
            "default": "json"
          },
          "headers": {
            "title": "Headers for all requests",
            "type": "object",
            "description": "Sent with every request, for example {\"Authorization\": \"Bearer ...\", \"Accept\": \"application/json\"}. A request's own headers win."
          },
          "bodyType": {
            "title": "Default body type",
            "enum": [
              "raw",
              "json",
              "form",
              "text"
            ],
            "type": "string",
            "description": "How a request body is sent when the request does not say. Object bodies are always sent as JSON unless the request sets bodyType.",
            "default": "raw"
          },
          "timeoutSecs": {
            "title": "Timeout per request (seconds)",
            "minimum": 1,
            "maximum": 300,
            "type": "integer",
            "description": "The whole request, including redirects and reading the body. Timed-out requests are not charged.",
            "default": 30
          },
          "maxRetries": {
            "title": "Max retries",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Retries on HTTP 429, 5xx and network errors, with back-off. Retry-After is respected and pauses every request to that host. Note: a retried POST may repeat its effect on the server; set 0 for requests that must run once.",
            "default": 3
          },
          "maxConcurrency": {
            "title": "Requests at a time",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "How many requests run in parallel. Lower it for APIs with strict rate limits.",
            "default": 5
          },
          "followRedirects": {
            "title": "Follow redirects",
            "type": "boolean",
            "description": "Follow up to 10 redirects. Each hop is checked against blocked addresses. Authorization and Cookie headers are dropped when the host changes.",
            "default": true
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Optional. Send requests through Apify Proxy (choose a country for geo-specific answers). Off by default. Proxy traffic is billed by Apify as platform usage.",
            "default": {
              "useApifyProxy": false
            }
          },
          "responseFormat": {
            "title": "Response body",
            "enum": [
              "auto",
              "json",
              "text",
              "markdown",
              "none"
            ],
            "type": "string",
            "description": "Auto: JSON responses are saved as JSON, everything else as text. Markdown: HTML pages become clean Markdown (scripts, styles, navigation and footers removed, links made absolute). None: no body, only status, timing and extracted fields.",
            "default": "auto"
          },
          "extractFields": {
            "title": "JSON fields to extract",
            "type": "array",
            "description": "Dot paths read from JSON responses into the fields column, for example data.id, items.0.name, items[0].price. Rename with name=path, for example city=address.city. Missing paths give null. The body must fit in Max body size to be parsed.",
            "items": {
              "type": "string"
            }
          },
          "includeResponseHeaders": {
            "title": "Include response headers",
            "type": "boolean",
            "description": "Add all response headers to each result.",
            "default": false
          },
          "maxBodyBytes": {
            "title": "Max body size (bytes)",
            "minimum": 0,
            "maximum": 8000000,
            "type": "integer",
            "description": "Bodies longer than this are cut (bodyTruncated: true) and the rest is not downloaded. Max 8,000,000.",
            "default": 1000000
          },
          "callbackUrl": {
            "title": "Callback URL",
            "type": "string",
            "description": "Optional. Each result is also POSTed as JSON to this URL as soon as it is ready (for example an n8n, Make or Zapier webhook)."
          },
          "onlyChanged": {
            "title": "Only changed responses",
            "type": "boolean",
            "description": "For scheduled runs: save (and pay for) a response only when its status or body differs from the last run with the same monitor name. Unchanged responses are skipped and not charged.",
            "default": false
          },
          "monitorName": {
            "title": "Monitor name",
            "type": "string",
            "description": "Keeps the memory of \"Only changed responses\" separate per watch list.",
            "default": "default"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}