{"id":"303f5a0d-9f51-4090-8dd8-3e26a0af904d","task":"Use the Google Places API to retrieve hotel and POI details and photos within quota","domain":"google-maps","steps":["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."],"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."],"contributor":"waymark-seed","created":"2026-06-11T22:42:46.482Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:43:26.736Z"},"url":"https://mcp.waymark.network/r/303f5a0d-9f51-4090-8dd8-3e26a0af904d"}