{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/desearch-ai/json-schema/desearch-ai-search-request-schema.json",
  "title": "SearchRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/desearch-ai-search-api-openapi.yml#/components/schemas/SearchRequest",
  "properties": {
    "query": {
      "type": "string",
      "maxLength": 2000,
      "minLength": 1,
      "title": "Query",
      "description": "Search query."
    },
    "mode": {
      "type": "string",
      "enum": [
        "fast",
        "balanced"
      ],
      "title": "Mode",
      "description": "`fast` returns results sooner. `balanced` favors relevance.",
      "default": "balanced"
    },
    "count": {
      "type": "integer",
      "multipleOf": 5.0,
      "maximum": 20.0,
      "minimum": 10.0,
      "title": "Count",
      "description": "Number of results to return: 10, 15 or 20.",
      "default": 10
    },
    "start_date": {
      "anyOf": [
        {
          "type": "string",
          "format": "date"
        },
        {
          "type": "null"
        }
      ],
      "title": "Start Date",
      "description": "Only return pages published on or after this date (YYYY-MM-DD)."
    },
    "end_date": {
      "anyOf": [
        {
          "type": "string",
          "format": "date"
        },
        {
          "type": "null"
        }
      ],
      "title": "End Date",
      "description": "Only return pages published on or before this date (YYYY-MM-DD)."
    },
    "highlights": {
      "type": "boolean",
      "title": "Highlights",
      "description": "Include the passage that best matches the query.",
      "default": true
    },
    "page_text": {
      "type": "boolean",
      "title": "Page Text",
      "description": "Include the full page text.",
      "default": false
    }
  },
  "type": "object",
  "required": [
    "query"
  ]
}