{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/semantic-visions-s-r-o/json-schema/semantic-visions-s-r-o-search-summary-request-schema.json",
  "title": "SearchSummaryRequest",
  "description": "Request model for the search summary endpoint.",
  "x-generated": "2026-11-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/semantic-visions-s-r-o-openapi.yml#/components/schemas/SearchSummaryRequest",
  "properties": {
    "date_from": {
      "type": "string",
      "format": "date",
      "title": "Date From",
      "description": "Start date for the search range (YYYY-MM-DD)"
    },
    "date_to": {
      "anyOf": [
        {
          "type": "string",
          "format": "date"
        },
        {
          "type": "null"
        }
      ],
      "title": "Date To",
      "description": "End date for the search range (YYYY-MM-DD). End date of the search range."
    },
    "entity_type": {
      "anyOf": [
        {
          "items": {
            "type": "string",
            "enum": [
              "commodity",
              "company",
              "industry",
              "legal_entity",
              "location"
            ]
          },
          "type": "array"
        },
        {
          "type": "string",
          "enum": [
            "commodity",
            "company",
            "industry",
            "legal_entity",
            "location"
          ]
        },
        {
          "type": "null"
        }
      ],
      "title": "Entity Type",
      "description": "Type of entity to search."
    },
    "count": {
      "type": "integer",
      "maximum": 10000.0,
      "minimum": 1.0,
      "title": "Count",
      "description": "Number of results to return",
      "default": 100
    },
    "sort_by": {
      "anyOf": [
        {
          "items": {
            "type": "string",
            "enum": [
              "start_time",
              "-start_time",
              "end_time",
              "-end_time",
              "event_title",
              "-event_title",
              "event_category_name",
              "-event_category_name",
              "event_type_name",
              "-event_type_name",
              "impact_type_name",
              "-impact_type_name",
              "sentiment_number",
              "-sentiment_number",
              "articles_count",
              "-articles_count"
            ]
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Sort By",
      "description": "List of fields to sort by. Prefix with \"-\" for descending order.",
      "default": [
        "start_time",
        "-articles_count"
      ]
    },
    "cursor": {
      "anyOf": [
        {
          "items": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "string"
              }
            ]
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Cursor",
      "description": "Pagination cursor for the next page. Pass the cursor from a previous response unchanged, with the same sort_by. The returned cursor includes a UUID tie-breaker, so it is one element longer than sort_by."
    },
    "entity_ids": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Entity Ids",
      "description": "Filter by specific entity IDs. Can be a single string or list of strings. Valid entity IDs can be retrieved from the corresponding entity endpoints."
    },
    "impact_types": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Impact Types",
      "description": "Filter by SvEye taxonomy elements IDs (Impact Types)."
    },
    "event_categories": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Event Categories",
      "description": "Filter by SvEye taxonomy elements IDs (Event Categories)."
    },
    "event_types": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Event Types",
      "description": "Filter by SvEye taxonomy elements IDs (Event Types)."
    },
    "sentiment_list": {
      "anyOf": [
        {
          "items": {
            "type": "string",
            "enum": [
              "very positive",
              "positive",
              "neutral",
              "negative",
              "very negative"
            ]
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Sentiment List",
      "description": "Filter by sentiment list. Valid values are: 'very positive', 'positive', 'neutral', 'negative', 'very negative'."
    },
    "article_count_min": {
      "type": "integer",
      "title": "Article Count Min",
      "description": "Filter by minimum number of articles.",
      "default": 0
    },
    "article_count_max": {
      "type": "integer",
      "title": "Article Count Max",
      "description": "Filter by maximum number of articles.",
      "default": 10000
    }
  },
  "additionalProperties": false,
  "type": "object",
  "required": [
    "date_from",
    "date_to"
  ]
}