1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "currency": "USD",
12 "rateRows": [
13 {
14 "id": "R-DEMO",
15 "carrier": "CARRIER-DEMO",
16 "service": "GROUND",
17 "validFrom": "2026-10-05",
18 "validThrough": "2026-10-11",
19 "percent": "30.25",
20 "dateBasis": "shipmentDate",
21 "sourceUrl": "https://example.org/fuel-rates"
22 }
23 ],
24 "shipments": [
25 {
26 "id": "S-DEMO",
27 "carrier": "CARRIER-DEMO",
28 "service": "GROUND",
29 "shipmentDate": "2026-10-09",
30 "invoiceDate": "2026-10-12",
31 "dateBasis": "shipmentDate",
32 "basisConfirmed": true,
33 "componentsComplete": true,
34 "components": [
35 {
36 "id": "TRANSPORT",
37 "amount": "100.00",
38 "fuelEligible": true
39 },
40 {
41 "id": "OTHER",
42 "amount": "20.00",
43 "fuelEligible": false
44 }
45 ],
46 "billedFuel": "36.30"
47 }
48 ]
49};
50
51
52const run = await client.actor("wheresprada/freight-fuel-surcharge-check").call(input);
53
54
55console.log('Results from dataset');
56console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
57const { items } = await client.dataset(run.defaultDatasetId).listItems();
58items.forEach((item) => {
59 console.dir(item);
60});
61
62