1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = { "items": [
9 {
10 "title": "Demo Peachtree Plumbing",
11 "categoryName": "Plumber",
12 "phone": "(404) 555-0142",
13 "website": "https://example.com/peachtree-plumbing",
14 "address": "100 Demo St, Sandy Springs, GA 30328",
15 "city": "Sandy Springs",
16 "state": "Georgia",
17 "reviewsCount": 212,
18 "totalScore": 4.8,
19 "placeId": "demo-place-01",
20 "url": "https://www.google.com/maps/place/?q=place_id:demo-place-01",
21 },
22 {
23 "title": "Demo Peachtree Plumbing LLC",
24 "categoryName": "Plumber",
25 "phone": "+1 404-555-0142",
26 "website": "https://example.com/peachtree-plumbing",
27 "address": "100 Demo Street, Sandy Springs, GA 30328",
28 "city": "Sandy Springs",
29 "state": "Georgia",
30 "reviewsCount": 9,
31 "totalScore": 4.6,
32 "placeId": "demo-place-02",
33 "url": "https://www.google.com/maps/place/?q=place_id:demo-place-02",
34 },
35 {
36 "title": "Demo Riverside Drain & Sewer",
37 "categoryName": "Plumber",
38 "phone": "(770) 555-0188",
39 "website": "https://example.com/riverside-drain",
40 "address": "200 Sample Ave, Sandy Springs, GA 30350",
41 "city": "Sandy Springs",
42 "state": "Georgia",
43 "reviewsCount": 87,
44 "totalScore": 4.7,
45 "placeId": "demo-place-03",
46 "url": "https://www.google.com/maps/place/?q=place_id:demo-place-03",
47 },
48 {
49 "title": "Demo Old Town Plumbers",
50 "categoryName": "Plumber",
51 "phone": "(404) 555-0170",
52 "address": "300 Example Rd, Sandy Springs, GA 30328",
53 "city": "Sandy Springs",
54 "state": "Georgia",
55 "reviewsCount": 41,
56 "totalScore": 4.1,
57 "permanentlyClosed": True,
58 "placeId": "demo-place-04",
59 "url": "https://www.google.com/maps/place/?q=place_id:demo-place-04",
60 },
61 {
62 "title": "Demo Quick Lube Auto Repair",
63 "categoryName": "Auto repair shop",
64 "phone": "(404) 555-0123",
65 "website": "https://example.com/quick-lube",
66 "address": "400 Test Blvd, Sandy Springs, GA 30328",
67 "city": "Sandy Springs",
68 "state": "Georgia",
69 "reviewsCount": 150,
70 "totalScore": 4.4,
71 "placeId": "demo-place-05",
72 "url": "https://www.google.com/maps/place/?q=place_id:demo-place-05",
73 },
74 {
75 "title": "Halcy Plumbing Repair Sandy Springs",
76 "categoryName": "Plumber",
77 "phone": "(470) 555-0101",
78 "address": "Sandy Springs, GA",
79 "city": "Sandy Springs",
80 "state": "Georgia",
81 "reviewsCount": 1,
82 "totalScore": 5,
83 "placeId": "demo-place-06",
84 "url": "https://www.google.com/maps/place/?q=place_id:demo-place-06",
85 },
86 {
87 "title": "Gravix Plumbing Repair Sandy Springs",
88 "categoryName": "Plumber",
89 "phone": "(470) 555-0102",
90 "address": "Sandy Springs, GA",
91 "city": "Sandy Springs",
92 "state": "Georgia",
93 "reviewsCount": 0,
94 "placeId": "demo-place-07",
95 "url": "https://www.google.com/maps/place/?q=place_id:demo-place-07",
96 },
97 {
98 "title": "Metric Plumbing Repair Sandy Springs",
99 "categoryName": "Plumber",
100 "phone": "(470) 555-0103",
101 "address": "Sandy Springs, GA",
102 "city": "Sandy Springs",
103 "state": "Georgia",
104 "reviewsCount": 2,
105 "totalScore": 5,
106 "placeId": "demo-place-08",
107 "url": "https://www.google.com/maps/place/?q=place_id:demo-place-08",
108 },
109 ] }
110
111
112run = client.actor("callbacklocal/google-maps-lead-cleaner").call(run_input=run_input)
113
114
115print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
116for item in client.dataset(run.default_dataset_id).iterate_items():
117 print(item)
118
119