1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = { "locations": [
9 {
10 "title": "Harbor Bean Coffee - Central Station",
11 "address": "120 Market Street, Springfield, IL 62701",
12 "phone": "(217) 555-0101",
13 "website": "https://www.harborbean.example/",
14 "openingHours": "Mon-Fri: 7 AM - 7 PM; Sat-Sun: 8 AM - 5 PM",
15 "location": {
16 "lat": 39.8001,
17 "lng": -89.6435,
18 },
19 },
20 {
21 "title": "Harbor Bean Coffee - Riverside",
22 "address": "48 River Rd, Springfield, IL 62702",
23 "phone": "217-555-0102",
24 "website": "https://harborbean.example/locations/riverside",
25 "openingHours": "Mon-Fri: 7 AM - 7 PM; Sat-Sun: 8 AM - 5 PM",
26 "location": {
27 "lat": 39.825,
28 "lng": -89.62,
29 },
30 },
31 {
32 "title": "Harbour Bean Cafe",
33 "address": "300 Oak Avenue, Springfield, IL 62703",
34 "phone": "(217) 555-0103",
35 "website": "http://harborbean.example?utm_source=listing",
36 "openingHours": "Mon-Fri: 07:00-19:00; Sat-Sun: 08:00-17:00",
37 "location": {
38 "lat": 39.77,
39 "lng": -89.66,
40 },
41 },
42 {
43 "title": "HARBOR BEAN COFFEE",
44 "address": "120 Market St, Springfield, IL 62701",
45 "phone": "(217) 555-0101",
46 "website": "https://harborbean.example/",
47 "openingHours": "Mon-Fri: 7 AM - 7 PM; Sat-Sun: 8 AM - 5 PM",
48 "location": {
49 "lat": 39.80012,
50 "lng": -89.64352,
51 },
52 },
53 {
54 "title": "Harbor Bean Coffee - Lakeside",
55 "address": "9 Lake Drive, Springfield, IL",
56 "phone": "217.555.0104",
57 "website": "https://harborbean-shop.example/lakeside",
58 },
59 {
60 "title": "Harbor Bean Coffee - Airport",
61 "address": "1 Terminal Road, Springfield, IL 62707",
62 "phone": "(217) 555-0105",
63 "website": "https://harborbean.example/locations/airport",
64 "openingHours": "Mon-Fri: 5 AM - 9 PM; Sat-Sun: 6 AM - 9 PM",
65 "location": {
66 "lat": 39.844,
67 "lng": -89.677,
68 },
69 },
70 ] }
71
72
73run = client.actor("practical_ai_lab_jp/pal-maps-chain-location-consistency").call(run_input=run_input)
74
75
76print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
77for item in client.dataset(run.default_dataset_id).iterate_items():
78 print(item)
79
80