{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/typesearch-ai/json-schema/typesearch-ai-contents-response-schema.json",
  "title": "ContentsResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/typesearch-ai-contents-api-openapi.yml#/components/schemas/ContentsResponse",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "object": {
      "type": "string",
      "const": "contents"
    },
    "results": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "ok",
              "error"
            ]
          },
          "error": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  }
                },
                "required": [
                  "code",
                  "message"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "title": {
            "type": [
              "string",
              "null"
            ]
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "published_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "source": {
            "type": [
              "string",
              "null"
            ]
          },
          "excerpt": {
            "description": "A very short verbatim excerpt (up to 25 words), never from the first paragraph: the one about the query if there is one. Null when the article can’t be quoted (short, paid, or the publisher asked for no snippets).",
            "type": [
              "string",
              "null"
            ]
          },
          "highlights": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "relevance": {
            "description": "With query: probability that the article is about it.",
            "type": [
              "number",
              "null"
            ]
          }
        },
        "required": [
          "url",
          "status",
          "error",
          "title",
          "description",
          "published_at",
          "source",
          "excerpt",
          "highlights",
          "relevance"
        ],
        "additionalProperties": false
      }
    },
    "usage": {
      "type": "object",
      "properties": {
        "tokens": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991,
          "description": "Model tokens used by this request. 0 when it came from the cache."
        },
        "calls": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        "cost_usd": {
          "description": "What this request was billed, in USD: the list price of its mode (see `pricing` in GET /v1/usage), per query. 0 when it came from the cache. Null in partial results.",
          "type": [
            "number",
            "null"
          ]
        },
        "duration_ms": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        }
      },
      "required": [
        "tokens",
        "calls",
        "cost_usd",
        "duration_ms"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "id",
    "object",
    "results",
    "usage"
  ],
  "additionalProperties": false
}