{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/sourceacts-com/json-schema/sourceacts-com-search-request-schema.json",
  "title": "SearchRequest",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/sourceacts-com-openapi.json#/components/schemas/SearchRequest",
  "properties": {
    "query": {
      "type": "string",
      "maxLength": 300,
      "minLength": 2,
      "title": "Query",
      "description": "Keywords, CELEX number, or ELI URI to search across official sources."
    },
    "language": {
      "type": "string",
      "title": "Language",
      "description": "ISO 639-1 language code for titles (en, fr, de, da, es, it, nl, pt, sv, pl).",
      "default": "en"
    },
    "date_from": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Date From",
      "description": "Inclusive start date YYYY-MM-DD."
    },
    "date_to": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Date To",
      "description": "Inclusive end date YYYY-MM-DD."
    },
    "document_type": {
      "type": "string",
      "enum": [
        "all",
        "regulation",
        "directive",
        "decision",
        "treaty",
        "case-law"
      ],
      "title": "Document Type",
      "description": "Filter by instrument type when the source supports it.",
      "default": "all"
    },
    "source": {
      "type": "string",
      "enum": [
        "all",
        "eurlex",
        "wto",
        "un",
        "uk",
        "us",
        "india",
        "brazil",
        "canada",
        "australia",
        "denmark"
      ],
      "title": "Source",
      "description": "Official source: eurlex, uk, us, australia, canada, denmark, wto, un, brazil, or all.",
      "default": "eurlex"
    },
    "page": {
      "type": "integer",
      "maximum": 200.0,
      "minimum": 1.0,
      "title": "Page",
      "default": 1
    },
    "page_size": {
      "type": "integer",
      "maximum": 100.0,
      "minimum": 1.0,
      "title": "Page Size",
      "default": 10
    }
  },
  "type": "object",
  "required": [
    "query"
  ]
}