Skip to content

Find a property token

Turn a hotel name into the Google property token, and into Booking.com, Hotels.com, Agoda and Expedia ids.

Overview

Every Google Hotels endpoint takes a property token, and each OTA uses its own id. Resolve them once per hotel, check the match, and store them — they are stable, so you never pay for the same lookup twice.

IdentifierUsed byHow to get it
Google property token
calendar, stay, offers, rooms, jobs, SearchApi-compatible endpoints
Booking.com pagename + country
Booking.com calendar and rooms, OTA compare
Hotels.com property_id
Hotels.com price and rooms, OTA compare
Agoda property_id
Agoda rooms, OTA compare
Tripadvisor location_id
Tripadvisor prices
From the hotel URL (name search not available yet)
Hostelworld property_id
Hostelworld rooms
From the property URL

Google property token

Send the name as a guest would type it, plus the city. Punctuation doesn't matter; the city matters a lot for chain names.

curl -X POST "https://api.scrapercompany.com/v1/search" \
  -H "x-api-key: $SCRAPERCOMPANY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "Blue Horizons Garden Resort", "city": "St George'"'"'s", "market": "GD"}'
Response
{
  "query": "Blue Horizons Garden Resort St George's",
  "gl": "us",
  "requested_market": "GD",
  "attempted_markets": [
    "GD",
    "US"
  ],
  "matched_market": "US",
  "market_fallback_used": true,
  "search_status": "matched",
  "external_fallback_recommended": false,
  "matches": [
    {
      "token": "ChcI7LnnsZLasKYOGgsvZy8xdHJzejFiORAB",
      "rank": 0,
      "verified": true,
      "name": "Blue Horizons Garden Resort",
      "name_score": 1
    }
  ]
}

If the requested market finds nothing, the search retries the fallback_markets (default ["US"], which indexes many Caribbean properties) and says so in attempted_markets, matched_market and market_fallback_used. Pass [] to disable the fallback.

Check the match

With verify: true (the default) each candidate is looked up to confirm the token prices and to read back its real name. It is slower but avoids the worst failure: a wrong token returns perfectly plausible rates for a different hotel.

FieldUse it to
verified
Skip candidates whose token does not price (false).
name
Compare with the name you expect.
name_score
Word overlap with your query, 0–1. Treat low scores as "needs a human".
rank
Google's own order, 0 first.
search_status
matched or not_found; external_fallback_recommended is true when nothing matched.

Search sparingly

Search costs 1 credit and is rate-limited more tightly upstream than the calendar. Resolve during onboarding, not on every price check.

OTA identifiers

The Booking.com, Hotels.com, Agoda and Expedia searches take name and city and return recommended_match — set only when one candidate is a confident match — plus all matches[] with match_score and confidence. You can also read ids straight from a hotel's URL:

SourceURLId
Booking.com
booking.com/hotel/us/moxy-boston-downtown.html
pagename = moxy-boston-downtown, country = us
Hotels.com
hotels.com/h38766175.Hotel-Information
property_id = 38766175
Expedia
expedia.com/h12570.Hotel-Information
property_id = 12570
Agoda
agoda.com/…/hotel/…-h8795952.html
property_id = 8795952
Vrbo
vrbo.com/20218736ha
listing_id = 20218736ha (resolved to a property_id by the quote)
Tripadvisor
tripadvisor.com/Hotel_Review-g60745-d97679-…
location_id = 97679
Hostelworld
hostelworld.com/pwa/hosteldetails.php/88047/…
property_id = 88047

Store and reuse

  • Keep one row per hotel with every id you have, plus the name and city you searched with.
  • Identifiers are stable. If a call starts returning 404 for a hotel, search again and update the row.
  • Search results are free to re-read from your own storage; the prices are what you call for every day.