SERP
Google Maps
Google Maps local search — business listings, ratings, reviews, addresses, and map pack data.
POST
$0.01/call/v1/serp/google-mapsUsage
const res = await fetch('https://api.yepapi.com/v1/serp/google-maps', {
method: 'POST',
headers: {
'x-api-key': 'YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({ query: 'coffee shops near Times Square', depth: 10 }),
});
const { data } = await res.json();
console.log(data);curl -X POST https://api.yepapi.com/v1/serp/google-maps \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"query": "coffee shops near Times Square", "depth": 10}'Request Body
| Parameter | Type | Required | Description | Default |
|---|---|---|---|---|
query | string | Yes | Local search query to look up on Google Maps | — |
depth | number | No | Number of results to return | 10 |
location_code | number | No | Target country code (e.g., 2840 for US). See Location Codes. | 2840 |
language | string | No | ISO language code (e.g., en, es) | "en" |
Response
{
"ok": true,
"data": {
"query": "coffee shops manhattan",
"totalResults": 0,
"results": [
{
"position": 1,
"type": "mapsSearch",
"title": "Le Cafe Coffee",
"url": "https://lecafecoffee.com/",
"description": "",
"domain": "lecafecoffee.com"
},
{
"position": 2,
"type": "mapsSearch",
"title": "787 coffee",
"url": "https://www.787coffee.com/",
"description": "",
"domain": "www.787coffee.com"
},
{
"position": 3,
"type": "mapsSearch",
"title": "Down Under Coffee",
"url": "",
"description": "",
"domain": ""
}
]
}
}Response Fields
| Field | Type | Description |
|---|---|---|
ok | boolean | Whether the request succeeded |
data.query | string | The local search query that was executed |
data.totalResults | number | Total number of results (may be 0 for Maps results) |
data.results | object[] | Array of local business result items |
data.results[].position | number | Position in local search results (1-indexed) |
data.results[].type | string | Result type (typically mapsSearch) |
data.results[].title | string | Business name as listed on Google Maps |
data.results[].url | string | Website URL of the business (may be empty if not listed) |
data.results[].description | string | Business description or snippet (may be empty) |
data.results[].domain | string | Domain of the business website (may be empty if not listed) |
Under the Hood
Under the hood, this queries our SERP engine. We normalize the response format and flatten nested structures for consistency.