{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/serpkite-com/json-schema/serpkite-com-extract-request-schema.json",
  "title": "ExtractRequest",
  "x-generated": "2026-10-31",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/serpkite-com-openapi.yaml#/components/schemas/ExtractRequest",
  "type": "object",
  "required": [
    "urls"
  ],
  "properties": {
    "urls": {
      "type": "array",
      "items": {
        "type": "string",
        "format": "uri"
      },
      "minItems": 1,
      "maxItems": 20,
      "description": "HTML pages or PDFs (duplicates are dropped)"
    },
    "format": {
      "type": "string",
      "enum": [
        "markdown",
        "text",
        "html"
      ],
      "default": "markdown"
    },
    "query": {
      "type": "string",
      "maxLength": 4096,
      "description": "What highlights are ranked against"
    },
    "highlights": {
      "type": "integer",
      "minimum": 0,
      "maximum": 10,
      "default": 0,
      "description": "Query-ranked passages per page (BM25; needs query)"
    },
    "max_tokens": {
      "type": "integer",
      "minimum": 100,
      "maximum": 100000,
      "description": "Trim each page's markdown or text to about this many tokens"
    },
    "include_links": {
      "type": "boolean",
      "default": false
    },
    "include_images": {
      "type": "boolean",
      "default": false
    },
    "max_age": {
      "type": "integer",
      "minimum": 0,
      "maximum": 2592000,
      "description": "Accept a cached page up to this many seconds old (0.5 credit)"
    },
    "country": {
      "type": "string",
      "description": "Fetch the pages as seen from this country (ISO 3166-1 alpha-2)"
    },
    "timeout": {
      "type": "integer",
      "minimum": 1,
      "maximum": 90,
      "default": 50,
      "description": "Seconds to wait for the pages; a page still loading is listed in `failed` (`upstream_timeout`, not charged). Default 75 with summary or output_schema"
    },
    "summary": {
      "type": "boolean",
      "default": false,
      "description": "Add a 3-6 sentence AI summary of each page (+4 credits per page; focused on `query` when set)"
    },
    "output_schema": {
      "type": "object",
      "additionalProperties": true,
      "description": "A JSON Schema (at most 16 KB): each page's data is returned as JSON matching it in `output` (+4 credits per page)"
    },
    "prompt": {
      "type": "string",
      "maxLength": 4096,
      "description": "Guides output_schema extraction (what to pick, how to normalise); needs output_schema"
    }
  }
}