1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "searchStringsArray": ["restaurant"],
10 "locationQuery": "New York, USA",
11 "searchMode": "keyword",
12 "query": "Restaurants in Manhattan",
13 "maxResults": "50",
14 "maxCrawledPlacesPerSearch": 50,
15 "language": "en",
16 "country": "US",
17 "skipClosedPlaces": False,
18 "area": "Manhattan",
19 "radius": 1000,
20 "latitude": 40.7547,
21 "longitude": -73.987,
22 "north": 40.882,
23 "south": 40.68,
24 "east": -73.91,
25 "west": -74.047,
26 "queries": [
27 "Restaurants in Manhattan",
28 "Coffee in Manhattan",
29 ],
30 "scrapePlaceDetailPage": False,
31 "scrapePhotos": False,
32 "maxPhotosPerPlace": 0,
33 "maxImages": 0,
34 "scrapeReviews": False,
35 "maxReviewsPerPlace": 0,
36 "maxReviews": 0,
37 "reviewsSort": "newest",
38 "reviewsLanguage": "",
39 "scrapePosts": False,
40 "maxPosts": 20,
41 "maxConcurrency": 5,
42 "maxRequestRetries": 3,
43}
44
45
46run = client.actor("scrapingdino/google-maps-scraper").call(run_input=run_input)
47
48
49print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
50for item in client.dataset(run.default_dataset_id).iterate_items():
51 print(item)
52
53