100 free credits. No credit card required. Get a key

How to scrape reviews of a Booking.com property with Go

Guest reviews of a Booking.com property, with scores, stay details and replies (up to 25 a page).

The examples use only the standard library (net/http, encoding/json) and decode into a struct that names just the fields they read.

GET /v1/booking/hotel/reviews2 credits per callRefunded on failureBeta

Before you start

  1. Get an API keySign up for 100 free credits, no card. Keys start with gs_live_.
  2. Put it in the environmentEvery example reads it from GROUNDSOCIAL_API_KEY: export GROUNDSOCIAL_API_KEY=gs_live_…
  3. Set up Gogo 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.

main.go
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.

200 OK
{
  "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

FieldTypeDescription
hotel_idinteger–
review_countinteger | null–
rating_scoresobject[]–
reviewsBookingReview[]–
paginationBookingPagination–

Parameters

NameInTypeDescription
idquerystringBooking.com hotel id. Example: 280149.
urlquerystringA property link, https://www.booking.com/hotel/<cc>/<name>.html. Example: https://www.booking.com/hotel/gb/the-savoy.html.
sortquery"relevant" | "newest" | "oldest" | "highest" | "lowest"Default relevant. One of relevant, newest, oldest, highest, lowest.
limitqueryinteger1 to 25, default 10.
languagesquerystringComma-separated review languages, e.g. en,fr.
customer_typequery"couples" | "families" | "solo" | "friends" | "business"Traveler type. One of couples, families, solo, friends, business.
textquerystringOnly reviews mentioning these words.
languagequerystringBooking.com language for texts (en-us, en-gb, de, fr, …). Example: en-gb.
sincequerystringOnly reviews on or after this date.
untilquerystringOnly reviews on or before this date.
afterquerystringCursor: 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.

Every page
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.

Errors
// 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)
}
StatusMeaning
200A page of reviews.
400Invalid input. Nothing was charged.
401Missing or invalid API key.
402Not enough credits, a spend cap was reached, or payment is required.
403The target is private, or the account is suspended.
404No Booking.com property or destination by that id, link or name.
429Too many requests. Wait for Retry-After seconds.
503Booking.com is temporarily unavailable. Retryable; nothing was charged.

Every error code and what to do about it.

Pricing

Cost
Per call2 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 callRefunded, 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:

bash
claude mcp add --transport http groundsocial https://api.groundsocial.dev/mcp

Then 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:

json
{
  "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

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.