Skip to main content

Google Maps Scraper for collecting data from various Google Maps listings, including business profiles.

Project description

Google Maps Scraper

Oxylabs promo code

Google Maps Scraper enables effortless public data extraction with geographic references from Google Maps and Google Places. This short guide will show you the process of scraping Google Maps using Oxylabs' Scraper API.

How it works

You can retrieve Google Maps data by providing the URL to our service. Our API will return the results in JSON format.

Python code example

The below code examples demonstrate how you can get Google Maps results. First, you need to send the instructions to our service using the Push-Pull method:

import requests
from pprint import pprint

# Structure payload.
payload = {
    'source': 'google',
    'url': 'https://www.google.com/maps/search/restaurants/@40.7660158,-73.9833944,14z/data=!4m5!2m4!5m2!1e0!4e9!6e5?entry=ttu',
    'geo_location': 'New York,New York,United States',
    'render': 'html'
}

# Get response.
response = requests.request(
    'POST',
    'https://data.oxylabs.io/v1/queries',
    auth=('USERNAME', 'PASSWORD'),
    json=payload
)

# This will return a response with job status and results url.
pprint(response.json())

Once the job is done, you can retrieve the results by making another request and including the job ID from the previous response, for instance:

import requests

# Get response.
response = requests.request(
    'GET',
    'http://data.oxylabs.io/v1/queries/{job_id}/results',
    auth=('USERNAME', 'PASSWORD')
)

# This will return the JSON response with results.
print(response.json())

Output Example

The above code snippet will retrieve the results in JSON format:

{
    "results": [
        {
            "content": "<!doctype html>
<html lang="en">
<head>...</script></body>
</html>
",
            "created_at": "2023-07-25 10:01:01",
            "job_id": "7089545068712824833",
            "page": 1,
            "status_code": 200,
            "updated_at": "2023-07-25 10:01:20",
            "url": "https://www.google.com/maps/search/restaurants/@40.7660158,-73.9833944,14z/data=!4m5!2m4!5m2!1e0!4e9!6e5?entry=ttu"
        }
    ]
}

From local landmarks to various businesses, with Oxylabs’ Google Maps Scraper you’ll easily access the public data you need. If you have any questions or need assistance, don’t hesitate to contact our 24/7 support team via live chat or email.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

google-maps-scraper-api-0.1.0.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

google_maps_scraper_api-0.1.0-py3-none-any.whl (2.8 kB view details)

Uploaded Python 3

File details

Details for the file google-maps-scraper-api-0.1.0.tar.gz.

File metadata

File hashes

Hashes for google-maps-scraper-api-0.1.0.tar.gz
Algorithm Hash digest
SHA256 fba7d4919b00db9ae86932d0b8438b2d1a5caf7022ee47a8eea056a729383040
MD5 46415650c8980a4fb2d40e2a0602ff02
BLAKE2b-256 594bbdf2bada78f826235fb90026235892f8377786afcb49419d635cc2302823

See more details on using hashes here.

File details

Details for the file google_maps_scraper_api-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for google_maps_scraper_api-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 95a5250757130c9db1942d99a20f53094f724879b4d5c60f92904703e88e024c
MD5 1670565be28b398b23963827dba0d775
BLAKE2b-256 a48728c48a5e3014849c8edb5ba9376b7ecd283422c4f70a155e8afa2f584594

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page