{
  "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. Schedule it to save only changed responses. Failed requests are free.",
    "version": "0.1",
    "x-build-id": "MEvfs0o0zQ8lm5cPu"
  },
  "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": "JSON list of requests. Each item: {\"url\": \"https://api.example.com/items/1\", \"method\": \"GET\", \"headers\": {\"Accept\": \"application/json\"}, \"query\": {\"page\": 2}, \"body\": \"text\" or {JSON}, \"bodyType\": \"json|form|text|raw\", \"label\": \"your name for the row\", \"userData\": {anything returned with the row}}. Only url is required. method defaults to GET, so set \"method\": \"POST\" (or PUT, PATCH) when you send a body. A URL without a scheme gets https://. A plain string such as \"https://example.com\" is read as a GET URL. You can mix this field with curl commands and the URL template. Leave all request fields empty to try a small public sample API."
          },
          "curlCommands": {
            "title": "curl commands",
            "type": "string",
            "description": "One or more curl commands, each starting with the word curl (for example \"Copy as cURL\" from browser developer tools or API docs). Example: curl -X POST https://api.example.com/items -H \"Content-Type: application/json\" -d '{\"name\":\"a\"}'. 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\". Example: https://api.example.com/users/{{id}} with rows [{\"id\": 1}, {\"id\": 2}] sends two requests. Values are URL-encoded; a placeholder at the very start (for example {{url}}) is inserted as is. Dot paths work: {{company.domain}}. A row that lacks a placeholder field gets an error row and is not sent or charged."
          },
          "templateRows": {
            "title": "Template rows",
            "type": "array",
            "description": "JSON list of objects, one request per object, for example [{\"id\": 1}, {\"id\": 2}]. Each row is returned in its result as userData, so you can join results back to your table. Empty: the template is sent once."
          },
          "templateMethod": {
            "title": "Template method",
            "enum": [
              "GET",
              "POST",
              "PUT",
              "PATCH",
              "DELETE",
              "HEAD"
            ],
            "type": "string",
            "description": "HTTP method for template requests. Default GET.",
            "default": "GET"
          },
          "templateHeaders": {
            "title": "Template headers",
            "type": "object",
            "description": "Headers for template requests, as a JSON object. Values may use {{field}}, for example {\"X-Customer\": \"{{customerId}}\"}. Added on top of \"Headers for all requests\"."
          },
          "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}}}. Empty: no body."
          },
          "templateBodyType": {
            "title": "Template body type",
            "enum": [
              "json",
              "form",
              "text",
              "raw"
            ],
            "type": "string",
            "description": "How the template body is sent and which Content-Type it gets: JSON (application/json, default), Form (application/x-www-form-urlencoded, values URL-encoded), Plain text, or Raw (no Content-Type; set your own in Template headers).",
            "default": "json"
          },
          "headers": {
            "title": "Headers for all requests",
            "type": "object",
            "description": "JSON object of headers sent with every request, for example {\"Authorization\": \"Bearer YOUR_API_TOKEN\", \"Accept\": \"application/json\"}. A request's own headers win when the name is the same. Default: none, plus the Actor's User-Agent and Accept: */*."
          },
          "bodyType": {
            "title": "Default body type",
            "enum": [
              "raw",
              "json",
              "form",
              "text"
            ],
            "type": "string",
            "description": "How a request body is sent when the request item has no bodyType. Default raw: text is sent as is with the Content-Type from your headers. 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": "Seconds allowed for one attempt of one request, including redirects and reading the body. Default 30, from 1 to 300. Timed-out requests get an error row and are not charged.",
            "default": 30
          },
          "maxRetries": {
            "title": "Max retries",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "How many extra attempts after HTTP 429, any 5xx or a network error, with back-off (1 s, 2 s, 4 s ...). Default 3, from 0 to 10. Retry-After is respected (up to 120 s) and pauses every request to that host. Retries of one request count as one response. 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. Default 5, from 1 to 50. Lower it for APIs with strict rate limits.",
            "default": 5
          },
          "followRedirects": {
            "title": "Follow redirects",
            "type": "boolean",
            "description": "Follow up to 10 redirects (default on). Each hop is checked against blocked addresses. Authorization and Cookie headers are dropped when the host changes. Off: the 3xx response itself is returned.",
            "default": true
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Optional. Send requests through Apify Proxy, for example to get country-specific answers. Off by default (direct requests from Apify servers). 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": "What goes into the body column. Auto (default): JSON responses are saved as parsed JSON, everything else as text. JSON: parse, fall back to text. Text: always text. Markdown: HTML pages become clean Markdown (scripts, styles, navigation and footers removed, links made absolute), handy for LLMs. None: no body, only status, timing and extracted fields (smallest output).",
            "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 or items[0].price. Rename with name=path, for example city=address.city. Missing paths give null. Default: none (no fields column). 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 as a headers object (lower-case names). Default off.",
            "default": false
          },
          "maxBodyBytes": {
            "title": "Max body size (bytes)",
            "minimum": 0,
            "maximum": 8000000,
            "type": "integer",
            "description": "Bytes of each response body that are downloaded and saved. Default 1,000,000 (1 MB), from 0 to 8,000,000. Longer bodies are cut (bodyTruncated: true) and the rest is not downloaded.",
            "default": 1000000
          },
          "callbackUrl": {
            "title": "Callback URL",
            "type": "string",
            "description": "Optional webhook URL. Each result row is also POSTed as JSON to this URL as soon as it is ready, for example an n8n, Make or Zapier webhook. Failed callbacks are counted in the run summary and do not stop the run. Default: empty (off)."
          },
          "onlyChanged": {
            "title": "Only changed responses",
            "type": "boolean",
            "description": "For scheduled runs (Apify Schedules, for example once a day). Off by default: every response is saved and charged. On: a response is saved, and charged, only when its HTTP status or body differs from the last run with the same Monitor name. The first run saves everything with changeStatus \"new\"; later runs save only changed responses (\"changed\"). Unchanged responses are skipped and not charged. Requests without a response still get an error row (not charged). The memory is kept in your account's key-value store named http-request-state.",
            "default": false
          },
          "monitorName": {
            "title": "Monitor name",
            "type": "string",
            "description": "Name of the watch list for \"Only changed responses\". Runs with the same name compare against each other; use a different name for each separate list, for example \"competitor-prices\" or \"status-pages\". Default \"default\". Requests are matched by method, URL and body.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}