{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/desearch-ai/json-schema/desearch-ai-search-response-schema.json",
  "title": "SearchResponse",
  "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/SearchResponse",
  "properties": {
    "results": {
      "items": {
        "$ref": "#/$defs/SearchResult"
      },
      "type": "array",
      "title": "Results"
    },
    "cost_usd": {
      "type": "number",
      "title": "Cost Usd",
      "description": "Cost charged for this request in USD."
    },
    "usage_count": {
      "type": "integer",
      "title": "Usage Count",
      "description": "Billable usage units for this request."
    },
    "service": {
      "type": "string",
      "title": "Service",
      "description": "Pricing service used for the charge."
    },
    "currency": {
      "type": "string",
      "title": "Currency",
      "description": "Currency of `cost_usd`."
    }
  },
  "type": "object",
  "required": [
    "results",
    "cost_usd",
    "usage_count",
    "service",
    "currency"
  ],
  "$defs": {
    "SearchResult": {
      "properties": {
        "url": {
          "type": "string",
          "title": "Url"
        },
        "title": {
          "type": "string",
          "title": "Title"
        },
        "published_date": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Published Date",
          "description": "Publication date (YYYY-MM-DD) when known."
        },
        "highlights": {
          "anyOf": [
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "title": "Highlights",
          "description": "Returned unless the request sets `highlights: false`."
        },
        "page_text": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Page Text",
          "description": "Returned only when the request sets `page_text: true`."
        }
      },
      "type": "object",
      "required": [
        "url",
        "title"
      ],
      "title": "SearchResult"
    }
  }
}