1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "reviews": [
10 {
11 "userId": "R1",
12 "date": "2026-03-02",
13 "ratingScore": 2,
14 "reviewDescription": "The left earbud stopped charging after about four months. Case shows it at 100% but it is dead.",
15 },
16 {
17 "userId": "R2",
18 "date": "2026-03-19",
19 "ratingScore": 1,
20 "reviewDescription": "Left bud stopped charging completely around month five. Right one is fine.",
21 },
22 {
23 "userId": "R3",
24 "date": "2026-04-07",
25 "ratingScore": 2,
26 "reviewDescription": "Battery died on the left earbud after four months of light use. Very disappointing.",
27 },
28 {
29 "userId": "R4",
30 "date": "2026-02-11",
31 "ratingScore": 1,
32 "reviewDescription": "Case hinge snapped in my pocket within a few weeks. The plastic is far too thin.",
33 },
34 {
35 "userId": "R5",
36 "date": "2026-05-02",
37 "ratingScore": 2,
38 "reviewDescription": "The hinge on the charging case broke after about three weeks of normal use.",
39 },
40 {
41 "userId": "R6",
42 "date": "2026-05-14",
43 "ratingScore": 1,
44 "reviewDescription": "Hinge cracked and now the case will not stay shut at all.",
45 },
46 {
47 "userId": "R7",
48 "date": "2026-01-30",
49 "ratingScore": 3,
50 "reviewDescription": "Did not like the colour, it is more grey than silver in person.",
51 },
52 ],
53 "productName": "Wireless Earbuds (example)",
54 "linkUrl": "https://www.amazon.com/dp/B08EXAMPLE",
55}
56
57
58run = client.actor("pradio/amazon-defect-ledger").call(run_input=run_input)
59
60
61print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
62for item in client.dataset(run.default_dataset_id).iterate_items():
63 print(item)
64
65