{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/tale-dev/json-schema/tale-dev-website-search-results-schema.json",
  "title": "WebsiteSearchResults",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/tale-dev-websites-api-openapi.yml#/components/schemas/WebsiteSearchResults",
  "type": "object",
  "required": [
    "results",
    "total"
  ],
  "properties": {
    "results": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/WebsiteSearchHit"
      }
    },
    "total": {
      "type": "integer",
      "description": "How many chunks match, across the whole site — not the size of this answer: it can exceed `results.length`, which `limit` caps. This door returns only the first `limit` hits and has no pagination, so `total` is the count, not a cursor."
    }
  },
  "$defs": {
    "WebsiteSearchHit": {
      "type": "object",
      "required": [
        "url",
        "title",
        "content",
        "chunkIndex",
        "score"
      ],
      "properties": {
        "url": {
          "type": "string"
        },
        "title": {
          "type": [
            "string",
            "null"
          ]
        },
        "content": {
          "type": "string",
          "description": "The matching passage"
        },
        "chunkIndex": {
          "type": "integer"
        },
        "score": {
          "type": "number",
          "description": "The BM25 weight of the keyword match (ParadeDB `paradedb.score`): unbounded and comparable only within one response — never a cosine or a confidence, and never comparable across sites or calls. `0` on every hit when the knowledge database lacks ParadeDB and the door fell back to a substring match. This door has no dense leg; for `similarity` and `minSimilarity`, use `POST /api/v1/knowledge/search` with `corpus: \"web\"`."
        }
      }
    }
  }
}