Place Photos
Resolve a Google Maps photo reference into a real, fetchable image URL — sized up to 4800px, sourced live from the official Google Place Photos endpoint.
Pricing, live playground and use cases: Google Maps Photos API on YepAPI
/v1/maps/photoTurn a photo reference into an image. Every result from Maps Search and Place Details includes a photos array with up to ten entries — each carries a reference like places/{place_id}/photos/{token}. Pass one here and get back a direct googleusercontent.com image URL at the size you ask for.
The resolved image URLs are served by Google for a limited time — fetch the image promptly and store a copy if you need it long-term, rather than hot-linking the URL. Resolutions are cached on our side for up to an hour, so treat photoUri as fetch-now; re-resolving after the cache window returns a fresh URL.
Usage
const res = await fetch('https://api.yepapi.com/v1/maps/photo', {
method: 'POST',
headers: {
'x-api-key': 'YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
reference: 'places/ChIJBR3G8LJqkFQRWD2Wzn0qG3c/photos/AU_ZVEFd3Y9YtVSYWUZf4lY...',
max_width: 1200,
}),
});
const { data } = await res.json();
console.log(data.photoUri); // https://lh3.googleusercontent.com/p/...curl -X POST https://api.yepapi.com/v1/maps/photo \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"reference": "places/ChIJBR3G8LJqkFQRWD2Wzn0qG3c/photos/AU_ZVEFd3Y9YtVSYWUZf4lY...", "max_width": 1200}'Request Body
| Parameter | Type | Required | Description | Default |
|---|---|---|---|---|
reference | string | Yes | Photo resource name from photos[].reference: places/{place_id}/photos/{token}. The places/ prefix is optional. | — |
max_width | number | No | Max width of the returned image in px, 1–4800. Google scales down to fit, preserving aspect ratio; it never upscales. | 1200 if neither dimension is set |
max_height | number | No | Max height of the returned image in px, 1–4800. Combine with max_width to bound both axes. | — |
Response
{
"ok": true,
"data": {
"reference": "places/ChIJBR3G8LJqkFQRWD2Wzn0qG3c/photos/AU_ZVEFd3Y9YtVSYWUZf4lY...",
"photoUri": "https://lh3.googleusercontent.com/p/AF1QipM...=s1600-w1200"
}
}| Field | Type | Description |
|---|---|---|
data.reference | string | The resolved photo resource name (normalised form). |
data.photoUri | string | Directly fetchable image URL. Valid for a limited time — download promptly. |
Getting a reference
Photo references come from the other Maps endpoints — you never construct one by hand:
// photos[] on /v1/maps/search and /v1/maps/place results
{
"reference": "places/ChIJBR3G8LJqkFQRWD2Wzn0qG3c/photos/AU_ZVEFd3Y9YtVSYWUZf4lY...",
"width": 4032,
"height": 3024,
"attribution": "Storyville Coffee Company"
}The width/height on the reference are the original upload's dimensions — useful for picking which photos are worth resolving at large sizes.
References themselves can change over time as Google refreshes a place's photo set — don't store them for months. If a stored reference stops resolving, re-fetch the place with Maps Search or Place Details to get current references.
Pricing
$0.02 per call. No monthly minimums.
Sourced live from the official Google Place Photos endpoint (Places API New) — the same user- and owner-uploaded photos Google Maps displays. Attribution requirements for displaying Google place photos apply to your end use.
Place Reviews
Fetch up to 150 Google Maps reviews for any place by Place ID — sorted by newest, relevance, or rating, with full text, author profiles, photos, and owner responses.
Standard Scrape
Web Scraping API — scrape any URL to clean Markdown, HTML, or plain text. Smart mode escalates to JS rendering and premium proxies automatically, one flat $0.01 per call.