Before you start
- Get an API keySign up for 100 free credits, no card. Keys start with
gs_live_. - Put it in the environmentEvery example reads it from
GROUNDSOCIAL_API_KEY:export GROUNDSOCIAL_API_KEY=gs_live_… - Set up Python
pip install requests
Call Reviews of a Booking.com property API from Python
GET /v1/booking/hotel/reviews. Save this as main.py and run python main.py. It reads the items in reviews and prints reviewer.name and score for each.
import os
import requests
API = "https://api.groundsocial.dev"
HEADERS = {"Authorization": f"Bearer {os.environ['GROUNDSOCIAL_API_KEY']}"}
res = requests.get(
f"{API}/v1/booking/hotel/reviews",
params={"id": "280149", "sort": "newest"},
headers=HEADERS,
timeout=60,
)
res.raise_for_status()
data = res.json()
for item in data["reviews"]:
print((item.get("reviewer") or {}).get("name"), item.get("score"))
print("credits charged:", res.headers["x-credits-charged"])The response
A real Booking.com response to this call, recorded from the live API on 27 Nov 2026 and shortened for display: arrays keep their first items and … marks every cut. The recorded page had 10 items in reviews. Live calls return current data in the same shape.
{
"hotel_id": 280149,
"review_count": 1391,
"rating_scores": [
{
"name": "hotel_staff",
"label": "Staff",
"value": 9.67
},
{
"name": "hotel_services",
"label": "Facilities",
"value": 9.54
},
"… 5 more"
],
"reviews": [
{
"id": "2accb2ff6df27687",
"score": 10,
"title": null,
"positive": null,
"negative": null,
"language": "en",
"reviewed_at": "2026-11-26T13:04:50Z",
"helpful_votes": null,
"reviewer": {
"name": "Colin",
"country_code": "gb",
"country": "United Kingdom",
"avatar_url": "https://xx.bstatic.com/static/img/review/avatars/ava-c.png",
"traveler_type": "Couple",
"is_anonymous": false
},
"stay": {
"customer_type": "COUPLES",
"room_id": 28014901,
"room_name": "Superior Queen Room",
"check_in": "2026-11-24",
"check_out": "2026-11-26",
"nights": 2
},
"reply": null
},
{
"id": "7f5f7fe9485d3c91",
"score": 10,
"title": null,
"positive": null,
"negative": null,
"language": "en",
"reviewed_at": "2026-11-25T11:02:04Z",
"helpful_votes": null,
"reviewer": {
"name": "Kurt",
"country_code": "gb",
"country": "United Kingdom",
"avatar_url": "https://xx.bstatic.com/static/img/review/avatars/ava-k.png",
"traveler_type": "Solo traveler",
"is_anonymous": false
},
"stay": {
"customer_type": "SOLO_TRAVELLERS",
"room_id": 28014920,
"room_name": "Luxury Double Room with Two Double Beds",
"check_in": "2026-11-19",
"check_out": "2026-11-21",
"nights": 2
},
"reply": null
},
"… 8 more"
],
"pagination": {
"next_cursor": "eyJoIjp7ImlkIjoyODAxNDksImNvdW50cnlfY29kZSI6ImdiIn0sInNvcnQiOiJuZXdlc3QiLCJsaW1pdCI6MTAsIm9mZnNldCI6MTB9",
"has_more": true
}
}Top-level fields
| Field | Type | Description |
|---|---|---|
hotel_id | integer | – |
review_count | integer | null | – |
rating_scores | object[] | – |
reviews | BookingReview[] | – |
pagination | BookingPagination | – |
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id | query | string | Booking.com hotel id. Example: 280149. |
url | query | string | A property link, https://www.booking.com/hotel/<cc>/<name>.html. Example: https://www.booking.com/hotel/gb/the-savoy.html. |
sort | query | "relevant" | "newest" | "oldest" | "highest" | "lowest" | Default relevant. One of relevant, newest, oldest, highest, lowest. |
limit | query | integer | 1 to 25, default 10. |
languages | query | string | Comma-separated review languages, e.g. en,fr. |
customer_type | query | "couples" | "families" | "solo" | "friends" | "business" | Traveler type. One of couples, families, solo, friends, business. |
text | query | string | Only reviews mentioning these words. |
language | query | string | Booking.com language for texts (en-us, en-gb, de, fr, …). Example: en-gb. |
since | query | string | Only reviews on or after this date. |
until | query | string | Only reviews on or before this date. |
after | query | string | Cursor: the previous page’s pagination.next_cursor. |
Pagination
Each page carries the next cursor in pagination.next_cursor; pass it back as after and stop when it is empty. Every page is a separate call at 2 credits per call, so cap the pages you read. This version is self-contained.
import os
import requests
API = "https://api.groundsocial.dev"
HEADERS = {"Authorization": f"Bearer {os.environ['GROUNDSOCIAL_API_KEY']}"}
def pages(max_pages=5):
"""Yields one page at a time; each page is one call."""
params = {"id": "280149", "sort": "newest"}
for _ in range(max_pages):
res = requests.get(f"{API}/v1/booking/hotel/reviews", params=params, headers=HEADERS, timeout=60)
res.raise_for_status()
page = res.json()
yield page
cursor = (page.get("pagination") or {}).get("next_cursor")
if not cursor:
break
params["after"] = cursor
for page in pages():
for item in page.get("reviews") or []:
print((item.get("reviewer") or {}).get("name"), item.get("score"))Errors and retries
Every error is JSON with error.code (stable: branch on it), message, hint (what to do next), docs_url and retryable. A failed call is never charged. Retry only when retryable is true, after the Retry-After header.
import os, time
import requests
def call(url, **kwargs):
headers = {"Authorization": f"Bearer {os.environ['GROUNDSOCIAL_API_KEY']}"}
for attempt in range(3):
res = requests.get(url, headers=headers, timeout=60, **kwargs)
if res.ok:
return res.json()
err = res.json()["error"]
# Branch on the stable code; the hint says what to do next.
if err["retryable"] and attempt < 2:
time.sleep(int(res.headers.get("Retry-After", 2)))
continue
raise RuntimeError(f"{err['code']}: {err.get('hint', err['message'])}")
data = call("https://api.groundsocial.dev/v1/booking/hotel/reviews", params={"id": "280149", "sort": "newest"})| Status | Meaning |
|---|---|
200 | A page of reviews. |
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 code and what to do about it.
Pricing
| Cost | |
|---|---|
| Per call | 2 credits per call |
| 1,000 calls | $2.00 on the starter pack, $0.80 at volume |
| No key (MPP or x402) | $0.02 per call |
| Failed call | Refunded, never charged |
Every response has x-credits-charged and x-credits-remaining headers. Credits never expire. Packs and calculator.
From an AI agent (MCP)
The same call is the booking_hotel_reviews tool on the hosted MCP server, so Claude, Cursor or any MCP client can make it without code. Add the server once:
claude mcp add --transport http groundsocial https://api.groundsocial.dev/mcpThen ask for it in words (“Guest reviews of a Booking.com property, with scores, stay details and replies (up to 25 a page)”), or call the tool directly:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "booking_hotel_reviews",
"arguments": {
"id": "280149",
"sort": "newest"
}
}
}MCP setup for Claude Desktop, Cursor, VS Code and ChatGPT.
Use Booking.com hotel reviews in a pipeline
Guest reviews of a property, limit up to 25 a page (default 10), sort relevant (default), newest, oldest, highest or lowest: score out of 10, title, liked and disliked text, language, date, reviewer name, country and traveler type, the stay (room, dates, nights) and the property’s reply. rating_scores are the category averages (staff, cleanliness, location, …).
Keep going
- This call in JavaScript, TypeScript, Go, PHP, cURL.
- Reviews of a Booking.com property API reference: every field and status code.
- Booking.com tutorials and all Python tutorials.
- Booking.com API: every endpoint and price.
- How to search Booking.com properties with Python: Search Booking.com properties by place, with dates, guests and rooms (25 a page).
- How to get a Booking.com property with Python: One Booking.com property: address, stars, review score, facilities, rooms and photos.
- How to scrape rooms and prices of a Booking.com property for a stay with Python: A Booking.com property’s room types for a stay, with the best available price and nightly prices.
Run it on your own data
One key for Booking.com and 76 more platforms, over REST or MCP. Free credits on signup, no card.
Booking.com is a trademark of its owner. We are not affiliated with or endorsed by it.