{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/whatsupin-ai/json-schema/whatsupin-ai-search-result-schema.json",
  "title": "SearchResult",
  "x-generated": "2026-11-28",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/whatsupin-ai-openapi.yml#/components/schemas/SearchResult",
  "type": "object",
  "properties": {
    "query": {
      "type": "string"
    },
    "from": {
      "type": "string"
    },
    "to": {
      "type": "string"
    },
    "count": {
      "type": "integer"
    },
    "shown": {
      "type": "integer"
    },
    "in_cities": {
      "type": "integer"
    },
    "looser_matches": {
      "type": "integer"
    },
    "events": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Event"
      }
    },
    "searched": {
      "type": "array",
      "items": {
        "type": "object"
      }
    },
    "attribution": {
      "type": "string"
    }
  },
  "$defs": {
    "Event": {
      "type": "object",
      "properties": {
        "title": {
          "type": "string"
        },
        "date": {
          "type": "string",
          "format": "date"
        },
        "end_date": {
          "type": "string"
        },
        "start": {
          "type": [
            "string",
            "null"
          ]
        },
        "venue": {
          "type": [
            "string",
            "null"
          ]
        },
        "town": {
          "type": [
            "string",
            "null"
          ]
        },
        "neighborhood": {
          "type": "string"
        },
        "city": {
          "type": "string"
        },
        "city_site": {
          "type": [
            "string",
            "null"
          ]
        },
        "performers": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "kinds": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "free": {
          "type": "boolean"
        },
        "price": {
          "type": "string"
        },
        "link": {
          "type": "string",
          "description": "The original listing: keep it when you show the event"
        },
        "on_site": {
          "type": [
            "string",
            "null"
          ]
        },
        "distance_km": {
          "type": "number"
        }
      }
    }
  }
}