Google Maps Nearby Search API
Find places around a point, nearest first, each with its distance in meters. Narrow it with a search term or place type and a radius.
- 1 credit per call
- Failed calls are free
- Updated
- googlemaps.nearby
{ "summary": { "has_more": true, "outside_radius": 20, "total_items": 20 }, "items": [ { "name": "Restaurant el paisa", "rating": 5, "review_count": 1, "address": "San Francisco, CA 94103", "cid": "6539182198288680772", "distance_m": 4, "feature_id": "0x8085810029d5525b:0x5abfd790328e0744", "lat": 37.7749295, "lng": -122.4194155, "maps_url": "https://www.google.com/maps/place/?q=place_id:ChIJW1LVKQCBhYARRAeOMpDXv1o", "place_id": "ChIJW1LVKQCBhYARRAeOMpDXv1o", "types": [ "Coffee shop" ] }, { "name": "All Star Cafe", "rating": 4, "review_count": 333, "address": "1500 Market St, San Francisco, CA 94102", "cid": "6955426026914760730", "distance_m": 39, "feature_id": "0x8085809e91ccf29b:0x6086a31ebbc2c81a", "lat": 37.7752389, "lng": -122.4195333, "maps_url": "https://www.google.com/maps/place/?q=place_id:ChIJm_LMkZ6AhYARGsjCux6jhmA", "phone": "(415) 252-9888", "place_id": "ChIJm_LMkZ6AhYARGsjCux6jhmA", "hours": [ { "day": "Monday", "hours": "Open 24 hours" }, { "day": "Tuesday", "hours": "Open 24 hours" } ], "types": [ "Cafe", "Donut shop" ] } ]}
| # | Name | Distance (m) | Address | Rating | Reviews | Place ID | Cid | Lat | Lng | Phone |
|---|---|---|---|---|---|---|---|---|---|---|
| 1 | Restaurant el paisa | 4 | San Francisco, CA 94103 | 5 | 1 | ChIJW1LVKQCBhYARRAeOMpDXv1o | 6539182198288680772 | 37.77 | -122.42 | |
| 2 | All Star Cafe | 39 | 1500 Market St, San Francisco, CA 94102 | 4 | 333 | ChIJm_LMkZ6AhYARGsjCux6jhmA | 6955426026914760730 | 37.78 | -122.42 | (415) 252-9888 |
| 3 | The Buoy | 107 | 22 Franklin St, San Francisco, CA 94102 | 4.3 | 178 | ChIJK84-R6qBhYARWHOHDki2w6Y | 12016648651352273752 | 37.77 | -122.42 | (415) 416-9409 |
| 4 | Blue Bottle Coffee | 136 | 55 S Van Ness Ave, San Francisco, CA 94103 | 3.7 | 99 | ChIJ1VGyjmCBhYAR_pOL0q5shVs | 6594796727466431486 | 37.77 | -122.42 | (510) 661-3510 |
| 5 | Daily Grind Cafe | 179 | 1455 Market St UNIT 600, San Francisco, CA 94103 | ChIJAQDAM5yAhYARcTPJj6jdUhc | 1680649326999188337 | 37.78 | -122.42 | (619) 697-0750 | ||
| 6 | Nina's Cafe | 210 | 201 Fell St, San Francisco, CA 94102 | 4.2 | 26 | ChIJ-TgPKp-AhYARQOzi70ltCmk | 7568982288074206272 | 37.78 | -122.42 | (415) 437-2734 |
| 7 | Doppio Coffee & Brunch | 214 | 1551 Mission St, San Francisco, CA 94103 | 4.8 | 510 | ChIJy8vmGC2BhYARu919i3bko-Q | 16475263059648961979 | 37.77 | -122.42 | (628) 867-7985 |
| 8 | Zuni Café | 242 | 1658 Market St, San Francisco, CA 94102 | 4.3 | 2656 | ChIJO7u9q5-AhYARiSSXyWv9eJ8 | 11491213088621274249 | 37.77 | -122.42 | (415) 552-2522 |
| 9 | LOQUAT | 264 | 198 Gough St, San Francisco, CA 94102 | 4.6 | 415 | ChIJ81fzsc-BhYARdZtCXcbJ-7E | 12825066217672973173 | 37.77 | -122.42 | (415) 932-6816 |
| 10 | Andersen Bakery | 288 | 1390 Market St Ste b, San Francisco, CA 94102 | 4 | 81 | ChIJa3aIDJyAhYARMPjFJtHsI5I | 10530520736765179952 | 37.78 | -122.42 | (415) 757-0090 |
What you send
The input
object of the request, with every field the endpoint accepts.
| Field | Type | Required | What it does | Example |
|---|---|---|---|---|
| lat | number | yes | Latitude of the point to search around. | 37.7749 |
| lng | number | yes | Longitude of the point to search around. | -122.4194 |
| country | string | no | Two-letter country code, such as us or gb. | |
| include_exclusion_summary | boolean | no | Also count the places that were left out for being outside the radius. | |
| lang | string | no | Language for names and labels, such as en or en-US. | |
| limit | integer | no | How many places to return, up to 120. The default is 60. | 20 |
| query | string | no | What to look for, such as coffee. | coffee |
| radius | integer | no | How far to look, in meters. Places farther away are left out. The default is 1,000. | 500 |
| types | array<string> | no | Kinds of place to include, such as restaurant. They are combined with the search term. |
Fields it returns
What each record in the response holds, with the values from the sample above.
| Field | Type | What it is | Example |
|---|---|---|---|
| items[].name | string | The place's name on Google Maps. | Restaurant el paisa |
| items[].distance_m | integer | Distance from your point, in metres. | 4 |
| items[].address | string | The place's address as Google Maps shows it. | San Francisco, CA 94103 |
| items[].rating | integer | The place's average star rating. | 5 |
| items[].review_count | integer | How many reviews the place has. | 1 |
| items[].place_id | string | Google's place ID for this place. | ChIJW1LVKQCBhYARRAeOMpDXv1o |
| items[].cid | string | Google Maps' numeric ID (CID) for the place. | 6539182198288680772 |
| items[].feature_id | string | Google Maps' feature ID for the place; the reviews endpoint accepts it. | 0x8085810029d5525b:0x5abfd790328e0744 |
| items[].lat | number | The place's latitude. | 37.77 |
| items[].lng | number | The place's longitude. | -122.42 |
| items[].maps_url | string | A link to the place on Google Maps. | https://www.google.com/maps/place/?q=place_id:ChIJW1LVKQCBhYARR… |
| items[].types | array | The categories Google Maps lists for the place. | Coffee shop |
| items | array | The places found. | 20 records |
| summary | object | Totals for this response. | 3 fields |
| summary.has_more | boolean | Whether Google had more places than this response holds. | true |
| summary.outside_radius | integer | Places found beyond your radius, left out of the results. | 20 |
| summary.total_items | integer | How many places this response holds. | 20 |
Call it from your code, or ask your agent
Set UPSCRAPE_API_KEY to your key and copy a working request.
curl --request POST \ --url https://data.upscrape.com/execute \ --header "Authorization: Bearer $UPSCRAPE_API_KEY" \ --header "Content-Type: application/json" \ --header "Prefer: wait=30" \ --data '{ "capability": "googlemaps.nearby", "input": { "lat": 37.7749, "limit": 20, "lng": -122.4194, "query": "coffee", "radius": 500 }}'
import jsonimport osimport requestspayload = json.loads(r'''{ "capability": "googlemaps.nearby", "input": { "lat": 37.7749, "limit": 20, "lng": -122.4194, "query": "coffee", "radius": 500 }}''')response = requests.post( "https://data.upscrape.com/execute", headers={ "Authorization": f"Bearer {os.environ['UPSCRAPE_API_KEY']}", "Content-Type": "application/json", "Prefer": "wait=30", }, json=payload,)response.raise_for_status()print(json.dumps(response.json(), indent=2))
const response = await fetch("https://data.upscrape.com/execute", { method: "POST", headers: { "Authorization": `Bearer ${process.env.UPSCRAPE_API_KEY}`, "Content-Type": "application/json", "Prefer": "wait=30", }, body: JSON.stringify({ "capability": "googlemaps.nearby", "input": { "lat": 37.7749, "limit": 20, "lng": -122.4194, "query": "coffee", "radius": 500 }}),});if (!response.ok) { throw new Error(`Upscrape request failed: ${response.status}`);}console.log(JSON.stringify(await response.json(), null, 2));
https://data.upscrape.com/mcp
Using Upscrape, list the coffee places within 500 meters of 37.7749, -122.4194 on Google Maps, nearest first, with their distance and rating.
More from the Google Maps API
Google Maps Nearby Search API FAQ
The short answers. The docs have the long ones.
How much does the Google Maps Nearby Search API cost?
1 credit per successful call, shown before it runs. You buy credits once, and paid credits never expire.
What do I send?
Send lat and lng. The input fields below list every option with its type and limits.
Do I need a Google Maps login?
No. It reads public Google Maps data; nothing runs on your account.
Can my AI agent call it?
Yes, over MCP: the agent finds googlemaps.nearby, checks its price and runs it with the same credits as the REST API.
Your first Google Maps call is free.
Up to 100 free credits to start, no card needed.