{
 "openapi": "3.1.0",
 "info": {
  "title": "GeNEVERsleep public events API",
  "version": "1.3.0",
  "summary": "Nightlife agenda for Geneva, Lausanne, Nyon, Romandy and neighbouring France (read-only, no key).",
  "description": "Read-only, no API key, CORS open. Not a reuse licence and not every listing: RA, Ticketcorner and Eventfrog are excluded; Shotgun, La Décadanse and PETZI are not cleared for redistribution. Link each event url and its source_links. Data rebuilt nightly from public listings; cached 5 minutes. Be gentle: cache on your side, max ~1 request/second. Remote MCP server: https://mcp.geneversleep.ch/mcp (also https://geneversleep.ch/mcp)",
  "contact": {
   "name": "GeNEVERsleep",
   "email": "hello@geneversleep.ch",
   "url": "https://geneversleep.ch/api"
  },
  "license": {
   "name": "Not a reuse licence — see the rights checklist",
   "url": "https://geneversleep.ch/api#rights"
  },
  "x-agent-guidance": [
   "Dates are Europe/Zurich nights; events before 06:00 belong to the previous night.",
   "Always show the event `url` (GeNEVERsleep page) and `ticket_url` (direct ticket link, else the original listing; `ticket_url_kind` says which), and name the sources in `source_links`.",
   "To add an event to a calendar, give the user `ics_url` (text/calendar file) or `google_calendar_url`. Do not build .ics files yourself.",
   "Never invent events, prices or times that are not in the response. An empty `events` array means nothing is listed.",
   "`price` is free text as published by the source; it can be missing. Prefer the MCP tool search_events for max_price_chf filtering."
  ]
 },
 "servers": [
  {
   "url": "https://geneversleep.ch"
  }
 ],
 "paths": {
  "/api/v1/events": {
   "get": {
    "operationId": "searchEvents",
    "summary": "Search upcoming events",
    "parameters": [
     {
      "name": "date",
      "in": "query",
      "required": false,
      "description": "Single night YYYY-MM-DD",
      "schema": {
       "type": "string",
       "format": "date"
      }
     },
     {
      "name": "from",
      "in": "query",
      "required": false,
      "description": "Start night (default: tonight)",
      "schema": {
       "type": "string",
       "format": "date"
      }
     },
     {
      "name": "to",
      "in": "query",
      "required": false,
      "description": "End night (inclusive)",
      "schema": {
       "type": "string",
       "format": "date"
      }
     },
     {
      "name": "when",
      "in": "query",
      "required": false,
      "description": "Shortcut (overrides date/from/to)",
      "schema": {
       "type": "string",
       "enum": [
        "tonight",
        "tomorrow",
        "weekend"
       ]
      }
     },
     {
      "name": "city",
      "in": "query",
      "required": false,
      "description": "Area or city slug (geneve, lausanne, nyon, la-cote, france-voisine, annemasse, fribourg, neuchatel, valais, riviera...). Alias: area",
      "schema": {
       "type": "string"
      },
      "example": "geneve"
     },
     {
      "name": "area",
      "in": "query",
      "required": false,
      "description": "Alias of city",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "venue",
      "in": "query",
      "required": false,
      "description": "Venue slug (see /api/v1/venues)",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "genre",
      "in": "query",
      "required": false,
      "description": "Genre, e.g. techno, house, jazz, hip-hop, rock/indie",
      "schema": {
       "type": "string",
       "examples": [
        "electronic",
        "techno",
        "house",
        "hip-hop",
        "rnb",
        "live music",
        "jazz",
        "rock/indie",
        "punk",
        "metal",
        "pop/chanson",
        "reggae/dub",
        "latin",
        "afro",
        "soul/funk",
        "blues/folk",
        "classical",
        "experimental",
        "world",
        "festival",
        "club night",
        "queer",
        "karaoke/blind test",
        "bar",
        "apéro"
       ]
      }
     },
     {
      "name": "free",
      "in": "query",
      "required": false,
      "description": "Only free / pay-what-you-want",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "q",
      "in": "query",
      "required": false,
      "description": "Free text (title, venue, artist, genre); accents ignored",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "lang",
      "in": "query",
      "required": false,
      "description": "fr (default) or en: language of descriptions and page URLs",
      "schema": {
       "type": "string",
       "enum": [
        "fr",
        "en"
       ],
       "default": "fr"
      }
     },
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "description": "1-100 (default 20)",
      "schema": {
       "type": "integer",
       "minimum": 1,
       "maximum": 100,
       "default": 20
      }
     },
     {
      "name": "offset",
      "in": "query",
      "required": false,
      "description": "Skip N results",
      "schema": {
       "type": "integer",
       "minimum": 0
      }
     },
     {
      "name": "cursor",
      "in": "query",
      "required": false,
      "description": "meta.next_cursor of the previous page",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Events sorted by date and time",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "meta": {
           "type": "object",
           "properties": {
            "total": {
             "type": "integer"
            },
            "count": {
             "type": "integer"
            },
            "limit": {
             "type": "integer"
            },
            "offset": {
             "type": "integer"
            },
            "next_cursor": {
             "type": [
              "string",
              "null"
             ]
            },
            "from": {
             "type": "string"
            },
            "to": {
             "type": [
              "string",
              "null"
             ]
            },
            "lang": {
             "type": "string"
            },
            "license": {
             "type": "string"
            },
            "docs": {
             "type": "string"
            }
           }
          },
          "events": {
           "type": "array",
           "items": {
            "$ref": "#/components/schemas/Event"
           }
          }
         }
        }
       }
      }
     },
     "429": {
      "description": "Rate limited (about 60 requests/minute per client). Retry after the Retry-After seconds."
     }
    },
    "tags": [
     "events"
    ],
    "description": "Typical agent calls: tonight in Geneva → when=tonight&city=geneve; this weekend free → when=weekend&free=true; a date range → from=YYYY-MM-DD&to=YYYY-MM-DD. Page with meta.next_cursor."
   }
  },
  "/api/v1/events/{id}": {
   "get": {
    "operationId": "getEvent",
    "summary": "One event",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "lang",
      "in": "query",
      "required": false,
      "description": "fr (default) or en: language of descriptions and page URLs",
      "schema": {
       "type": "string",
       "enum": [
        "fr",
        "en"
       ],
       "default": "fr"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "The event",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "event": {
           "$ref": "#/components/schemas/Event"
          }
         }
        }
       }
      }
     },
     "404": {
      "description": "Not found (past or unknown)"
     },
     "429": {
      "description": "Rate limited (about 60 requests/minute per client). Retry after the Retry-After seconds."
     }
    },
    "tags": [
     "events"
    ]
   }
  },
  "/api/v1/venues": {
   "get": {
    "operationId": "listVenues",
    "summary": "Venues with upcoming events",
    "parameters": [
     {
      "name": "city",
      "in": "query",
      "required": false,
      "description": "Area or city slug (geneve, lausanne, nyon, la-cote, france-voisine, annemasse, fribourg, neuchatel, valais, riviera...). Alias: area",
      "schema": {
       "type": "string"
      },
      "example": "geneve"
     },
     {
      "name": "genre",
      "in": "query",
      "required": false,
      "description": "Genre",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "lang",
      "in": "query",
      "required": false,
      "description": "fr (default) or en: language of descriptions and page URLs",
      "schema": {
       "type": "string",
       "enum": [
        "fr",
        "en"
       ],
       "default": "fr"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Venues",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "venues": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "slug": {
              "type": "string"
             },
             "name": {
              "type": "string"
             },
             "city": {
              "type": "string"
             },
             "area": {
              "type": [
               "string",
               "null"
              ]
             },
             "country": {
              "type": "string"
             },
             "upcoming": {
              "type": "integer"
             },
             "url": {
              "type": "string"
             }
            }
           }
          }
         }
        }
       }
      }
     },
     "429": {
      "description": "Rate limited (about 60 requests/minute per client). Retry after the Retry-After seconds."
     }
    },
    "tags": [
     "reference"
    ]
   }
  },
  "/api/v1/cities": {
   "get": {
    "operationId": "listCities",
    "summary": "Areas and cities",
    "parameters": [
     {
      "name": "lang",
      "in": "query",
      "required": false,
      "description": "fr (default) or en: language of descriptions and page URLs",
      "schema": {
       "type": "string",
       "enum": [
        "fr",
        "en"
       ],
       "default": "fr"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Areas and cities with upcoming counts",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited (about 60 requests/minute per client). Retry after the Retry-After seconds."
     }
    },
    "tags": [
     "reference"
    ]
   }
  },
  "/api/v1/genres": {
   "get": {
    "operationId": "listGenres",
    "summary": "Genres",
    "responses": {
     "200": {
      "description": "Genres with upcoming counts",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited (about 60 requests/minute per client). Retry after the Retry-After seconds."
     }
    },
    "tags": [
     "reference"
    ]
   }
  },
  "/barometre.json": {
   "get": {
    "operationId": "getNightlifeBarometer",
    "tags": [
     "reference"
    ],
    "summary": "Romandy Nightlife Barometer",
    "description": "Monthly counts of listed nights in French-speaking Switzerland and neighbouring France, by city, genre, price and weekday. Real published listings only; not an official census. Cite and link https://geneversleep.ch/barometre (EN: /en/barometer). Reuse with credit “Source: GeNEVERsleep.ch”.",
    "responses": {
     "200": {
      "description": "Barometer JSON (attribution, license, monthly counts)",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited (about 60 requests/minute per client). Retry after the Retry-After seconds."
     }
    }
   }
  }
 },
 "components": {
  "schemas": {
   "Event": {
    "type": "object",
    "required": [
     "id",
     "title",
     "date",
     "venue",
     "city",
     "url",
     "source_links",
     "is_free"
    ],
    "properties": {
     "id": {
      "type": "string"
     },
     "title": {
      "type": "string"
     },
     "date": {
      "type": "string",
      "format": "date",
      "description": "Night of the event (Europe/Zurich)"
     },
     "start_time": {
      "type": [
       "string",
       "null"
      ],
      "example": "23:00"
     },
     "venue": {
      "type": "string"
     },
     "venue_slug": {
      "type": [
       "string",
       "null"
      ]
     },
     "address": {
      "type": [
       "string",
       "null"
      ]
     },
     "city": {
      "type": "string"
     },
     "area": {
      "type": [
       "string",
       "null"
      ]
     },
     "region": {
      "type": "string"
     },
     "country": {
      "type": "string",
      "enum": [
       "CH",
       "FR"
      ]
     },
     "genres": {
      "type": "array",
      "items": {
       "type": "string"
      }
     },
     "price": {
      "type": [
       "string",
       "null"
      ],
      "description": "Free text as published by the source"
     },
     "is_free": {
      "type": "boolean",
      "description": "Free, entrée libre, prix libre / pay what you want"
     },
     "description": {
      "type": [
       "string",
       "null"
      ]
     },
     "artists": {
      "type": "array",
      "items": {
       "type": "string"
      }
     },
     "url": {
      "type": "string",
      "format": "uri",
      "description": "Canonical GeNEVERsleep page (link it)"
     },
     "venue_url": {
      "type": [
       "string",
       "null"
      ],
      "format": "uri"
     },
     "source_links": {
      "type": "array",
      "description": "Original listings: credit and link them",
      "items": {
       "type": "object",
       "properties": {
        "name": {
         "type": [
          "string",
          "null"
         ]
        },
        "url": {
         "type": "string",
         "format": "uri"
        }
       }
      }
     },
     "ticket_url": {
      "type": [
       "string",
       "null"
      ],
      "format": "uri",
      "description": "Direct ticket link: a ticketing page when one is listed, else the venue/organiser event page, else the original listing. Always one of source_links."
     },
     "ticket_url_kind": {
      "type": [
       "string",
       "null"
      ],
      "enum": [
       "ticketing",
       "event_page",
       "listing",
       null
      ],
      "description": "ticketing = ticket shop; event_page = venue, organiser or listing-site page; listing = agenda aggregator only"
     },
     "ics_url": {
      "type": "string",
      "format": "uri",
      "description": "Per-event iCalendar file (text/calendar, Europe/Zurich times). Served for upcoming events; fetch it when a user asks to add the event to a calendar."
     },
     "google_calendar_url": {
      "type": "string",
      "format": "uri",
      "description": "Redirects (302) to a prefilled Google Calendar event"
     },
     "last_checked": {
      "type": "string",
      "format": "date-time",
      "description": "When GeNEVERsleep last saw this event in a source, or last merged/approved a manual or organiser listing (ISO 8601, Europe/Zurich offset). Omitted when unknown."
     },
     "updated_at": {
      "type": "string",
      "format": "date-time",
      "description": "When title, date/time, venue, price, links or lineup last changed. Omitted when unknown; never earlier than a known catalogue timestamp."
     },
     "credit": {
      "type": "string"
     }
    }
   }
  }
 },
 "x-mcp": {
  "url": "https://mcp.geneversleep.ch/mcp",
  "transport": "streamable-http",
  "auth": "none",
  "current_url": "https://geneversleep.ch/mcp",
  "tools": [
   "search_events",
   "get_event",
   "list_venues",
   "upcoming_big_nights",
   "get_nightlife_barometer"
  ]
 },
 "externalDocs": {
  "description": "Docs, usage rules and rights checklist",
  "url": "https://geneversleep.ch/api"
 },
 "tags": [
  {
   "name": "events",
   "description": "Nightlife events"
  },
  {
   "name": "reference",
   "description": "Venues, areas, genres"
  }
 ]
}
