Get a Booking.com property API
One Booking.com property: address, stars, review score, facilities, rooms and photos.
GET /v1/booking/hotelBeta1 credit per callRefunded on failureimport os, requests
res = requests.get(
"https://api.groundsocial.dev/v1/booking/hotel?url=https%3A%2F%2Fwww.booking.com%2Fhotel%2Fgb%2Fthe-savoy.html",
headers={"Authorization": f"Bearer {os.environ['GROUNDSOCIAL_API_KEY']}"},
)
res.raise_for_status()
data = res.json()Response
200 · 1 credit{ "hotel": { "id": 280149, "name": "The Savoy", "page_name": "the-savoy", "url": "https://www.booking.com/hotel/gb/the-savoy.html", "accommodation_type": { "id": 204, "name": "Hotel", "type": "HOTEL" }, "star_rating": 5, "address": "Strand", "city": "London", "district": "Westminster Borough", "country": "United Kingdom", "country_code": "gb", "latitude": 51.5102983074989, "longitude": -0.12086033821106, "ufi": -2601889, "description": "Originally opened in 1889, the world-famous Savoy Hotel is located on the banks of the Thames and less than 5 minutes' w…", "review_score": 9.4, "review_count": 1396, "facilities": [ { "id": 218, "slug": "pet_bowls", "title": "Pet bowls", "group_id": 1 }, { "id": 217, "slug": "pet_basket", "title": "Pet basket", "group_id": 1 }, "… 90 more" ], "rooms": [ { "id": 28014901, "name": null, "description": null, "room_type_id": 9, "max_persons": 2, "max_children": 1, "is_smoking": false, "beds": [ { "count": 1, "type": "LARGE_DOUBLE_BED", "name": "Queen bed(s)" } ], "amenities": [ "safe_deposit_box", "airconditioning", "… 34 more" ] }, { "id": 28014903, "name": null, "description": null, "room_type_id": 7, "max_persons": 3, "max_children": 0, "is_smoking": false, "beds": [ { "count": 1, "type": "SINGLE_BED", "name": "Twin bed(s)" } ], "amenities": [ "safe_deposit_box", "airconditioning", "… 31 more" ] }, "… 13 more" ], "photo_ids": [ 735156576, 150006547, "… 171 more" ] }}Parameters
| Name | Type | Description |
|---|---|---|
idquery | string | Booking.com hotel id. Example: 280149. |
urlquery | string | A property link, https://www.booking.com/hotel/<cc>/<name>.html. Example: https://www.booking.com/hotel/gb/the-savoy.html. |
currencyquery | string | ISO currency for prices (default USD). Example: EUR. |
languagequery | string | Booking.com language for texts (en-us, en-gb, de, fr, …). Example: en-gb. |
Response fields
200 with a BookingHotelResponse, in Booking.com’s own JSON.
| Field | Type | Description |
|---|---|---|
hotel | BookingHotel |
Status codes
| Status | Meaning |
|---|---|
200 | The property. |
400 | Invalid input. Nothing was charged. |
401 | Missing or invalid API key. |
402 | Not enough credits, a spend cap was reached, or payment is required. |
403 | The target is private, or the account is suspended. |
404 | No Booking.com property or destination by that id, link or name. |
429 | Too many requests. Wait for Retry-After seconds. |
503 | Booking.com is temporarily unavailable. Retryable; nothing was charged. |
Every error has code, message, hint and retryable. All error codes
Booking.com is a trademark of its owner. We are not affiliated with or endorsed by it.