Google Maps API Python Client

Extract Google Maps data with our Google Maps API Python client. Get programmatic access to phone numbers, coordinates, review counts, business names, opening hours, addresses, websites, ratings, and more using simple Python code. Start free, no credit card required.

Trusted by industry leaders all over the world

Integrate our Google Maps API

The Apify API client for Python is the official library that allows you to use Google Maps API in Python, providing convenience functions and automatic retries on errors. Get started with simple pip installation and robust error handling built-in.

Python

Python

JavaScript

JavaScript

HTTP

HTTP

MCP

MCP

1from apify_client import ApifyClient
2
3# Initialize the ApifyClient with your Apify API token
4# Replace '<YOUR_API_TOKEN>' with your token.
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7# Prepare the Actor input
8run_input = {
9 "searchStringsArray": ["restaurant"],
10 "locationQuery": "New York, USA",
11 "maxCrawledPlacesPerSearch": 50,
12 "language": "en",
13 "maximumLeadsEnrichmentRecords": 0,
14 "maxImages": 0,
15}
16
17# Run the Actor and wait for it to finish
18run = client.actor("compass/crawler-google-places").call(run_input=run_input)
19
20# Fetch and print Actor results from the run's dataset (if there are any)
21print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
22for item in client.dataset(run["defaultDatasetId"]).iterate_items():
23 print(item)
24
25# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

Get data with Google Maps API Python client

Use our Python API client to extract Google Maps data by providing search terms, locations, or direct URLs. The API returns structured data, including business details, contact information, ratings, reviews, images, opening hours, and geographic coordinates for comprehensive business intelligence and lead generation.

Input

{
"website": "allPlaces",
"language": "en",
"maxReviews": 0,
"reviewsSort": "newest",
"maxQuestions": 0,
"locationQuery": "New York, USA",
"reviewsOrigin": "all",
"scrapeContacts": false,
"searchMatching": "all",
"skipClosedPlaces": false,
"includeWebResults": false,
"placeMinimumStars": "",
"scrapeDirectories": false,
"scrapeImageAuthors": false,
"searchStringsArray": [
"restaurant"
],
"reviewsFilterString": "",
"scrapePlaceDetailPage": false,
"allPlacesNoSearchAction": "",
"maxCrawledPlacesPerSearch": 50,
"scrapeReviewsPersonalData": true,
"maximumLeadsEnrichmentRecords": 0,
"scrapeTableReservationProvider": false
}

Output

{
"cid": "7838756667406262025",
"fid": "0x89c3ca9c11f90c25:0x6cc8dba851799f09",
"url": "<https://www.google.com/maps/search/?api=1&query=Kim's%20Island&query_place_id=ChIJJQz5EZzKw4kRCZ95UajbyGw>",
"city": "Staten Island",
"menu": "<http://kimsislandsi.com/>",
"rank": null,
"kgmid": "/g/1tmgdcj8",
"phone": "(718) 356-5168",
"price": "$10–20",
"state": "New York",
"title": "Kim's Island",
"images": [
{
"imageUrl": "<https://lh5.googleusercontent.com/p/AF1QipMyThXuZMjeiMZfTM42rbJJGm-q54JNzL3xsCn_=w1920-h1080-k-no>",
"authorUrl": "<https://maps.google.com/maps/contrib/103237729589375373179>",
"authorName": "Sebastian Sinisterra (CitySeby)",
"uploadedAt": "2017-05-30T00:00:00.000Z"
}
],
"street": "175 Main St",
"address": "175 Main St, Staten Island, NY 10307",
"orderBy": [
{
"name": "kimsislandsi.com",
"orderUrl": "<http://kimsislandsi.com/>"
}
],
"placeId": "ChIJJQz5EZzKw4kRCZ95UajbyGw",
"reviews": [
{
"name": "Rocco Castellano",
"text": "Excellent food great service n always on time",
"stars": 5,
"rating": null,
"reviewId": "ChdDSUhNMG9nS0VJQ0FnSURuNV9DVnFRRRAB",
"publishAt": "a month ago",
"reviewUrl": "<https://www.google.com/maps/reviews/data=!4m8!14m7!1m6!2m5!1sChdDSUhNMG9nS0VJQ0FnSURuNV9DVnFRRRAB!2m1!1s0x0:0x6cc8dba851799f09!3m1!1s2@1:CIHM0ogKEICAgIDn5_CVqQE%7CCgwInvyhuAYQyOjhgwI%7C?hl=en>",
"likesCount": 0,
"reviewerId": "108813127648936384314",
"reviewerUrl": "<https://www.google.com/maps/contrib/108813127648936384314?hl=en>",
"isLocalGuide": true,
"reviewOrigin": "Google",
"reviewContext": {},
"textTranslated": null,
"publishedAtDate": "2024-10-11T01:23:42.544Z",
"reviewImageUrls": [],
"reviewerPhotoUrl": "<https://lh3.googleusercontent.com/a-/ALV-UjXRb3lzFb-4SdRMWMlaaECCmdFwULv7bvKKVOK-3mmDcBWyJnY3XQ=s120-c-rp-mo-ba4-br100>",
"reviewDetailedRating": {
"Food": 5,
"Service": 5,
"Atmosphere": 5
},
"responseFromOwnerDate": null,
"responseFromOwnerText": null,
"reviewerNumberOfReviews": 74
}
],
"website": "<http://kimsislandsi.com/>",
"hotelAds": [],
"imageUrl": "<https://lh5.googleusercontent.com/p/AF1QipMyThXuZMjeiMZfTM42rbJJGm-q54JNzL3xsCn_=w408-h306-k-no>",
"location": {
"lat": 40.5107736,
"lng": -74.2482624
},
"plusCode": "GQ62+8M Staten Island, New York",
"subTitle": null,
"gasPrices": [],
"imageUrls": [
"<https://lh5.googleusercontent.com/p/AF1QipMyThXuZMjeiMZfTM42rbJJGm-q54JNzL3xsCn_=w1920-h1080-k-no>"
],
"locatedIn": null,
"scrapedAt": "2024-11-28T12:28:50.519Z",
"categories": [
"Chinese restaurant",
"Delivery Restaurant"
],
"hotelStars": null,
"placesTags": [],
"postalCode": "10307",
"totalScore": 4.5,
"webResults": [],
"checkInDate": null,
"countryCode": "US",
"description": null,
"imagesCount": 28,
"reviewsTags": [
{
"count": 6,
"title": "prices"
},
{
"count": 4,
"title": "delivery"
},
{
"count": 3,
"title": "spareribs"
},
{
"count": 2,
"title": "dumpling"
},
{
"count": 2,
"title": "lo mein"
}
],
"bookingLinks": [],
"categoryName": "Chinese restaurant",
"checkOutDate": null,
"neighborhood": "Tottenville",
"openingHours": [
{
"day": "Monday",
"hours": "Closed"
},
{
"day": "Tuesday",
"hours": "11 AM to 9:30 PM"
},
{
"day": "Wednesday",
"hours": "11 AM to 9:30 PM"
},
{
"day": "Thursday",
"hours": "11 AM to 12 AM"
},
{
"day": "Friday",
"hours": "12 to 9:30 AM, 11 AM to 10:30 PM"
},
{
"day": "Saturday",
"hours": "11 AM to 10:30 PM"
},
{
"day": "Sunday",
"hours": "12 to 9:30 PM"
}
],
"ownerUpdates": [],
"reviewsCount": 91,
"searchString": "Direct Detail URL: <https://www.google.com/maps/place/Kim's+Island/@40.5107736,-74.2482624,17z/data=!4m6!3m5!1s0x89c3ca9c11f90c25:0x6cc8dba851799f09!8m2!3d40.5107736!4d-74.2482624!16s%2Fg%2F1tmgdcj8?hl=en&entry=ttu>",
"googleFoodUrl": null,
"searchPageUrl": null,
"userPlaceNote": null,
"additionalInfo": {
"Children": [
{
"Good for kids": true
}
],
"Payments": [
{
"Credit cards": true
},
{
"Debit cards": true
},
{
"NFC mobile payments": true
},
{
"Credit cards": true
}
],
"Planning": [
{
"Accepts reservations": false
}
],
"Amenities": [
{
"Restroom": false
}
],
"Offerings": [
{
"Comfort food": true
},
{
"Healthy options": true
},
{
"Quick bite": true
},
{
"Small plates": true
}
],
"Atmosphere": [
{
"Casual": true
}
],
"Popular for": [
{
"Lunch": true
},
{
"Dinner": true
},
{
"Solo dining": true
}
],
"Accessibility": [
{
"Wheelchair accessible entrance": true
},
{
"Wheelchair accessible seating": true
},
{
"Assistive hearing loop": false
},
{
"Wheelchair accessible parking lot": false
},
{
"Wheelchair accessible restroom": false
}
],
"Dining options": [
{
"Lunch": true
},
{
"Dinner": true
}
],
"Service options": [
{
"Takeout": true
},
{
"Dine-in": true
}
]
},
"parentPlaceUrl": null,
"restaurantData": {},
"imageCategories": [
"All",
"Menu",
"Food & drink",
"Vibe",
"By owner",
"Street View & 360°"
],
"isAdvertisement": false,
"reserveTableUrl": null,
"hotelDescription": null,
"peopleAlsoSearch": [
{
"title": "Island Kitchen Chinese",
"category": "People also search for",
"totalScore": 3.4,
"reviewsCount": 70
},
{
"title": "New Island",
"category": "People also search for",
"totalScore": 3.9,
"reviewsCount": 116
},
{
"title": "Islander Taste Chinese Restaurant",
"category": "People also search for",
"totalScore": 4.2,
"reviewsCount": 119
},
{
"title": "Kum Fung",
"category": "People also search for",
"totalScore": 3.8,
"reviewsCount": 168
}
],
"phoneUnformatted": "+17183565168",
"claimThisBusiness": false,
"permanentlyClosed": false,
"temporarilyClosed": false,
"hotelReviewSummary": null,
"questionsAndAnswers": [],
"reviewsDistribution": {
"oneStar": 4,
"twoStar": 3,
"fiveStar": 71,
"fourStar": 10,
"threeStar": 3
},
"searchPageLoadedUrl": null,
"similarHotelsNearby": null,
"updatesFromCustomers": null,
"tableReservationLinks": []
}

How to use Google Maps API

Sign up for Apify account01

Creating an account is quick and free — no credit card required. Your account gives you access to more than 5,000 scrapers and APIs.

Get started for free
Install Apify Python client02

Install the Apify Python client using pip: pip install apify-client. This package provides a simple interface to interact with Google Maps API from your Python applications.

Get your Apify API token03

Go to settings in the Apify console and navigate to the “API & Integrations” tab. There, create a new token and save it for later.

Integrate Google Maps API04

Navigate to the Google Maps API page and click on the API dropdown menu in the top right corner. In the dropdown menu, you can see API clients, API endpoints, and more. Use the provided Python code examples to integrate Google Maps API into your Python application.

Open Google Maps Python API
Get your Google Maps data via API05

The Google Maps API returns structured JSON data that works perfectly with pandas, NumPy, and other Python data analysis libraries.

Why use Apify?

Never get blocked

Every plan (free included) comes with Apify Proxy, which is great for avoiding blocking and giving you access to geo-specific content.

Customers love us

We truly care about the satisfaction of our users and thanks to that we're one of the best-rated data extraction platforms on both G2 and Capterra.

Monitor your runs

With our latest monitoring features, you always have immediate access to valuable insights on the status of your web scraping tasks.

Export to various formats

Your datasets can be exported to any format that suits your data workflow, including Excel, CSV, JSON, XML, HTML table, JSONL, and RSS.

Integrate Apify to your workflow

You can integrate your Apify runs with platforms such as Zapier, Make, Keboola, Google Drive, or GitHub. Connect with practically any cloud service or web app.

Large developer community

Apify is built by developers, so you'll be in good hands if you have any technical questions. Our Discord server is always here to help!

Frequently asked questions

No, there is no official Google Maps Python API client that provides the comprehensive data extraction capabilities offered by this scraper. While Google offers the Places API Python client, it caps search results at only 60 places per query and costs $200 for 28,500 map loads per month. This Google Maps Scraper bypasses the 120 places per area limitation and provides unlimited results without rate limits or quotas, plus additional data like popular times histograms that aren't available in the official Python API client.

Yes, you can try the Google Maps Python API client for free using Apify's free tier. The platform provides free credits to test the Python API client's capabilities before committing to a paid plan, allowing you to extract sample data and evaluate the quality of results for your specific use case.

You can extract comprehensive business data using the Python Google Maps API client including names, addresses, phone numbers, websites, ratings, review counts, categories, opening hours, coordinates, images, menu links, price brackets, popular times, amenities, accessibility information, reviewer details, questions and answers, booking links, and over 50 other data points. The Python API client also supports enrichment add-ons for company contact details and business leads with LinkedIn profiles and email addresses.

Getting started with our Google Maps Python API is easy — simply create a free Apify account, get your API token, and start using the Google Maps API in Python, JavaScript, CLI, cURL, OpenAPI, or MCP.

Get started with Google Maps API Python client today

Get your first Google Maps data in Python in less than 5 minutes. No credit card required. No commitment. Cancel anytime.