Skip to main content

Google Maps Reviews API SDK

Project description

Python SDK that allows fetching Google Maps reviews from any place. Fetch reviews from any business on Google Maps without limitations.

API Docs

Generate API Token

Installation

Python 3+

pip install google-maps-reviews

Link to the python package page

Initialization

from google_maps_reviews import ReviewsClient

client = ReviewsClient(api_key='SECRET_API_KEY')

Fetch Google Maps Reviews

# Get reviews from the place by name and lcoation
results = client.get_reviews('Trump Tower, NY, USA', reviewsLimit=10, language='en')

# Get reviews from many places found by search query
results = client.get_reviews('Memphis Seoul brooklyn usa', reviewsLimit=10, limit=10, language='en')

# Get reviews from the place by google id
results = client.get_reviews('0x89c258faf553cfad:0x8e9cfc7444d8f876', reviewsLimit=20, language='en')

# Get reviews from the place by URL
results = client.get_reviews('https://www.google.com/maps/place/Trump+Tower/@40.7608106,-73.983412,15z/data=!3m1!5s0x89c259a1e735d943:0xb63f84c661f84258!4m9!1m2!2m1!1sTrump+Tower!3m5!1s0x89c258faf553cfad:0x8e9cfc7444d8f876!8m2!3d40.7624284!4d-73.973794!15sCgtUcnVtcCBUb3dlcloNIgt0cnVtcCB0b3dlcpIBCGxhbmRtYXJr', reviewsLimit=20, language='en')

# Get only new reviews during last 24 hours
from datetime import datetime, timedelta
yesterday_timestamp = int((datetime.now() - timedelta(1)).timestamp())

results = client.get_reviews(
    '0x89c258faf553cfad:0x8e9cfc7444d8f876', sort='newest', cutoff=yesterday_timestamp, reviewsLimit=100, language='en')

Results Demo

{
  "name": "Memphis Seoul",
  "address": "569 Lincoln Pl, Brooklyn, NY 11238, \\u0421\\u043f\\u043e\\u043b\\u0443\\u0447\\u0435\\u043d\\u0456 \\u0428\\u0442\\u0430\\u0442\\u0438",
  "address_street": "569 Lincoln Pl",
  "address_borough": "\\u041a\\u0440\\u0430\\u0443\\u043d-\\u0413\\u0430\\u0439\\u0442\\u0441",
  "address_city": "Brooklyn",
  "time_zone": "America/New_York",
  "type": "\\u0420\\u0435\\u0441\\u0442\\u043e\\u0440\\u0430\\u043d",
  "types": "\\u0420\\u0435\\u0441\\u0442\\u043e\\u0440\\u0430\\u043d",
  "postal_code": "11238",
  "latitude": 40.6717258,
  "longitude": -73.9579098,
  "phone": "+1 347-349-2561",
  "rating": 3.9,
  "reviews": 32,
  "site": "http://www.getmemphisseoul.com/",
  "photos_count": 77,
  "google_id": "0x89c25bb5950fc305:0x330a88bf1482581d",
  "reviews_link": "https://www.google.com/search?q=Memphis+Seoul,+569+Lincoln+Pl,+Brooklyn,+NY+11238,+%D0%A1%D0%BF%D0%BE%D0%BB%D1%83%D1%87%D0%B5%D0%BD%D1%96+%D0%A8%D1%82%D0%B0%D1%82%D0%B8&ludocid=3677902399965648925#lrd=0x89c25bb5950fc305:0x330a88bf1482581d,1",
  "reviews_id": "3677902399965648925",
  "photo": "https://lh5.googleusercontent.com/p/X_6-QqMphC_ctqs3bHSqFg",
  "working_hours": "\\u0432\\u0456\\u0432\\u0442\\u043e\\u0440\\u043e\\u043a: 16:00\\u201322:00 | \\u0441\\u0435\\u0440\\u0435\\u0434\\u0430: 16:00\\u201322:00 | \\u0447\\u0435\\u0442\\u0432\\u0435\\u0440: 16:00\\u201322:00 | \\u043f\\u02bc\\u044f\\u0442\\u043d\\u0438\\u0446\\u044f: 16:00\\u201322:00 | \\u0441\\u0443\\u0431\\u043e\\u0442\\u0430: 16:00\\u201322:00 | \\u043d\\u0435\\u0434\\u0456\\u043b\\u044f: 16:00\\u201322:00 | \\u043f\\u043e\\u043d\\u0435\\u0434\\u0456\\u043b\\u043e\\u043a: 16:00\\u201322:00",
  "reviews_per_score": "1: 6, 2: 0, 3: 4, 4: 3, 5: 19",
  "verified": true,
  "reserving_table_link": null,
  "booking_appointment_link": null,
  "owner_id": "100347822687163365487",
  "owner_link": "https://www.google.com/maps/contrib/100347822687163365487",
  "reviews_data": [
    {
      "google_id": "0x89c25bb5950fc305:0x330a88bf1482581d",
      "autor_link": "https://www.google.com/maps/contrib/112314095435657473333?hl=en-US",
      "autor_name": "Eliott Levy",
      "autor_id": "112314095435657473333",
      "review_text": "Very good local comfort fusion food ! \\nKimchi coleslaw !! Such an amazing idea !",
      "review_link": "https://www.google.com/maps/reviews/data=!4m5!14m4!1m3!1m2!1s112314095435657473333!2s0x0:0x330a88bf1482581d?hl=en-US",
      "review_rating": 5,
      "review_timestamp": 1560692128,
      "review_datetime_utc": "06/16/2019 13:35:28",
      "review_likes": null
    },
    {
      "google_id": "0x89c25bb5950fc305:0x330a88bf1482581d",
      "autor_link": "https://www.google.com/maps/contrib/106144075337788507031?hl=en-US",
      "autor_name": "fenwar1",
      "autor_id": "106144075337788507031",
      "review_text": "Great wings with several kinds of hot sauce. The mac and cheese ramen is excellent.\\nUPDATE:\\nReturned later to try the meatloaf slider, a thick meaty slice  topped with slaw and a fantastic sauce- delicious. \\nConsider me a regular.\\ud83d\\udc4d",
      "review_link": "https://www.google.com/maps/reviews/data=!4m5!14m4!1m3!1m2!1s106144075337788507031!2s0x0:0x330a88bf1482581d?hl=en-US",
      "review_rating": 5,
      "review_timestamp": 1571100055,
      "review_datetime_utc": "10/15/2019 00:40:55",
      "review_likes": null
    },
    ...
  ]
}

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-reviews-0.0.3.tar.gz (6.5 kB view details)

Uploaded Source

Built Distribution

google_maps_reviews-0.0.3-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file google-maps-reviews-0.0.3.tar.gz.

File metadata

  • Download URL: google-maps-reviews-0.0.3.tar.gz
  • Upload date:
  • Size: 6.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.10

File hashes

Hashes for google-maps-reviews-0.0.3.tar.gz
Algorithm Hash digest
SHA256 c5dcab429b811c5548d418b45c1d615821139c886b1a09f16e9d7948c523c64d
MD5 5bdeaf2fe31604f04104a8f6c6e35e0e
BLAKE2b-256 3195bed15d2abde0847869274e3677b187a9ad1bfe871a0b6101c18bfb1c822b

See more details on using hashes here.

File details

Details for the file google_maps_reviews-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: google_maps_reviews-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 7.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.10

File hashes

Hashes for google_maps_reviews-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 f321c5d2f5e22826e8fcf9314b2d08025bb73b3f01377b5d03fdce02f8644165
MD5 c8274bfaf65427d9e8a0655fb8283acb
BLAKE2b-256 d29ce2fa5ea0374e6aec2cbd2673ebebf00a042935fde7d291379e6c40378a7b

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