{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/plainradar-com/json-schema/plainradar-com-search-result-schema.json",
  "title": "SearchResult",
  "x-generated": "2026-11-21",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/plainradar-com-openapi.json#/components/schemas/SearchResult",
  "type": "object",
  "properties": {
    "query": {
      "type": "string"
    },
    "pages": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Page"
      },
      "description": "The last 24 hours; with `days` 2-7, a second page with the days before."
    },
    "stats": {
      "type": "object",
      "description": "`stories`: the stories this call found (those over `limit` too); `hidden`: stories the filters left out; `seconds`: how long the call took.",
      "properties": {
        "stories": {
          "type": "integer"
        },
        "hidden": {
          "type": "integer"
        },
        "seconds": {
          "type": "number"
        }
      }
    },
    "filters": {
      "type": "object",
      "description": "What the search ran with: the language and country it was limited to, the text searched, and the noise filters.",
      "additionalProperties": true
    },
    "briefing": {
      "type": [
        "object",
        "null"
      ],
      "description": "With `briefing`: sentences on the main news, each with the ids of the stories it comes from.",
      "additionalProperties": true
    }
  },
  "$defs": {
    "Page": {
      "type": "object",
      "properties": {
        "from": {
          "type": "string",
          "description": "Start of the page's time window"
        },
        "to": {
          "type": "string",
          "description": "End of the page's time window"
        },
        "stories": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Story"
          }
        },
        "omitted": {
          "type": "integer",
          "description": "Stories over `limit` that were left out"
        },
        "updates": {
          "type": "array",
          "description": "More coverage for stories returned by earlier calls: their id and new number of sources.",
          "items": {
            "type": "object",
            "additionalProperties": true
          }
        },
        "more": {
          "type": "boolean",
          "description": "Further stories are available with `cursor`"
        },
        "cursor": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "Story": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "title": {
          "type": "string"
        },
        "link": {
          "type": "string"
        },
        "published": {
          "type": "string",
          "description": "When it was published (ISO 8601)"
        },
        "feed": {
          "type": "string",
          "description": "The source's name"
        },
        "summary": {
          "type": "string"
        },
        "image": {
          "type": "string"
        },
        "sources": {
          "type": "integer",
          "description": "How many sources cover the story"
        },
        "relevant": {
          "type": "string",
          "description": "The relevance check's answer"
        }
      }
    }
  }
}