1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "origin": "dam",
12 "destination": "VNCMP",
13 "containers": [
14 {
15 "name": "DRY 40",
16 "quantity": 5,
17 "weight": 9000
18 },
19 {
20 "name": "DRY 20",
21 "quantity": 1,
22 "weight": 10000
23 },
24 {
25 "name": "DRY 40H",
26 "quantity": 1,
27 "weight": 11000
28 }
29 ],
30 "commodity": "091091"
31};
32
33
34const run = await client.actor("maged120/one-line-prices").call(input);
35
36
37console.log('Results from dataset');
38console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
39const { items } = await client.dataset(run.defaultDatasetId).listItems();
40items.forEach((item) => {
41 console.dir(item);
42});
43
44