Enable the Places API in Google Cloud Console and ensure your API key has the Places API scope; restrict the key by HTTP referrer or IP to prevent unauthorized use.
Search for a property using Place Search (Text Search or Nearby Search): POST to https://places.googleapis.com/v1/places:searchText with a JSON body containing textQuery (e.g. 'Hotel name, City') and specify desired fields in the X-Goog-FieldMask header to minimize billed SKUs.
Retrieve full place details via GET https://places.googleapis.com/v1/places/{place_id} with X-Goog-FieldMask listing only the fields you need (e.g. displayName,rating,reviews,photos,regularOpeningHours,priceLevel).
To fetch a photo, use the photo resource name from the photos[] array: GET https://places.googleapis.com/v1/{photo_name}/media?maxWidthPx=800&key=... — this returns a redirect to the actual image; cache the image URL, not the resource name, as resource names are stable but signed URLs are temporary.
Respect the quota: Places API (New) bills per field mask — requesting all fields on every detail call is expensive; request only what you display and cache aggressively (24h TTL for static details like address, photos).
For hotel-specific data, check the place type includes 'lodging' and use the priceLevel and rating fields for sorting, but supplement with live pricing from a hotel API — Google Places does not return bookable rates.
Known gotchas
The Places API (New) and the legacy Places API have different endpoints, billing SKUs, and field names — do not mix them; pick one and be consistent across your integration.
Photo URLs returned from the media endpoint are not permanently cacheable — Google may rotate the underlying CDN URL; cache the rendered image bytes on your side if you need long-term storage.
Place IDs can change over time when Google merges or updates business listings — do not use a place_id as a permanent unique identifier in your database without a periodic refresh strategy.
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp