Export Google Maps Search Results to CSV or Excel
Export Google Maps places to a spreadsheet: names, addresses, phones, websites, ratings and coordinates, with one cURL call or a short Python script.
Updated 8 min readBy the ScrapeMapsAPI team
To export Google Maps search results to CSV, run the search through an API that returns the places as JSON, follow the pagination, flatten each place into one row and write the rows to a file. Google Maps has no export button of its own: the "Save" lists in the app keep places for you to look at, not data you can download. This guide does the export three ways, from a one-line cURL and jq command for a quick list, to a Python script that covers a whole city and opens cleanly in Excel or Google Sheets, with the columns most people need: name, address, phone, website, rating, review count, categories and coordinates.
What you can put in the spreadsheet
A ScrapeMapsAPI place search returns up to 20 places per call. Each place already carries the fields of a typical export, so you do not need one extra call per row:
| Column | API field | Notes |
|---|---|---|
| Name | name | As shown on Google Maps |
| Address | address.formatted | Plus street, postal_code, city, region, country_code separately |
| Phone | phone | Local format |
| Website | website | Null when the business has none |
| Rating | rating | 1.0 to 5.0 |
| Reviews | review_count | Total number of reviews |
| Categories | categories | A list, such as Tuscan restaurant and Italian restaurant |
| Coordinates | location.lat, location.lng | For maps and distance calculations |
| Status | status | operational, temporarily_closed or permanently_closed |
| Link | ids.google_maps_url | Opens the listing |
| Place ID | id | The key to dedupe and to fetch details later |
Opening hours, the international phone format, the description, attributes and photos are in place details, one call per place. Add them only for the rows you keep. There is no email column, because Google Maps does not show emails; our article on extracting phone numbers and emails explains how to find them on the businesses' websites.
The quick way: cURL and jq
For a list of up to 20 places, one call and the jq tool are enough. Sign up, copy your API key from the dashboard, and run:
export SCRAPEMAPSAPI_API_KEY="key_your_api_key"
curl -s "https://api.scrapemapsapi.com/v1/places/search?q=coffee%20shop%20in%20Lisbon®ion=pt&limit=20" \
-H "X-API-Key: $SCRAPEMAPSAPI_API_KEY" \
| jq -r '(["name","address","phone","website","rating","reviews","lat","lng"] | @csv),
(.data[] | [.name, .address.formatted, .phone, .website, .rating, .review_count,
.location.lat, .location.lng] | @csv)' > coffee-lisbon.csv@csv takes care of quoting, so addresses with commas stay in one column. That is one call, 1 credit, and you have a spreadsheet. The answer also contains pagination.next_cursor; passing it back as cursor with the same q gives you the next 20 places.
The complete way: a Python script
Real exports need more than one page, more than one query and a few clean-up steps. The script below takes a list of queries, follows the cursor of each one until has_more is false, removes duplicates by place ID, and writes a CSV that Excel opens correctly.
import csv
import os
import time
import requests
API = "https://api.scrapemapsapi.com/v1"
KEY = os.environ["SCRAPEMAPSAPI_API_KEY"]
COLUMNS = ["name", "categories", "address", "street", "postal_code", "city", "country",
"phone", "website", "rating", "reviews", "lat", "lng", "status", "maps_url", "place_id"]
def search(q, region, language="en", max_pages=10, **area):
params = {"q": q, "region": region, "language": language, "limit": 20, **area}
for _ in range(max_pages):
r = requests.get(f"{API}/places/search", params=params, headers={"X-API-Key": KEY}, timeout=60)
if r.status_code == 429:
time.sleep(int(r.headers.get("Retry-After", "60")))
continue
if r.status_code != 200:
raise RuntimeError(f"{r.status_code}: {r.json()['detail']}")
page = r.json()
yield from page["data"]
if not page["pagination"]["has_more"]:
return
params = {"q": q, "cursor": page["pagination"]["next_cursor"], "limit": 20}
def row(place):
a = place["address"]
return {
"name": place["name"],
"categories": "; ".join(place["categories"]),
"address": a["formatted"],
"street": a["street"],
"postal_code": a["postal_code"],
"city": a["city"],
"country": a["country_code"],
"phone": place["phone"],
"website": place["website"],
"rating": place["rating"],
"reviews": place["review_count"],
"lat": place["location"]["lat"],
"lng": place["location"]["lng"],
"status": place["status"],
"maps_url": place["ids"]["google_maps_url"],
"place_id": place["id"] or place["ids"]["cid"],
}
def export(queries, region, path):
seen, rows = set(), []
for q in queries:
for place in search(q, region):
key = place["ids"]["cid"]
if key in seen:
continue
seen.add(key)
rows.append(row(place))
# utf-8-sig adds the byte order mark Excel needs to show accents correctly
with open(path, "w", newline="", encoding="utf-8-sig") as f:
writer = csv.DictWriter(f, fieldnames=COLUMNS)
writer.writeheader()
writer.writerows(rows)
return len(rows)
if __name__ == "__main__":
n = export(["coffee shop in Lisbon", "specialty coffee in Lisbon", "café in Lisbon"],
region="pt", path="coffee-lisbon.csv")
print(f"{n} places written")Three details in this script save you trouble later:
- Deduplication uses the CID, which every place has, rather than the name. Chains share names; they never share identifiers. We explain the identifiers in place ID, CID and feature ID explained.
- The file is written as UTF-8 with a byte order mark. Without it, Excel on Windows shows "Café" instead of "Café". Google Sheets and LibreOffice read it either way.
- Categories are joined with semicolons into one cell, so the CSV keeps one row per place.
Covering a whole city
One search query only goes so deep: after a certain number of pages Google stops returning new results, however many places exist. To export every coffee shop of a large city, split the area instead of paging further. The search endpoint takes lat, lng and radius_km to bias the results towards a point:
neighbourhoods = {
"Baixa": (38.7110, -9.1366),
"Alfama": (38.7114, -9.1300),
"Bairro Alto": (38.7130, -9.1450),
"Parque das Nações": (38.7684, -9.0940),
}
for name, (lat, lng) in neighbourhoods.items():
for place in search("coffee shop", region="pt", lat=lat, lng=lng, radius_km=1.5):
print(name, place["name"])Plug the same loop into export() and the CID-based deduplication removes the overlaps between neighbouring circles. Our guide to Google Maps lead generation turns this into a full grid over a region and adds scoring of the results.
Note that lat and lng go together: sending one without the other is a 400 invalid_location error. The cursor remembers the area of its search, so later pages need only q and cursor.
Opening the file in Excel or Google Sheets
- Excel: double-click the file, or use Data, From Text/CSV and pick UTF-8 if Excel asks. The phone column may lose a leading zero or a plus sign if Excel treats it as a number; import it as text to keep it intact.
- Google Sheets: File, Import, Upload, and choose to replace the sheet or append to it. Phone numbers stay as text when they contain spaces, which local Google formats usually do.
- If you prefer to skip the file, the Python SDK returns the same data as objects you can hand straight to pandas, and
df.to_excel()writes an .xlsx file.
Adding details for the rows you keep
Once you have filtered the spreadsheet, for example to places rated 4.5 and above with more than 100 reviews, enrich the remaining rows with a details call each:
def details(place_id):
r = requests.get(f"{API}/places/{place_id}", headers={"X-API-Key": KEY}, timeout=60)
r.raise_for_status()
p = r.json()["data"]
hours = (p["opening_hours"] or {}).get("weekly", [])
return {
"phone_international": p["phone_international"],
"timezone": p["timezone"],
"description": p["description"],
"monday": next((d["text"] for d in hours if d["day"] == "monday"), None),
}Each details call costs 1 credit for one place, so filtering first is what keeps an export cheap. If what you need next is what customers say, the reviews API gives you every review of each place, and you can try it on a single place without an account in the free reviews tool.
What an export costs
Billing is per successful call: 1 credit whatever it returns. A search page of 20 places is 1 credit, so 1,000 places cost 50 credits, plus 1 credit per place you enrich with details. Every account gets 200 free calls a month, enough for an export of up to 4,000 places, and then the list price is $3 per 1,000 calls with cheaper credit packs on the pricing page. Failed calls are never billed.
FAQ
Can I export Google Maps search results to Excel?
Not from Google Maps itself, which has no export feature. Run the same search through an API that returns places as JSON, write the results to a CSV file and open it in Excel. Saving the file as UTF-8 with a byte order mark keeps accented characters readable.
How many places can I export from one search?
Each call returns up to 20 places and you can follow the cursor to further pages, but a single query stops after a limited number of pages. For complete coverage of a city, run the search for several neighbourhoods with latitude, longitude and a radius, then remove duplicates by place ID or CID.
Which columns does the export include?
Search results include the name, full and split address, phone, website, rating, review count, categories, coordinates, business status, a Google Maps link and the place identifiers. Opening hours, international phone numbers, descriptions and photos need a details call per place.
Does the export include email addresses?
No. Google Maps listings do not show email addresses, so no export from Google Maps can contain them. You can visit the website of each business from the website column and look for a published contact address there.
How much does exporting 1,000 places cost?
At 20 places per call, 1,000 places take 50 search calls, which is 50 credits. The first 200 calls each month are free; after that the list price is $3 per 1,000 calls. Details for each place cost 1 more credit per place.
Try it on your own data
Create a free account and get 200 free API calls every month. No credit card required.