@@ -23,8 +23,19 @@ pip install google-services-api
2323from outscraper import ApiClient
2424
2525api_client = ApiClient(api_key = ' SECRET_API_KEY' )
26- result = api_client.google_maps_search(
27- ' restaurants brooklyn usa' , limit = 20 , language = ' en' )
26+
27+ # Search for businesses in specific locations:
28+ result = api_client.google_maps_search(' restaurants brooklyn usa' , limit = 20 , language = ' en' )
29+
30+ # Get data of the specific place by id
31+ result = api_client.google_maps_search(' ChIJrc9T9fpYwokRdvjYRHT8nI4' , language = ' en' )
32+
33+ # Search with many queries (batching)
34+ result = api_client.google_maps_search([
35+ ' restaurants brooklyn usa' ,
36+ ' bars brooklyn usa' ,
37+ ], language = ' en' )
38+
2839```
2940
3041## Scrape Google Maps Reviews
@@ -33,8 +44,19 @@ result = api_client.google_maps_search(
3344from outscraper import ApiClient
3445
3546api_client = ApiClient(api_key = ' SECRET_API_KEY' )
47+
48+ # Get reviews of the specific place by id
49+ result = api_client.google_maps_reviews(' ChIJrc9T9fpYwokRdvjYRHT8nI4' , reviewsLimit = 20 , language = ' en' )
50+
51+ # Get reviews for places found by search query
52+ result = api_client.google_maps_reviews(' Memphis Seoul brooklyn usa' , reviewsLimit = 20 , limit = 500 , language = ' en' )
53+
54+ # Get only new reviews during last 24 hours
55+ from datetime import datetime, timedelta
56+ yesterday_timestamp = int ((datetime.now() - timedelta(1 )).timestamp())
57+
3658result = api_client.google_maps_reviews(
37- ' Memphis Seoul brooklyn usa ' , reviewsLimit = 20 , language = ' en' )
59+ ' ChIJrc9T9fpYwokRdvjYRHT8nI4 ' , sort = ' newest ' , cutoff = yesterday_timestamp, reviewsLimit = 100 , language = ' en' )
3860```
3961
4062## Scrape Google Maps Photos
0 commit comments