1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = { "records": [
9 {
10 "placeId": "demo-001",
11 "title": "Example Riverside Cafe",
12 "categoryName": "Cafe",
13 "address": "101 Sample Avenue",
14 "city": "Demo City",
15 "countryCode": "US",
16 "website": "https://riverside.example",
17 "location": {
18 "lat": 40.7128,
19 "lng": -74.006,
20 },
21 "totalScore": 4.4,
22 "reviewsCount": 88,
23 },
24 {
25 "placeId": "demo-001",
26 "title": "Example Riverside Cafe (duplicate)",
27 "categoryName": "Cafe",
28 "address": "101 Sample Avenue",
29 "city": "Demo City",
30 "countryCode": "US",
31 "location": {
32 "lat": 40.7128,
33 "lng": -74.006,
34 },
35 "totalScore": 4.4,
36 "reviewsCount": 88,
37 },
38 {
39 "placeId": "demo-002",
40 "title": "Example Northside Bakery",
41 "categoryName": "Bakery",
42 "address": "20 Sample Street",
43 "city": "Demo City",
44 "countryCode": "US",
45 "website": "",
46 "location": {
47 "lat": 40.713,
48 "lng": -74.0065,
49 },
50 "totalScore": 4.1,
51 "reviewsCount": 31,
52 },
53 {
54 "placeId": "demo-003",
55 "title": "Example Garden Florist",
56 "categoryName": "Florist",
57 "address": "8 Example Road",
58 "city": "Demo City",
59 "countryCode": "US",
60 "website": "https://garden.example",
61 "location": {
62 "lat": 40.714,
63 "lng": -74.0045,
64 },
65 "totalScore": 4.7,
66 "reviewsCount": 52,
67 },
68 ] }
69
70
71run = client.actor("practical_ai_lab_jp/pal-maps-business-dataset-quality").call(run_input=run_input)
72
73
74print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
75for item in client.dataset(run.default_dataset_id).iterate_items():
76 print(item)
77
78