1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "currentRecords": [
10 {
11 "sku": "A-100",
12 "title": "Acme Mug",
13 "price": 15.99,
14 "stock": 0,
15 "tags": [
16 "new",
17 "sale",
18 ],
19 "scrapedAt": "2026-10-24T08:00:00Z",
20 },
21 {
22 "sku": "B-200",
23 "title": "Blue Pen",
24 "price": 2.5,
25 "stock": 40,
26 "tags": [],
27 "scrapedAt": "2026-10-24T08:00:00Z",
28 },
29 {
30 "sku": "D-400",
31 "title": "Desk Lamp",
32 "price": 30,
33 "stock": 7,
34 "tags": ["eco"],
35 "scrapedAt": "2026-10-24T08:00:00Z",
36 },
37 ],
38 "baselineRecords": [
39 {
40 "sku": "A-100",
41 "title": "Acme Mug",
42 "price": 19.99,
43 "stock": 12,
44 "tags": ["new"],
45 "scrapedAt": "2026-10-23T08:00:00Z",
46 },
47 {
48 "sku": "B-200",
49 "title": "Blue Pen",
50 "price": 2.5,
51 "stock": 40,
52 "tags": [],
53 "scrapedAt": "2026-10-23T08:00:00Z",
54 },
55 {
56 "sku": "C-300",
57 "title": "Cable",
58 "price": 5,
59 "stock": 9,
60 "tags": [],
61 "scrapedAt": "2026-10-23T08:00:00Z",
62 },
63 ],
64}
65
66
67run = client.actor("hiredhandai/dataset-diff-explainer").call(run_input=run_input)
68
69
70print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
71for item in client.dataset(run.default_dataset_id).iterate_items():
72 print(item)
73
74