Skip to content

Search Google Maps for places matching a keyword around a location and get names, ratings, addresses and place IDs.

GET · POST1 credit / successful callCursor-paginated
GEThttps://api.scrapier.io/api/v2/google-maps/Open in Playground

Send a keyword such as “coffee shops” in queries and a city or address in location. You get a page of matching places, each with place_id, name, rating and address.

Each page holds 20 places and no place_id repeats across pages. Pass next_cursor back as cursor to get the next page; location and language stay the same for every page.

  • Build lead lists of local businesses in a city.
  • Map competitors around an address.
  • Collect ratings for places in a category and area.
Terminal window
curl -G "https://api.scrapier.io/api/v2/google-maps/" \
-H "X-API-Key: YOUR_API_KEY" \
--data-urlencode "queries=coffee shops" \
--data-urlencode "location=Houston,Texas" \
--max-time 210
NameTypeRequiredDefaultDescription
X-API-Key headerstringyes—Your API key from the dashboard.
queriesstringyese.g. coffee shopsPlace search keyword. Required first call. 20 places per page, no duplicate place_ids across pages.
cursorstringno—Pagination cursor returned in the previous response's next_cursor. Pass it back unchanged to fetch the next page. When next_cursor is null, you have reached the last page.
locationstringnoHouston,TexasGeocode anchor for the search (city or address).
locked in cursor
languagestringnoenResult language (Google hl code).
locked in cursor
countrystringnousIgnored -- country bias is derived from the geocoded location.
Advanced
NameTypeDefaultDescription
use_proxybooleantrueRoute the request through Scrapier's residential proxy pool. Default: true. Leave as is unless support tells you otherwise.
raw_databooleanfalseWhen true, the response carries the full raw upstream payload(s) the scraper received (GraphQL / JSON API bodies, HTML, embedded JSON-LD -- exactly as the platform returned them) under raw_responses, in place of the formatted items. When false (default) you get the formatted output. Pagination (cursor / next_cursor) works the same in both modes.
{
"success": true,
"data": {
"queries": "coffee shops",
"page": 1,
"page_size": 20,
"places": [
{
"place_id": "ChIJ...",
"name": "Blue Bottle Coffee",
"rating": 4.4,
"address": "66 Mint St, San Francisco, CA"
}
],
"next_cursor": "eyJpIjoicXVlcnkiLCJwIjoyfQ"
}
}

Sample from the live catalog; arrays trimmed to 3 items. Results are in data.places.

FieldTypeExampleDescription
queriesstringcoffee shops—
pageinteger1—
page_sizeinteger20—
placesarray[1 item]The results.
next_cursorstringeyJpIjoicXVlcnkiLCJwIjoyfQPass back as cursor for the next page. null on the last page.
places[].place_idstringChIJ...Google's ID for the place, unique across pages of the same search.
places[].namestringBlue Bottle Coffee—
places[].ratingnumber4.4Average star rating.
places[].addressstring66 Mint St, San Francisco, CAFormatted address of the place.

Pass data.next_cursor back as cursor until it is null. Required inputs are ignored once a cursor is sent. Each page is one billed call. More in Pagination.

const url = "https://api.scrapier.io/api/v2/google-maps/";
let params = { queries: "coffee shops", location: "Houston,Texas" };
const items = [];
for (let page = 0; page < 10; page++) { // each page is one billed call
const res = await fetch(`${url}?${new URLSearchParams(params)}`, {
headers: { "X-API-Key": "YOUR_API_KEY" },
signal: AbortSignal.timeout(210_000),
});
const body = await res.json();
if (!res.ok) throw new Error(body.error ?? body.detail ?? `HTTP ${res.status}`);
const data = body.data;
items.push(...(data.places ?? []));
if (!data.next_cursor) break; // null = last page
params = { cursor: data.next_cursor };
}

Failed calls are free. Branch on the HTTP status and read the message from error (or detail). Full details in Errors.

StatusMeaningRetry?Charged?
400Bad or missing input.No — fix the paramsNo
401 / 403Missing, invalid or revoked API key.No — fix the keyNo
402Out of credits (body has balance).No — top upNo
404Unknown endpoint slug.No — check the slugNo
429 / 503Busy or throttled.Yes — after Retry-AfterNo
5xxTarget site or upstream failure, or timeout.Yes — with backoffNo
  • country is ignored: the country bias comes from the geocoded location.
  • language takes a Google hl code such as en.
  • queries takes one keyword per call.
  • Locked into the cursor: location, language. Set them on the first call; later pages reuse them.
  • Google Search — Structured Google data: send queries. Single lookup, 1 credit per successful call.
  • Google Autocomplete — Structured Google data: send queries. Cursor-paginated, 1 credit per successful call.