{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/fastcrw-com/json-schema/fastcrw-com-crawl-request-schema.json",
  "title": "CrawlRequest",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/fastcrw-com-openapi.json#/components/schemas/CrawlRequest",
  "type": "object",
  "required": [
    "url"
  ],
  "properties": {
    "url": {
      "type": "string",
      "format": "uri"
    },
    "maxPages": {
      "type": "integer",
      "minimum": 1,
      "default": 100
    },
    "maxDepth": {
      "type": "integer",
      "minimum": 0,
      "default": 2
    },
    "headers": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "Custom HTTP request headers applied to every page the crawl fetches. On a browser render they apply to every request the page makes, subresources included, so avoid cross-origin-sensitive credentials here."
    },
    "scrapeOptions": {
      "$ref": "#/$defs/CrawlScrapeOptions"
    },
    "formats": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/CrawlOutputFormat"
      },
      "default": [
        "markdown"
      ]
    },
    "onlyMainContent": {
      "type": "boolean",
      "default": true
    },
    "jsonSchema": {
      "type": "object"
    },
    "renderJs": {
      "type": [
        "boolean",
        "null"
      ]
    },
    "waitFor": {
      "type": "integer",
      "minimum": 0
    },
    "renderer": {
      "type": "string",
      "enum": [
        "auto",
        "lightpanda",
        "chrome",
        "chrome_proxy",
        "playwright",
        "camoufox",
        "impersonated-http"
      ]
    },
    "country": {
      "type": "string",
      "description": "2-letter ISO 3166-1 alpha-2 proxy egress country."
    },
    "proxyList": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "proxyRotation": {
      "type": "string",
      "enum": [
        "round_robin",
        "random",
        "sticky_per_host"
      ]
    }
  },
  "$defs": {
    "CrawlOutputFormat": {
      "type": "string",
      "enum": [
        "markdown",
        "html",
        "rawHtml",
        "plainText",
        "links",
        "images",
        "json"
      ],
      "description": "The crawl path runs extraction and the optional LLM `json` pass. It does not produce `summary`, `screenshot` or inline `changeTracking`; use `/v1/scrape` for those."
    },
    "CrawlScrapeOptions": {
      "type": "object",
      "description": "Per-page scrape settings. Every key here may also be sent at the top level; an explicit top-level value wins.",
      "properties": {
        "formats": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CrawlOutputFormat"
          },
          "default": [
            "markdown"
          ]
        },
        "onlyMainContent": {
          "type": "boolean",
          "default": true
        },
        "jsonSchema": {
          "type": "object",
          "description": "JSON Schema for structured extraction, with `formats: [\"json\"]`."
        },
        "renderJs": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "null = auto-detect, true = force JS, false = never use a browser tier."
        },
        "waitFor": {
          "type": "integer",
          "minimum": 0,
          "description": "Milliseconds to wait after JS rendering on each page."
        },
        "headers": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "Custom HTTP request headers applied to every page the crawl fetches. On a browser render they apply to every request the page makes, subresources included, so avoid cross-origin-sensitive credentials here."
        }
      }
    }
  }
}