{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/serpkite-com/json-schema/serpkite-com-crawl-request-schema.json",
  "title": "CrawlRequest",
  "x-generated": "2026-10-31",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/serpkite-com-openapi.yaml#/components/schemas/CrawlRequest",
  "type": "object",
  "required": [
    "url"
  ],
  "properties": {
    "url": {
      "type": "string",
      "format": "uri",
      "description": "Start page (always read: path filters and robots.txt apply to the pages found from it)"
    },
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 1000,
      "default": 25,
      "description": "Maximum pages read (and credits reserved)"
    },
    "max_depth": {
      "type": "integer",
      "minimum": 0,
      "maximum": 10,
      "default": 2,
      "description": "Link hops from url (sitemap pages count as 1 hop; 0 reads only url)"
    },
    "include_paths": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "maxItems": 20,
      "description": "Regular expressions matched against the URL path; follow only paths matching one"
    },
    "exclude_paths": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "maxItems": 20,
      "description": "Regular expressions matched against the URL path; never follow paths matching one"
    },
    "include_subdomains": {
      "type": "boolean",
      "default": false
    },
    "sitemap": {
      "type": "string",
      "enum": [
        "include",
        "only",
        "skip"
      ],
      "default": "include",
      "description": "`include` also seeds the crawl with the site's sitemap URLs (after the start page's links), `only` reads the start page and sitemap URLs without following links, `skip` follows links only"
    },
    "query": {
      "type": "string",
      "maxLength": 512,
      "description": "Read the pages most relevant to these words first (best-first crawl)"
    },
    "ignore_query_parameters": {
      "type": "boolean",
      "default": false,
      "description": "Treat URLs that differ only in their query string as one page"
    },
    "format": {
      "type": "string",
      "enum": [
        "markdown",
        "text"
      ],
      "default": "markdown"
    },
    "include_links": {
      "type": "boolean",
      "default": false,
      "description": "Return each page's outbound links"
    },
    "max_tokens": {
      "type": "integer",
      "minimum": 100,
      "maximum": 100000,
      "description": "Trim each page to this many tokens"
    },
    "max_age": {
      "type": "integer",
      "minimum": 0,
      "maximum": 2592000,
      "description": "Accept cached pages up to this many seconds old (0.5 credit each)"
    },
    "webhook_url": {
      "type": "string",
      "format": "uri",
      "description": "Receives the signed `crawl.completed` event. Defaults to the account webhook"
    }
  }
}