Short answer: send lat, lng and zoom with your query to POST /google/maps/search. Google Maps then searches the map area around that point, and the answer holds up to 20 places with name, address, coordinates, rating, opening hours, website and the IDs you need for details and reviews. Without coordinates, Maps has nowhere to look and the results scatter.
The request
curl -X POST 'https://api.serpbase.dev/google/maps/search' \
-H 'Content-Type: application/json' \
-H 'X-API-Key: YOUR_API_KEY' \
-d '{"q":"coffee","lat":47.6062,"lng":-122.3321,"zoom":14}'
lat and lng are the map centre in decimal degrees and must be sent together. zoom runs from 1 (the whole world) to 21 (a single building) and defaults to 14 when coordinates are present. Each request costs 2 credits.
What came back
We ran the same keyword four ways on 30 November 2026:
| Request | Places | Where they were |
|---|---|---|
coffee, downtown Seattle, zoom 14 | 20 | Downtown Seattle; first was Coffee Astronaut, 400 Pine St |
coffee, downtown Austin, zoom 14 | 20 | Austin; first was Idlewild Coffee on E Cesar Chavez St |
coffee, downtown Seattle, zoom 11 | 20 | Across Kitsap County: Silverdale, Port Orchard, Bremerton, Poulsbo, Kingston |
coffee, no coordinates | 4 | Sherman Oaks CA, Tullahoma TN, Fort Smith AR, St Peters MO |
Two things stand out. The Seattle and Austin lists shared no places, so the coordinates really drive the search. And zoom matters as much as the point: at zoom 11 the 20 results shared nothing with the zoom 14 list and sat across the water from the city centre. If you want a neighbourhood, stay around 14 to 16.
One place from the Seattle answer (shortened):
{
"position": 1,
"title": "Coffee Astronaut",
"address": "Coffee Astronaut, 400 Pine St, Seattle, WA 98101",
"address_components": {
"street": "400 Pine St",
"city": "Seattle",
"postal_code": "98101",
"country_code": "US"
},
"latitude": 47.6114225,
"longitude": -122.3375004,
"rating": 4.9,
"types": ["Coffee shop"],
"website": "http://www.coffeeastronaut.com/",
"open_status": {"status": "Open", "current_day": "Sunday", "current_hours": "8 AM–7 PM"},
"place_id": "ChIJ7eXuIgBrkFQRqQhr3Gvl0Lo",
"data_id": "0x54906b0022eee5ed:0xbad0e56bdc6b08a9",
"cid": "13461511537632676009",
"timezone": "America/Los_Angeles"
}
Each place also carries a hours object with one line per weekday, attributes such as wheelchair access, thumbnail and photos.
A Python loop over several cities
import requests
API = "https://api.serpbase.dev/google/maps/search"
HEADERS = {"X-API-Key": "YOUR_API_KEY"}
CITIES = {"Seattle": (47.6062, -122.3321), "Austin": (30.2672, -97.7431)}
for city, (lat, lng) in CITIES.items():
data = requests.post(API, headers=HEADERS, timeout=60, json={
"q": "coffee", "lat": lat, "lng": lng, "zoom": 14,
}).json()
if data["status"] != 0:
print(city, "failed:", data["status"], data.get("error"))
continue
for p in data["places"][:5]:
street = p.get("address_components", {}).get("street", "")
print(city, p["position"], p["title"], street, p.get("rating"))
Things that trip people up
- Send both halves of the point.
latwithoutlngcame back as status1000, "invalid or conflicting search parameter: lat", and was not charged. - No coordinates means no useful area. Our plain
coffeequery returned four places in four different states. addressstarts with the business name as Google prints it. Useaddress_componentswhen you need the street, city or postcode on their own.- Read
status, not the HTTP code. A failed search still answers HTTP 200 with a non-zerostatus.
Related
Opening hours, phone and website for one place: Google Maps place details API. Reviews for a place: Google Maps reviews API. The local pack inside normal search results: Google local pack API.
Cost and docs
Maps searches are 2 credits. Credits cost $0.25–$0.50 per 1,000 depending on the plan, and new accounts get 500 free credits.
- Parameters and fields: Google Maps Search docs
- Status codes: responses and errors
- Credit packs: pricing