1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "search_query": "cafe",
10 "location": "Lower Manhattan, New York, USA",
11 "max_results": 5,
12 "language": "en",
13 "search_mode": "single",
14 "detailProfile": "core",
15 "detailTransport": "feed",
16 "geographicOptions": { "resultLimit": 10 },
17 "maxRunTimeSecs": 60,
18 "maxSearchCells": 1,
19 "maxSearchAttempts": 1,
20 "maxNavigationAttempts": 12,
21 "maxCandidateUrls": 10,
22 "maxConcurrentSearches": 1,
23 "maxConcurrentExtractions": 1,
24 "baseDelayMs": 500,
25 "enableCache": False,
26 "captureDetailEvidence": False,
27 "proxyConfiguration": { "useApifyProxy": False },
28}
29
30
31run = client.actor("computerdoit/google-maps-leads-scraper").call(run_input=run_input)
32
33
34print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
35for item in client.dataset(run.default_dataset_id).iterate_items():
36 print(item)
37
38