1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = { "items": [
9 {
10 "title": "Sunrise Hair Studio",
11 "categoryName": "Hair salon",
12 "address": "12 Park Street",
13 "city": "Austin",
14 "countryCode": "US",
15 "website": None,
16 "phone": "(512) 555-0142",
17 "phoneUnformatted": "+15125550142",
18 "totalScore": 4.6,
19 "reviewsCount": 640,
20 "claimThisBusiness": False,
21 "permanentlyClosed": False,
22 "temporarilyClosed": False,
23 "placeId": "example1",
24 "url": "https://maps.example/1",
25 },
26 {
27 "title": "Blue Door Dental",
28 "categoryName": "Dentist",
29 "address": "40 Elm Avenue",
30 "city": "Austin",
31 "countryCode": "US",
32 "website": "https://www.facebook.com/bluedoordental",
33 "phone": "(512) 555-0177",
34 "phoneUnformatted": "+15125550177",
35 "totalScore": 4.8,
36 "reviewsCount": 64,
37 "claimThisBusiness": False,
38 "permanentlyClosed": False,
39 "temporarilyClosed": False,
40 "placeId": "example2",
41 "url": "https://maps.example/2",
42 },
43 {
44 "title": "Green Leaf Cafe",
45 "categoryName": "Cafe",
46 "address": "9 Oak Road",
47 "city": "Austin",
48 "countryCode": "US",
49 "website": "https://greenleafcafe.com",
50 "phone": "(512) 555-0190",
51 "phoneUnformatted": "+15125550190",
52 "totalScore": 4.4,
53 "reviewsCount": 300,
54 "claimThisBusiness": False,
55 "permanentlyClosed": False,
56 "temporarilyClosed": False,
57 "placeId": "example3",
58 "url": "https://maps.example/3",
59 },
60 {
61 "title": "Old Mill Pizza",
62 "categoryName": "Pizza restaurant",
63 "address": "5 Mill Lane",
64 "city": "Austin",
65 "countryCode": "US",
66 "website": None,
67 "phone": "(512) 555-0111",
68 "phoneUnformatted": "+15125550111",
69 "totalScore": 4.1,
70 "reviewsCount": 80,
71 "claimThisBusiness": False,
72 "permanentlyClosed": True,
73 "temporarilyClosed": False,
74 "placeId": "example4",
75 "url": "https://maps.example/4",
76 },
77 ] }
78
79
80run = client.actor("asmalek/google-maps-leads-cleaner").call(run_input=run_input)
81
82
83print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
84for item in client.dataset(run.default_dataset_id).iterate_items():
85 print(item)
86
87