1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "observations": [
12 {
13 "adapterHealth": "ok",
14 "availability": "in-stock",
15 "checkedAt": "2026-09-28T12:00:00Z",
16 "price": 999,
17 "sourceUrl": "https://www.newegg.com/p/synthetic-rtx5080-01",
18 "variantId": "syn-rtx5080-ne-01"
19 },
20 {
21 "adapterHealth": "degraded",
22 "availability": "in-stock",
23 "checkedAt": "2026-09-28T12:00:00Z",
24 "price": 999,
25 "sourceUrl": "https://www.bestbuy.com/site/synthetic-rtx5080-01",
26 "variantId": "syn-rtx5080-bb-01"
27 },
28 {
29 "adapterHealth": "ok",
30 "availability": "in-stock",
31 "checkedAt": "2026-09-28T12:00:00Z",
32 "price": 599,
33 "sourceUrl": "https://www.newegg.com/p/synthetic-rx9070-01",
34 "variantId": "syn-rx9070-ne-01"
35 },
36 {
37 "adapterHealth": "degraded",
38 "availability": "in-stock",
39 "checkedAt": "2026-09-28T12:00:00Z",
40 "price": 899,
41 "sourceUrl": "https://www.bestbuy.com/site/synthetic-rtx5080-02",
42 "variantId": "syn-rtx5080-bb-02"
43 }
44 ],
45 "storedBaseline": {
46 "variants": [
47 {
48 "availability": "out-of-stock",
49 "checkedAt": "2026-09-28T11:15:00Z",
50 "lastPrice": 999,
51 "retailer": "newegg",
52 "sku": "SYN-RTX5080-16G-NE",
53 "variantId": "syn-rtx5080-ne-01"
54 },
55 {
56 "availability": "in-stock",
57 "checkedAt": "2026-09-28T11:15:00Z",
58 "lastPrice": 1099,
59 "retailer": "bestbuy",
60 "sku": "SYN-RTX5080-16G-BB",
61 "variantId": "syn-rtx5080-bb-01"
62 },
63 {
64 "availability": "in-stock",
65 "checkedAt": "2026-09-28T11:15:00Z",
66 "lastPrice": 599,
67 "retailer": "newegg",
68 "sku": "SYN-RX9070-16G-NE",
69 "variantId": "syn-rx9070-ne-01"
70 }
71 ],
72 "watchlistId": "syn-watch-01"
73 },
74 "watchlist": {
75 "partition": "P1",
76 "partitionMode": "armed",
77 "priceDropPct": 5,
78 "scheduleHours": 1,
79 "skuUrls": [
80 "https://www.newegg.com/p/synthetic-rtx5080-01",
81 "https://www.bestbuy.com/site/synthetic-rtx5080-01",
82 "https://www.newegg.com/p/synthetic-rx9070-01",
83 "https://www.bestbuy.com/site/synthetic-rtx5080-02"
84 ],
85 "watchlistId": "syn-watch-01"
86 }
87};
88
89
90const run = await client.actor("steadyworks/gpu-restock-monitor").call(input);
91
92
93console.log('Results from dataset');
94console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
95const { items } = await client.dataset(run.defaultDatasetId).listItems();
96items.forEach((item) => {
97 console.dir(item);
98});
99
100