1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "beforeDate": "2026-09-01",
10 "afterDate": "2026-10-01",
11 "beforeItems": [
12 {
13 "asin": "B000000001",
14 "title": "Sample kettle",
15 "price": {
16 "value": 39.99,
17 "currency": "USD",
18 },
19 "listPrice": {
20 "value": 49.99,
21 "currency": "USD",
22 },
23 "availability": "In Stock",
24 "seller": "Example Seller A",
25 },
26 {
27 "asin": "B000000002",
28 "title": "Sample lamp",
29 "price": "EUR 24.50",
30 "availability": "In Stock",
31 "seller": "Example Seller B",
32 },
33 {
34 "asin": "B000000003",
35 "title": "Sample bottle",
36 "price": 12,
37 "currency": "USD",
38 "inStock": True,
39 "seller": "Example Seller A",
40 },
41 ],
42 "afterItems": [
43 {
44 "asin": "B000000001",
45 "title": "Sample kettle",
46 "price": {
47 "value": 34.99,
48 "currency": "USD",
49 },
50 "listPrice": {
51 "value": 49.99,
52 "currency": "USD",
53 },
54 "availability": "In Stock",
55 "seller": "Example Seller C",
56 },
57 {
58 "asin": "B000000002",
59 "title": "Sample lamp",
60 "price": "USD 26.00",
61 "availability": "Currently unavailable",
62 "seller": "Example Seller B",
63 },
64 {
65 "asin": "B000000004",
66 "title": "Sample mug",
67 "price": 8.5,
68 "currency": "USD",
69 "inStock": True,
70 "seller": "Example Seller D",
71 },
72 ],
73}
74
75
76run = client.actor("practical_ai_lab_jp/pal-amazon-offer-price-history-diff").call(run_input=run_input)
77
78
79print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
80for item in client.dataset(run.default_dataset_id).iterate_items():
81 print(item)
82
83