How to Extract Google Maps Coordinates: Complete Guide 2025
GPS coordinates (latitude and longitude) are present on every Google Maps listing. However, retrieving them manually, listing by listing, is tedious. Extracting them at scale (100, 1,000, 10,000 listings) requires a strategy.
This article covers three approaches: the manual method using regex (for understanding), the API method (for developers), and the optimal method (for professionals).
Why Extract Google Maps Coordinates?
Before diving into the technical details, understanding why you need this data changes everything.
Common use cases:
- Business prospecting: create a contact list with precise locations for a targeted campaign
- Market analysis: map competitors by geographic area
- Logistics: optimize delivery routes with verified addresses
- Urban studies: analyze the density of establishments by sector
- CRM integration: enrich your contacts with geolocated data for ABM marketing
GPS coordinates are the unique identifier of a place. An address can be ambiguous (two streets with the same name in the same city). A latitude/longitude pair is never ambiguous.
The Three Methods: Advantages and Limits
Before diving into the details, here’s a comparative table:
| Method | Accuracy | Ease | Scalability | Cost | Use Case |
|---|---|---|---|---|---|
| Address (regex) | ⭐⭐ | ⭐⭐⭐ | ⭐ | Free | 1-10 listings, testing |
| Place ID + Geocoding API | ⭐⭐⭐⭐⭐ | ⭐⭐ | ⭐⭐ | €0-500/month | 100-10K listings, critical accuracy |
| Data enrichment | ⭐⭐⭐⭐⭐ | ⭐⭐⭐⭐⭐ | ⭐⭐⭐⭐⭐ | €44-250/month | 1K-100K listings, production |
Method 1: Extract Coordinates from the URL with Regex
How Coordinates Work in the Google Maps URL
When you open a Google Maps listing, the URL contains the GPS coordinates. Example:
https://maps.google.com/maps?q=Restaurant+Gavroche&.../@48.8566,2.3522,15z/...
The numbers 48.8566,2.3522 are the latitude and longitude. They appear after the @ symbol and before the next comma (the zoom level).
Exact format:
/@[LATITUDE],[LONGITUDE],[ZOOM]z/
Practical Case: Scrape an Address with Octoparse
Octoparse is a visual scraping tool (no coding required). Here’s the workflow:
Step 1: Access Google Maps
Create a new task in Octoparse and enter google.com/maps.
Step 2: Simulate a Search
Activate the "Browse" mode to interact with the page. Click on the search bar and enter an address (e.g., "10 Rue de Rivoli, Paris").
Step 3: Wait for the Loading
Add a wait time (1-2 seconds) for the listing to load. Simulate pressing Enter.
Step 4: Extract the URL
Once on the listing, create a custom field that extracts the page URL. In Octoparse: "Add custom field" → "Page level data" → "Page URL".
Step 5: Parse the Coordinates with Regex
Now you have the full URL. You need to extract the latitude and longitude.
Create a regular expression (regex):
@(-?\d+\.\d+),(-?\d+\.\d+)
This regex means: "Find an @ followed by a number (latitude), a comma, then another number (longitude)".
In Octoparse:
- Click on "More clean data" → "Add step" → "Match expression"
- Paste the regex
- Create two fields: latitude and longitude
Result:
latitude: 48.8566
longitude: 2.3522
The Limits of This Approach
This method works for 1-10 listings. But it has serious issues:
Problem 1: Address Ambiguity
If you search for "Bakery, Paris", Google Maps returns 50 results. The URL of the list does not have coordinates. You need to click on EACH result, which slows down the scraping.
Problem 2: False Positives
An incomplete address (without a postal code) can match multiple listings. You risk extracting the wrong coordinates.
Problem 3: Scalability
Scraping 10,000 listings with this method? Expect several days. And if Google detects the scraping, your IP may be blocked.
Verdict: Useful for understanding the mechanism, but impractical in production.
Method 2: Use Place ID with Google Geocoding API
What is a Place ID?
Every Google Maps listing has a unique Place ID. It is an alphanumeric identifier that never changes, even if the address changes.
Example:
ChIJrTLr5LoC5OkRVLEMKwFRK7w
The Place ID is the reliable identifier for retrieving coordinates accurately.
Retrieve a Place ID
Option 1: From the Google Maps URL
Open a Google Maps listing and look for the cid parameter in the URL:
https://maps.google.com/?cid=...&...
Option 2: With Google Places API
If you have an address, you can convert it to a Place ID via the API. But it's a bit circular.
Option 3: Via a scraping tool
IBLead (which we will discuss later) provides the Place ID directly in its exports.
Set Up Google Geocoding API
The Geocoding API converts a Place ID into GPS coordinates.
Step 1: Create a Google Cloud Project
- Go to console.cloud.google.com
- Create a new project ("Select a project" button → "New project")
- Give it a name (e.g., "GPS Extraction")
- Click on "Create"
Step 2: Enable the Geocoding API
- In the search bar, type "Geocoding API"
- Click on the result
- Click on "Enable"
⚠️ Important: You must add a payment method to your Google Cloud account. The API is paid (€0.005 per request on average). However, Google offers €300 in free credits for the first month.
Step 3: Create an API Key
- In the side menu, go to "Credentials"
- Click on "Create credentials" → "API key"
- Select "API key"
- Copy the key immediately — you won't be able to see it again later
Example of a key:
AIzaSyDxxxxxxxxxxxxxxxxxxxxxxxxxxx
Implement Extraction in Python
Here’s a simple script to extract coordinates from a Place ID:
import requests
import json
# Your API key
API_KEY = "AIzaSyDxxxxxxxxxxxxxxxxxxxxxxxxxxx"
# Place ID
PLACE_ID = "ChIJrTLr5LoC5OkRVLEMKwFRK7w"
# Geocoding API URL
url = f"https://maps.googleapis.com/maps/api/geocode/json?place_id={PLACE_ID}&key={API_KEY}"
# Make the request
response = requests.get(url)
data = response.json()
# Check the status
if data['status'] == 'OK':
# Extract the coordinates
location = data['results'][0]['geometry']['location']
latitude = location['lat']
longitude = location['lng']
print(f"Latitude: {latitude}")
print(f"Longitude: {longitude}")
else:
print(f"Error: {data['status']}")
Result:
Latitude: 48.8566
Longitude: 2.3522
Process Multiple Place IDs
To scrape 1,000 Place IDs, create a loop:
import requests
import json
import csv
import time
API_KEY = "AIzaSyDxxxxxxxxxxxxxxxxxxxxxxxxxxx"
# List of Place IDs
place_ids = [
"ChIJrTLr5LoC5OkRVLEMKwFRK7w",
"ChIJN1blFLsC5OkRZfZNIXrPIQQ",
# ... add more Place IDs
]
# Output file
with open('coordinates.csv', 'w', newline='') as csvfile:
writer = csv.writer(csvfile)
writer.writerow(['Place ID', 'Latitude', 'Longitude'])
for place_id in place_ids:
url = f"https://maps.googleapis.com/maps/api/geocode/json?place_id={place_id}&key={API_KEY}"
response = requests.get(url)
data = response.json()
if data['status'] == 'OK':
location = data['results'][0]['geometry']['location']
latitude = location['lat']
longitude = location['lng']
writer.writerow([place_id, latitude, longitude])
print(f"✓ {place_id}: {latitude}, {longitude}")
else:
print(f"✗ {place_id}: {data['status']}")
# Wait 0.1 seconds between requests (respect limits)
time.sleep(0.1)
print("Extraction completed. File: coordinates.csv")
Limits of the Geocoding API
Cost: €0.005 per request. For 10,000 listings = €50. It's reasonable, but it adds up.
Request limit: 50 requests per second in free tier. For 100,000 listings, expect 30+ minutes.
Major issue: You need the Place IDs beforehand. Obtaining them at scale is another scraping task. Vicious circle.
Method 3: Data Enrichment (Optimal Method)
The Concept: From Email/Phone to Coordinates
Instead of scraping coordinates directly from Google Maps, you can start from data you already have:
- Phone number
- Website/domain
- Company name + address
And enrich them with GPS coordinates by matching them with a pre-indexed Google Maps database.
Advantage: You don’t need to code. No API to set up. No risk of IP blocking.
Why This is the Best Approach
Compared to the two previous methods:
| Aspect | Regex + Octoparse | Geocoding API | Enrichment |
|---|---|---|---|
| Accuracy | 70% | 99% | 99% |
| Setup time | 30 min | 1-2 hours | 5 min |
| Cost | Free | €50-500/month | €44-250/month |
| Scalability | Up to 100 | Up to 100K | Up to 100K |
| Risk of blocking | High | None | None |
Practical Case: Enrich an Email with Coordinates
Imagine you have a list of 5,000 emails from Parisian restaurants. You want to:
- Find their exact address
- Retrieve their latitude/longitude
- Add their Google rating
Step 1: Prepare the Data
Create a CSV file with the emails:
email
[email protected]
[email protected]
...
Step 2: Use IBLead
Upload your data to IBLead. The tool will:
1. Match each email with a Google Maps listing
2. Extract GPS coordinates
3. Retrieve the full address, phone number, Google rating, reviews
4. Export everything to CSV
Result:
email,name,latitude,longitude,address,phone,google_rating
[email protected],Le Gavroche,48.8566,2.3522,"10 Rue de Rivoli, 75001 Paris",+33 1 42 60 97 04,4.7
[email protected],L'Astrance,48.8513,2.3847,"4 Rue Beethoven, 75016 Paris",+33 1 40 50 84 40,4.6
You have your coordinates in 2 minutes, without coding.
How It Works Technically
IBLead uses domain matching:
- You provide an email:
[email protected] - IBLead extracts the domain:
restaurant.fr - IBLead searches its database: "Which Google Maps listings have this domain as a website?"
- IBLead returns the listing (or listings if multiple results)
- IBLead extracts the coordinates and other data
This matching also works with:
- Phone number: you have the phone, IBLead finds the listing
- Full website: you have the URL, IBLead finds the listing
- Name + address: you have both pieces of information, IBLead cross-references them
Concrete Advantages
1. No Request Limits
With the Geocoding API, you are limited to 50 req/sec. With IBLead, you can export 100,000 listings in a single request.
2. Enriched Data
The Geocoding API only gives you lat/long. IBLead gives you:
- GPS coordinates ✓
- Full address ✓
- Phone ✓
- Enriched email ✓
- Google reviews (full text) ✓
- Technologies used (WordPress, Shopify, etc.) ✓
- Google rating and number of reviews ✓
3. Predictable Cost
€44/month for 10,000 listings. No surprises. No overages.
4. Zero Risk of Blocking
You are not scraping Google Maps. You are accessing a third-party database (IBLead) that has already scraped legally.
Technology Detection and Exclusive Data
Beyond Coordinates: The 160+ Technologies
IBLead also scrapes the technologies used by each business:
- CMS: WordPress, Wix, Shopify, Squarespace
- Analytics: Google Analytics, Matomo, Mixpanel
- Email Marketing: Mailchimp, Klaviyo, Brevo
- CRM: HubSpot, Salesforce, Pipedrive
- Payment: Stripe, PayPal, Square
- Chat: Intercom, Drift, Zendesk
Use cases:
- Web agency looking for clients with outdated WordPress sites
- SaaS selling a CRM solution, targeting HubSpot users (to convert them)
- SEO agency looking for sites without Google Analytics
Exclusive Google Reviews Scraping
IBLead extracts complete Google reviews:
- Review text
- Rating (1-5 stars)
- Publication date
- Author's name
Use cases:
- Reputation agencies: identify poorly rated businesses (< 3 stars) to prospect
- Market analysts: study customer satisfaction by sector
- Personalized prospecting: mention a specific review in your outreach
Ready to get started?
Access every Google Maps business, enriched with emails and legal data.
Try IBLead freeRelated articles
10 Proven Tips to Get Customers to Leave More Google Reviews on Maps
Learn 10 actionable strategies to increase Google Maps reviews. Timing, incentives, QR codes, and response tactics that actually work.
7 Cold Email Mistakes to Avoid: Examples & Templates
Avoid these 7 cold email mistakes to avoid examples that kill response rates. Real examples, AIDA templates, and proven fixes for better outreach.
ABM Google Maps Data: The Complete Strategic Guide
Learn how abc account based marketing google maps data drives 208% more revenue. Build precise target lists with 50M+ pre-indexed businesses.