Skip to main content

A Google Maps web scraper that gets place data based on a search

Project description

Upload Python Package

The-Gomaps-Python-Package

Gomaps! A Google Maps web scraper for querying places on Google Maps and scraping the metadata of that search (No API key needed). This package also does geocoding, reverse geocoding and address validation! It's essentially a lite version of the Google Maps Places API. Results of a query include the following:

  • Place Name
  • Place Google Maps URL
  • Place Address
  • Place Coordinates (lattitude/longitude)
  • Place Website
  • Place Phone Number
  • Place Star Rating
  • Place Open Hours
  • Place Popular Times

That's right! This can also scrape Google Maps Popular Times data! For more information about Google's popular times data, refer to this support post: https://support.google.com/business/answer/6263531?hl=en.

Documentation:

https://gomaps.readthedocs.io/en/latest/

Quickstart:

To start, import the functions from the *gomaps* package.
from gomaps import maps_search

results = maps_search("Tops Diner") # Returns a list of GoogleMaps objects
# GoogleMapsResults([<gomaps.GoogleMaps object; Place-Name: Tops Diner>])

results[0].get_values() # Populates the object's attributes & returns a dictionary
'''
{
  'title': 'Tops Diner',
  'url': 'https://www.google.com/maps/place/Tops+Diner/@40.7506065,-74.1639023,17z/data=!4m2!3m1!1s0x89c2547b4ec3235b:0x7342f11f69197f92!8m2!3d40.7506065!4d-74.1639023',
  'address': '500 Passaic Ave, East Newark, NJ 07029',
  'coords': ('40.7506065', '-74.1639023'),
  'website': 'https://www.thetopsdiner.com/',
  'phone_number': '(973) 481-0490',
  'rating': 4.6,
  'open_hours': {'Currently': 'Closed - Opens 8AM',
                 'Hours': {'Friday': '8AM–11PM', 'Saturday': '8AM–11PM', 'Sunday': '8AM–11PM',
                           'Monday': '8AM–11PM', 'Tuesday': '8AM–11PM', 'Wednesday': '8AM–11PM', 'Thursday': '8AM–11PM'}
                }
  'popular_times': {
                    'Sunday': ['0% busy at 6 AM', '0% busy at 7 AM', '19% busy at 8 AM', '35% busy at 9 AM', '48% busy at 10 AM',
                    '52% busy at 11 AM', '49% busy at 12 PM', '44% busy at 1 PM', '45% busy at 2 PM', '49% busy at 3 PM',
                    '52% busy at 4 PM', '52% busy at 5 PM', '57% busy at 6 PM', '70% busy at 7 PM', '78% busy at 8 PM',
                    '66% busy at 9 PM', '39% busy at 10 PM', '0% busy at 11 PM'], 
                    'Monday':  ...
                    }
}
'''

Copyright

Copyright (c) 2024 The Python Packaging Authority. Released under the MIT License.

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

gomaps-0.3.6.tar.gz (10.5 kB view details)

Uploaded Source

Built Distribution

gomaps-0.3.6-py3-none-any.whl (10.6 kB view details)

Uploaded Python 3

File details

Details for the file gomaps-0.3.6.tar.gz.

File metadata

  • Download URL: gomaps-0.3.6.tar.gz
  • Upload date:
  • Size: 10.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for gomaps-0.3.6.tar.gz
Algorithm Hash digest
SHA256 24f33468466ead9b3477285600280b837dd8e16e627bd9bb311abe82c7adad9a
MD5 dd3e72f2ba05b6f0c5284dce8e93b459
BLAKE2b-256 cfa7368012b0c2db8cc1ed70a80895756216088be3c598ec0dd7c0ab9725717a

See more details on using hashes here.

File details

Details for the file gomaps-0.3.6-py3-none-any.whl.

File metadata

  • Download URL: gomaps-0.3.6-py3-none-any.whl
  • Upload date:
  • Size: 10.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for gomaps-0.3.6-py3-none-any.whl
Algorithm Hash digest
SHA256 4331c39df6c0c5fd746992ac338dc6d4a34da6f833e99ff6bbdf107083feb491
MD5 111b20b37f8e64a121d6c5c7b5ded6ba
BLAKE2b-256 fc3539eebd45f91e8ab59769301c3f85e25405febcc3f77cc803832bc9031145

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