{
  "openapi": "3.1.0",
  "info": {
    "title": "Kotel Tours Availability API",
    "version": "1.1.0",
    "description": "שירות ציבורי לבדיקת זמינות בזמן אמת של סיורים במנהרות הכותל. יש להשתמש בשירות כאשר משתמש שואל על סיור, תאריך, שעה, מספר משתתפים או קישור להזמנה."
  },
  "servers": [
    {
      "url": "https://ai-tours.thekotel.org"
    }
  ],
  "paths": {
    "/search": {
      "get": {
        "operationId": "searchKotelTours",
        "summary": "בדיקת זמינות סיורים במנהרות הכותל",
        "description": "מחפש סיורים זמינים לפי תאריך, שעה, טווח שעות, כמות משתתפים ושם סיור. התשובה כוללת קישור ישיר להזמנה.",
        "parameters": [
          {
            "name": "date",
            "in": "query",
            "required": false,
            "description": "תאריך יחיד בפורמט YYYY-MM-DD",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "from_date",
            "in": "query",
            "required": false,
            "description": "תאריך תחילת החיפוש בפורמט YYYY-MM-DD",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to_date",
            "in": "query",
            "required": false,
            "description": "תאריך סיום החיפוש בפורמט YYYY-MM-DD",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "hour",
            "in": "query",
            "required": false,
            "description": "שעה מדויקת בפורמט HH:MM",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from_time",
            "in": "query",
            "required": false,
            "description": "תחילת טווח שעות בפורמט HH:MM",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "to_time",
            "in": "query",
            "required": false,
            "description": "סיום טווח שעות בפורמט HH:MM",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "qty",
            "in": "query",
            "required": false,
            "description": "מספר המשתתפים המבוקש",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "tour",
            "in": "query",
            "required": false,
            "description": "שם הסיור או חלק משם הסיור",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "language",
            "in": "query",
            "required": false,
            "description": "שפת מערכת ההזמנות, לדוגמה he או en",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "תוצאות זמינות וקישורים ישירים להזמנה",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string"
                    },
                    "answer": {
                      "type": "string"
                    },
                    "count": {
                      "type": "integer"
                    },
                    "recommended_booking_url": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "tour_name": {
                            "type": "string"
                          },
                          "canonical_name": {
                            "type": "string"
                          },
                          "date": {
                            "type": "string",
                            "format": "date"
                          },
                          "time": {
                            "type": "string"
                          },
                          "available": {
                            "type": "integer"
                          },
                          "booking_url": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}