{"openapi":"3.1.0","info":{"title":"European Hotels Open API","version":"1.0.0","description":"Open read-only API for accommodation listings across Europe. Prices and availability are not available yet: never invent prices. Data © OpenStreetMap contributors (ODbL).","license":{"name":"ODbL-1.0","url":"https://opendatacommons.org/licenses/odbl/1-0/"}},"servers":[{"url":"https://bradago.com/api"}],"paths":{"/v1/hotels/search":{"get":{"operationId":"searchHotels","summary":"Find accommodation near coordinates, ranked by data completeness and proximity.","parameters":[{"name":"lat","in":"query","required":true,"schema":{"type":"number","minimum":-90,"maximum":90}},{"name":"lng","in":"query","required":true,"schema":{"type":"number","minimum":-180,"maximum":180}},{"name":"radius_km","in":"query","schema":{"type":"number","default":3,"maximum":25}},{"name":"min_stars","in":"query","description":"Hides listings without a star rating.","schema":{"type":"integer","minimum":1,"maximum":5}},{"name":"max_stars","in":"query","description":"Upper star limit. Same value as min_stars gives exactly N stars.","schema":{"type":"integer","minimum":1,"maximum":5}},{"name":"type","in":"query","schema":{"type":"string","enum":["hotel","hostel","guest_house","motel","apartment","chalet"]}},{"name":"limit","in":"query","schema":{"type":"integer","default":10,"maximum":50}}],"responses":{"200":{"description":"Listings","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HotelList"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/hotels/{id}":{"get":{"operationId":"getHotel","summary":"Get one listing by id.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Listing","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Hotel"}}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/hotels":{"get":{"operationId":"listHotels","summary":"Page through listings (for bulk use; prefer the data dump for everything).","parameters":[{"name":"country","in":"query","description":"ISO 3166-1 alpha-2, e.g. PT","schema":{"type":"string","pattern":"^[A-Za-z]{2}$"}},{"name":"type","in":"query","schema":{"type":"string","enum":["hotel","hostel","guest_house","motel","apartment","chalet"]}},{"name":"after","in":"query","description":"Cursor: the next_after value from the previous page.","schema":{"type":"string","format":"uuid"}},{"name":"limit","in":"query","schema":{"type":"integer","default":100,"maximum":500}}],"responses":{"200":{"description":"Page of listings","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HotelList"}}}}}}}},"components":{"schemas":{"Hotel":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"type":{"type":["string","null"],"enum":["hotel","hostel","guest_house","motel","apartment","chalet",null]},"stars":{"type":["integer","null"]},"lat":{"type":"number"},"lng":{"type":"number"},"country_code":{"type":["string","null"]},"city":{"type":["string","null"]},"city_inferred":{"type":"boolean","description":"True when city is inferred from a neighbouring listing (not OSM data)."},"postcode":{"type":["string","null"]},"street":{"type":["string","null"]},"housenumber":{"type":["string","null"]},"website":{"type":["string","null"]},"phone":{"type":["string","null"]},"rooms":{"type":["integer","null"]},"wheelchair":{"type":["string","null"]},"opening_hours":{"type":["string","null"]},"wikidata":{"type":["string","null"]},"wikipedia":{"type":["string","null"]},"source":{"type":"string"},"source_id":{"type":"string"},"claimed":{"type":"boolean"},"updated_at":{"type":"string","format":"date-time"},"distance_m":{"type":"integer","description":"Only in search results."}},"required":["id","name","lat","lng"]},"HotelList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Hotel"}},"meta":{"type":"object","additionalProperties":true}}},"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}}}}