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 Go
go mod init example
Call Reviews of a Booking.com property API from Go
GET /v1/booking/hotel/reviews. Save this as main.go and run go run main.go. It reads the items in reviews and prints reviewer.name and score for each.
package main
import (
"encoding/json"
"fmt"
"log"
"net/http"
"net/url"
"os"
"time"
)
// The fields this program reads, as the recorded response has them.
type Page struct {
Reviews []struct {
Reviewer struct {
Name string `json:"name"`
} `json:"reviewer"`
Score float64 `json:"score"`
} `json:"reviews"`
Pagination struct {
NextCursor string `json:"next_cursor"`
} `json:"pagination"`
}
var client = &http.Client{Timeout: 60 * time.Second}
func fetch(q url.Values) (*Page, error) {
req, err := http.NewRequest("GET", "https://api.groundsocial.dev/v1/booking/hotel/reviews"+"?"+q.Encode(), nil)
if err != nil {
return nil, err
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("GROUNDSOCIAL_API_KEY"))
res, err := client.Do(req)
if err != nil {
return nil, err
}
defer res.Body.Close()
if res.StatusCode != http.StatusOK {
var e struct {
Error struct {
Code string `json:"code"`
Hint string `json:"hint"`
Retryable bool `json:"retryable"`
} `json:"error"`
}
json.NewDecoder(res.Body).Decode(&e)
return nil, fmt.Errorf("%s: %s", e.Error.Code, e.Error.Hint)
}
var page Page
if err := json.NewDecoder(res.Body).Decode(&page); err != nil {
return nil, err
}
return &page, nil
}
func main() {
q := url.Values{}
q.Set("id", "280149")
q.Set("sort", "newest")
page, err := fetch(q)
if err != nil {
log.Fatal(err)
}
for _, item := range page.Reviews {
fmt.Println(item.Reviewer.Name, item.Score)
}
}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. It replaces main in the program above and reuses its Page and fetch.
func main() {
q := url.Values{}
q.Set("id", "280149")
q.Set("sort", "newest")
for i := 0; i < 5; i++ { // each page is one call
page, err := fetch(q)
if err != nil {
log.Fatal(err)
}
for _, item := range page.Reviews {
fmt.Println(item.Reviewer.Name, item.Score)
}
if page.Pagination.NextCursor == "" {
break
}
q.Set("after", page.Pagination.NextCursor)
}
}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.
// fetch returns the API error as "code: hint". To retry the retryable ones
// (rate_limited, upstream_timeout), wait for Retry-After and call again:
for attempt := 0; attempt < 3; attempt++ {
page, err = fetch(q)
if err == nil {
break
}
time.Sleep(2 * time.Second)
}| 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 Python, JavaScript, TypeScript, PHP, cURL.
- Reviews of a Booking.com property API reference: every field and status code.
- Booking.com tutorials and all Go tutorials.
- Booking.com API: every endpoint and price.
- How to search Booking.com properties with Go: Search Booking.com properties by place, with dates, guests and rooms (25 a page).
- How to get a Booking.com property with Go: 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 Go: 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.