1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "mode": "place",
10 "placeUrl": "https://www.google.com/maps/place/Masjid+al-Haram/@21.423663,39.8227848,17z/data=!4m14!1m7!3m6!1s0x15c204b74d3fb493:0x55d1f94f8e094785!2sMasjid+al-Haram!8m2!3d21.423658!4d39.8253597!16zL20vMDI0aGJm!3m5!1s0x15c204b74d3fb493:0x55d1f94f8e094785!8m2!3d21.423658!4d39.8253597!16zL20vMDI0aGJm?entry=ttu&g_ep=EgoyMDI2MDIyNS4wIKXMDSoASAFQAw%3D%3D",
11 "contributorUrls": ["https://www.google.com/maps/contrib/102461194647441801965/reviews"],
12 "contributorUrl": "https://www.google.com/maps/contrib/102461194647441801965/reviews",
13 "maxReviews": 10,
14 "proxyConfiguration": {
15 "useApifyProxy": True,
16 "apifyProxyGroups": ["RESIDENTIAL"],
17 "apifyProxyCountry": "US",
18 },
19}
20
21
22run = client.actor("crawlerbros/google-maps-reviews-scraper").call(run_input=run_input)
23
24
25print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
26for item in client.dataset(run.default_dataset_id).iterate_items():
27 print(item)
28
29