1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "currentItems": [
12 {
13 "id": "port-la",
14 "port": "Los Angeles",
15 "region": "US West",
16 "dwellHours": 86,
17 "vesselsWaiting": 14,
18 "throughputIndex": 71,
19 "containersDelayed": 4200,
20 "date": "2026-09-23"
21 },
22 {
23 "id": "port-sg",
24 "port": "Singapore",
25 "region": "SEA",
26 "dwellHours": 42,
27 "vesselsWaiting": 8,
28 "throughputIndex": 84,
29 "containersDelayed": 1600,
30 "date": "2026-09-23"
31 },
32 {
33 "id": "port-rtm",
34 "port": "Rotterdam",
35 "region": "EU",
36 "dwellHours": 31,
37 "vesselsWaiting": 5,
38 "throughputIndex": 91,
39 "containersDelayed": 900,
40 "date": "2026-09-23"
41 }
42 ],
43 "previousItems": [
44 {
45 "id": "port-la",
46 "port": "Los Angeles",
47 "region": "US West",
48 "dwellHours": 54,
49 "vesselsWaiting": 7,
50 "throughputIndex": 83,
51 "containersDelayed": 2100,
52 "date": "2026-09-16"
53 },
54 {
55 "id": "port-sg",
56 "port": "Singapore",
57 "region": "SEA",
58 "dwellHours": 39,
59 "vesselsWaiting": 7,
60 "throughputIndex": 85,
61 "containersDelayed": 1450,
62 "date": "2026-09-16"
63 }
64 ]
65};
66
67
68const run = await client.actor("quanmatrix/port-congestion-change-intelligence").call(input);
69
70
71console.log('Results from dataset');
72console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
73const { items } = await client.dataset(run.defaultDatasetId).listItems();
74items.forEach((item) => {
75 console.dir(item);
76});
77
78