API reference · Maps and places
Google Maps Search
Find Google Maps places using a query and location, such as coffee in Seattle. Use the separate place-detail endpoint for an identified place.
Example
curl -X POST 'https://api.serpbase.dev/google/maps/search' \
-H "Content-Type: application/json" \
-H 'X-API-Key: YOUR_API_KEY' \
--max-time 60 \
-d '{"location":{"location_query":"Seattle, WA"},"query":"coffee"}'{
"status": 0,
"credits_charged": 2,
"request_id": "r-4b27fe8a36d9ac303a5da7dd",
"product_id": "google_maps_search",
"query": "coffee near Seattle, WA",
"page": 1,
"search_type": "maps_search"
}Parameters
qrequiredhlMore
Defaults to en.
glMore
Defaults to us.
pageMore
Defaults to 1.
latMore
Must be sent together with lng.
lngMore
Must be sent together with lat.
zoomMore
Defaults to 14 when coordinates are sent.
formatMore
markdown returns the same result as Markdown text (text/markdown) for language models: no envelope, no duplicate alias fields, no inline images. Same credits; failures keep the JSON envelope.
locationquerylat and lng must be sent together. zoom is valid only with coordinates and defaults to 14.
What comes back
Fields that are not on the page for a given request are left out rather than sent empty.
querystringrequired
Normalized query from the request.
pagenumberrequired
Current 1-based page number.
placesMapsPlace[]When local places are parsed.
Local place results.
MapsPlace Result item schema
positionnumberMaps Search only.
Place rank in the local result list.
namestringrequired
Place name.
titlestringrequired
Alias for name.
feature_idstringrequired
Google Maps feature id.
place_idstringWhen Google exposes it.
Google place id.
data_idstringAlias for feature_id.
Maps data id.
cidstringDerived from feature_id when possible.
Google CID.
kgmidstringWhen present in Maps payload.
Knowledge graph machine id.
google_maps_urlstringWhen Google exposes a Maps URL.
Google Maps URL.
urlstringgoogle_maps_url or website fallback.
Primary place URL.
ratingnumberWhen rating is present.
Google rating.
typesstring[]When categories are present.
Place type labels.
categoryobjectWhen category block is parsed.
Structured category data.
addressstringWhen address is present.
Formatted address.
address_componentsobjectWhen components are present.
Street, city, postal code, country code.
plus_codeobjectWhen plus code is present.
Global and compound plus codes.
phonestringWhen phone is present.
Local phone number.
phone_internationalstringWhen present.
International phone number.
phone_uristringWhen present.
Telephone URI.
websitestringWhen website is present.
Business website.
website_domainstringWhen website domain is present.
Business website domain.
latitudenumberWhen coordinates are present.
Latitude.
longitudenumberWhen coordinates are present.
Longitude.
imagestringWhen image is present.
Primary place image.
thumbnailstringAlias for image when available.
Primary image alias.
photosMapsPhoto[]When photos are parsed.
Photo id, URL, size, and optional coordinates.
hoursRecord<string,string>When hours are parsed.
Opening hours by day.
open_statusobjectWhen status is present.
Open status text and current hours.
attributesobject[]When attributes are parsed.
Grouped place attributes.
related_placesobject[]When related places are present.
Related places from Maps payload.
short_descriptionstringWhen description block is present.
Short place description.
descriptionstringWhen description block is present.
Longer place description.
snippetstringshort_description or description fallback.
Normalized text summary.
timezonestringWhen present.
Place timezone.
regionstringWhen present.
Region label.
country_codestringWhen present.
Country code.
languagestringWhen present.
Language code from Maps payload.
If it fails
A failed request has a non-zero status and an error, and is not charged. The ones you will see here:
1000A parameter is missing or wrongFix the request1020No credits leftTop up1029Over your requests per secondWait Retry-After seconds1502 · 1504The source could not be read this timeRetry