1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "searchStringsArray": ["coffee shop"],
10 "locationQuery": "Jersey City, New Jersey",
11 "maxCrawledPlacesPerSearch": 100,
12 "customGeolocation": {
13 "type": "Polygon",
14 "coordinates": [[
15 [
16 -74.05,
17 40.7,
18 ],
19 [
20 -73.95,
21 40.7,
22 ],
23 [
24 -73.95,
25 40.78,
26 ],
27 [
28 -74.05,
29 40.78,
30 ],
31 [
32 -74.05,
33 40.7,
34 ],
35 ]],
36 },
37}
38
39
40run = client.actor("calm_builder/google-maps-scraper").call(run_input=run_input)
41
42
43print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
44for item in client.dataset(run.default_dataset_id).iterate_items():
45 print(item)
46
47