How-to

How to Scrape Google Maps: Places, Details and Reviews

Three ways to get data out of Google Maps: build a scraper, use the official Places API or call a scraping API. With cURL, Python and JavaScript code.

Updated 9 min readBy the ScrapeMapsAPI team

There are three realistic ways to scrape Google Maps: write your own scraper (a headless browser or the web app's internal requests), use Google's official Places API, or call a Google Maps scraping API that returns places, details and reviews as JSON. Building your own gives full control but breaks often; the official API is stable but caps reviews at 5 per place and results at 60 per search; a scraping API sits in between: you send an HTTP request and get clean JSON back, without proxies, parsers or browser farms to maintain.

This guide walks through all three, then shows working cURL, Python and JavaScript code for the third: searching places, reading one place's details and paging through every review. If you only want to see what the data looks like first, paste a Google Maps link into our free Google Maps reviews tool: no signup needed.

What data you can get out of Google Maps

Before picking a method, be clear on what Google Maps actually exposes publicly, because no method can return what Google does not show.

  • Search results: the list you get when you type "dentist in Austin" or "trattoria in Florence": names, addresses, coordinates, categories, rating, review count, phone and website.
  • Place details: opening hours per day, time zone, plus code, owner description, attributes (accessibility, service options, amenities), photos and booking links.
  • Reviews: rating, text, date, language, Google's translation, the owner's reply, photos and structured answers such as "Price per person".
  • Identifiers: the ChIJ… place ID, the decimal CID used in maps?cid= links and the 0x…:0x… feature ID. Our guide to place IDs, CIDs and feature IDs explains how they relate.

What Google Maps does not show signed-out: business email addresses, popular times for most requests, and the price level. If a tool promises emails "from Google Maps", it is crawling the business websites afterwards; we explain how to do that responsibly in extracting phone numbers and emails.

Option 1: build your own Google Maps scraper

The do-it-yourself route usually starts with a headless browser (Playwright or Puppeteer) that opens Google Maps, types a query, scrolls the results panel and reads the DOM. It works for a demo. In production it runs into three problems.

  1. The signed-out Maps UI is limited. Google shows a "limited view" to visitors who are not logged in, and the reviews tab is not part of it. A browser that is not signed in cannot scroll through reviews, and signing in automated accounts brings its own legal and practical problems.
  2. Layouts change. Class names are obfuscated and the JSON inside the page is a deeply nested array with positional indexes. When Google moves one index, your parser silently returns empty fields or wrong values.
  3. IP blocking. A few hundred requests from one datacenter IP get rate-limited or served CAPTCHAs. You need residential proxies, rotation, retries and circuit breakers, and you pay for proxy bandwidth on every page.

A more efficient DIY approach skips the browser and calls the internal JSON endpoints the Maps web app uses. That is faster and cheaper, but you are now maintaining reverse-engineered request formats, positional parsers and fixture tests, and you have to notice when Google changes them. If scraping is your product, that can be worth it. If you just need the data, it usually is not.

Option 2: the official Google Places API

Google's Places API is the sanctioned route: an API key, documented endpoints, an SLA and terms that cover your use. It is the right choice when you display results on a Google map, when your legal team requires a contract with Google, or when you only need a few basic fields.

Its limits matter for data work, though. At the time of writing:

  • Place Details returns at most 5 reviews per place, whatever the place's total. There is no paging past them; see why the Places API stops at 5 reviews.
  • Text Search returns at most 60 results per query, 20 per page.
  • Pricing is per request and per field group: roughly $32 per 1,000 Text Search Pro requests and $25 per 1,000 Place Details requests that include reviews, after the free monthly calls each SKU gets since March 2025.
  • The terms restrict caching: you may store place IDs, but most other content cannot be kept beyond short limits, and results must carry Google attribution.

We compare both approaches in detail, with numbers, in Google Places API vs scraping.

Option 3: a Google Maps scraping API

A scraping API does the hard part on its side: residential proxies, request building, defensive parsing, fallbacks when one route fails, and a stable JSON schema that does not change when Google's layout does. You call plain HTTP endpoints. With ScrapeMapsAPI that is four endpoints:

EndpointWhat it returnsCost
GET /v1/places/searchUp to 20 places per call, cursor paging1 credit
GET /v1/places/{place}Full details of one place1 credit
GET /v1/places/{place}/reviewsUp to 20 reviews per call, every review of the place1 credit
GET /v1/places/resolveConverts any ID or Google Maps URL1 credit

You get 200 free calls a month, then $3 per 1,000 calls, down to $1.50 with credit packs; failed calls are never billed. The pricing page has the full table.

Step 1: get an API key

Create an account, open the dashboard and create an API key. Every request sends it in the X-API-Key header (authentication docs). In the examples below it is read from the SCRAPEMAPSAPI_API_KEY environment variable.

Terminal
export SCRAPEMAPSAPI_API_KEY="key_your_api_key"

Step 2: search places

The search endpoint takes the same kind of query you would type in Google Maps. region is a two-letter country code and language controls the language of names and categories.

Terminal
curl "https://api.scrapemapsapi.com/v1/places/search?q=trattoria%20in%20Florence&region=it&language=en&limit=20" \
  -H "X-API-Key: $SCRAPEMAPSAPI_API_KEY"

Each result is a place summary with its identifiers, address, coordinates, rating, review count, phone and website:

JSON
{
  "data": [
    {
      "id": "ChIJ8cLgoQNUKhMReGlaTjwrH40",
      "ids": {
        "place_id": "ChIJ8cLgoQNUKhMReGlaTjwrH40",
        "cid": "10168894021638449528",
        "feature_id": "0x132a5403a1e0c2f1:0x8d1f2b3c4e5a6978",
        "google_maps_url": "https://www.google.com/maps?cid=10168894021638449528"
      },
      "name": "Trattoria Da Neri",
      "categories": ["Tuscan restaurant", "Italian restaurant"],
      "address": {
        "formatted": "Via dei Neri, 42/r, 50122 Firenze FI, Italy",
        "street": "Via dei Neri, 42/r",
        "postal_code": "50122",
        "city": "Firenze",
        "region": "Toscana",
        "country_code": "IT"
      },
      "location": { "lat": 43.7681, "lng": 11.258 },
      "rating": 4.6,
      "review_count": 2843,
      "phone": "055 123 4567",
      "website": "https://www.trattoriadaneri.example",
      "status": "operational"
    }
  ],
  "pagination": { "next_cursor": "eyJvIjoyMCwicSI6InRyYXR0b3JpYSJ9", "has_more": true },
  "meta": { "credits_used": 1, "cached": false, "query": "trattoria in Florence", "language": "en", "region": "it" }
}

To get the next 20, repeat the call with the same q and cursor set to next_cursor. The cursor remembers the language, region and location, so you do not need to resend them. A single query eventually runs out of pages, like it does in the Maps app; for a whole city, split it into neighbourhoods with lat, lng and radius_km (up to 100 km) and run one search per area. The search reference lists every parameter.

Step 3: read place details

Details take a place ID, a CID or a feature ID, so you can pass any identifier the search returned.

Python
import os
import requests

API = "https://api.scrapemapsapi.com"
HEADERS = {"X-API-Key": os.environ["SCRAPEMAPSAPI_API_KEY"]}

r = requests.get(f"{API}/v1/places/ChIJ8cLgoQNUKhMReGlaTjwrH40", headers=HEADERS, params={"language": "en"}, timeout=60)
r.raise_for_status()
place = r.json()["data"]

print(place["name"], place["phone_international"], place["timezone"])
if place["opening_hours"]:
    for day in place["opening_hours"]["weekly"]:
        print(day["day"], "closed" if day["closed"] else day["text"])
print(place["attributes"].get("Accessibility", []))

Beyond the summary fields you get opening_hours, attributes, photos, booking_links, description, plus_code and more (details reference).

Step 4: page through every review

Reviews come 20 per call with a cursor, sorted by relevant, newest, highest or lowest. This Node.js 18+ script collects all of them and respects the Retry-After header if it ever hits the rate limit:

JavaScript
const API = 'https://api.scrapemapsapi.com';
const headers = { 'X-API-Key': process.env.SCRAPEMAPSAPI_API_KEY };

async function allReviews(place, { sort = 'newest', maxPages = 500 } = {}) {
  const reviews = [];
  let cursor = null;
  for (let page = 0; page < maxPages; page++) {
    const params = new URLSearchParams({ sort, limit: '20' });
    if (cursor) params.set('cursor', cursor);
    const res = await fetch(`${API}/v1/places/${encodeURIComponent(place)}/reviews?${params}`, { headers });
    if (res.status === 429) {
      const wait = Number(res.headers.get('Retry-After') || 60);
      await new Promise((r) => setTimeout(r, wait * 1000));
      page--;
      continue;
    }
    if (!res.ok) throw new Error(JSON.stringify((await res.json()).detail));
    const body = await res.json();
    reviews.push(...body.data);
    if (!body.pagination.has_more) break;
    cursor = body.pagination.next_cursor;
  }
  return reviews;
}

const reviews = await allReviews('ChIJ8cLgoQNUKhMReGlaTjwrH40');
console.log(reviews.length, reviews[0]?.rating, reviews[0]?.text);

Review authors come back as a stable pseudonymous author.id only: no names, photos or profile links. That is a deliberate privacy choice, and it is enough to spot several reviews by the same person. A full Python version that writes a CSV is in scraping Google Maps reviews with Python.

Handling errors

Errors share one envelope, {"detail": {"error": "<code>", "message": "..."}}, and are never billed. The ones worth handling in code:

  • 404 place_not_found: the place was removed; drop it from your list.
  • 400 invalid_cursor: you mixed a cursor from another query or place.
  • 429 rate_limit_exceeded: wait for Retry-After seconds (the limit is 500 requests per minute).
  • 503 upstream_unavailable: retry in a minute.

The errors page has the complete list.

Which option should you choose?

Choose the official Places API if you show results on a Google map, need Google's terms to cover your use, or only need a handful of basic fields. Build your own scraper if scraping is your core business and you can staff the maintenance. Use a scraping API when you need the data itself (every review, many searches, a stable schema) and would rather not run proxies and parsers. Whatever you choose, read our guide on whether scraping Google Maps is legal before you collect anything at scale.

FAQ

Can I scrape Google Maps without coding?

Yes, for small jobs. Our free Google Maps reviews tool shows a place and its newest reviews from a link, without signing up. For anything repeatable, a few lines of cURL or Python against an API are more reliable than browser extensions, which break whenever the Maps interface changes.

How many results can one Google Maps search return?

Google Maps stops returning new results for a query after a limited number of pages, both in the app and through APIs. The official Places API caps Text Search at 60 results. To cover a whole city, run several searches over smaller areas using a latitude, longitude and radius for each neighbourhood, then remove duplicates by place ID.

Do I need proxies to scrape Google Maps?

If you build your own scraper, yes: Google rate-limits and blocks datacenter IPs quickly, so production scrapers use rotating residential proxies. With a scraping API the provider runs the proxies, so you only send normal HTTPS requests with your API key.

How much does it cost to scrape Google Maps?

With ScrapeMapsAPI every successful call costs 1 credit, and a call returns up to 20 places or 20 reviews. You get 200 free calls a month, then $3 per 1,000 calls, which is $0.15 per 1,000 reviews with full pages. Failed calls are free.

Can I get every review of a place, not just 5?

Yes. The reviews endpoint pages through all of a place's reviews 20 at a time with a cursor, sorted by relevance, newest, highest or lowest rating, optionally only those written in one language. The 5-review limit belongs to the official Places API.

Try it on your own data

Create a free account and get 200 free API calls every month. No credit card required.

Related articles