mapsAvailable
Google Maps Search
Explore the request examples and use this API in the Playground. Account balance and limits apply.
Endpoint and pricing
POST
https://api.serpbase.dev/google/maps/searchCatalog price: 2 credits per request.
Example request parameters
The sample comes from this product’s catalog. It is not the complete parameter list or required-field rules. See the API documentation; known fields are validated by the API.
| Parameter | Example type | Example value |
|---|---|---|
| location | object | {"location_query":"Seattle, WA"} |
| query | string | "coffee" |
JSON
{
"location": {
"location_query": "Seattle, WA"
},
"query": "coffee"
}Request examples
cURL
curl -X POST 'https://api.serpbase.dev/google/maps/search' \
-H "Content-Type: application/json" \
-H 'X-API-Key: YOUR_API_KEY' \
-d '{"location":{"location_query":"Seattle, WA"},"query":"coffee"}'JavaScript
const response = await fetch("https://api.serpbase.dev/google/maps/search", {
"method": "POST",
"headers": {
"Content-Type": "application/json",
"X-API-Key": "YOUR_API_KEY"
},
"body": "{\"location\":{\"location_query\":\"Seattle, WA\"},\"query\":\"coffee\"}"
});
const result = await response.json();
// Check result.status and result.error for the API outcome.
console.log(result);Response and API outcome
Responses are JSON. HTTP 200 on a search endpoint does not mean the API operation succeeded; inspect status and error. See the API documentation for response fields and errors.
View response documentation