1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "offers": [
12 {
13 "asin": "B000000001",
14 "seller": "Seller Alpha",
15 "price": 24.99,
16 "currency": "USD",
17 "collectedAt": "2026-11-02T09:30:00Z",
18 "marketplace": "amazon.com",
19 "condition": "new"
20 },
21 {
22 "asin": "B000000001",
23 "seller": "Seller Beta",
24 "price": "23.50",
25 "currency": "USD",
26 "collectedAt": "2026-10-27T08:00:00Z",
27 "marketplace": "amazon.com",
28 "condition": "new"
29 },
30 {
31 "asin": "B000000001",
32 "seller": "Seller Gamma",
33 "price": 22.1,
34 "currency": "EUR",
35 "collectedAt": "2026-11-02T10:15:00Z",
36 "marketplace": "amazon.com",
37 "condition": "new"
38 },
39 {
40 "asin": "B000000002",
41 "seller": "Seller Alpha",
42 "price": "$18.00",
43 "currency": "$",
44 "collectedAt": "2026-11-02T11:00:00",
45 "marketplace": "amazon.com",
46 "condition": "new"
47 },
48 {
49 "asin": "B000000002",
50 "price": 17.25,
51 "currency": "USD",
52 "collectedAt": "2026-11-02T11:20:00Z",
53 "marketplace": "amazon.com",
54 "condition": "new"
55 },
56 {
57 "asin": "B000000002",
58 "seller": "Seller Delta",
59 "price": 17.9,
60 "currency": "USD",
61 "collectedAt": "2026-11-02T11:40:00Z",
62 "marketplace": "amazon.com",
63 "condition": "new"
64 }
65 ],
66 "referenceTime": "2026-11-02T12:00:00Z",
67 "expectedCurrency": "USD"
68};
69
70
71const run = await client.actor("practical_ai_lab_jp/pal-amazon-offer-data-freshness-audit").call(input);
72
73
74console.log('Results from dataset');
75console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
76const { items } = await client.dataset(run.defaultDatasetId).listItems();
77items.forEach((item) => {
78 console.dir(item);
79});
80
81