1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "requests": [
12 "moving a 2 bedroom apartment 15 miles, what size truck",
13 "3 bed house with a garage, 1,200 miles, movers or rent a truck?",
14 "studio apartment across town, minimal stuff",
15 "sofa, queen bed, 2 dressers, a dining table and 4 chairs, 30 boxes, 300 miles",
16 "4 bedroom house with a piano, local, gas $3.90",
17 "1 bedroom, 2 months of storage, container, 500 miles",
18 {
19 "home": 5,
20 "extras": [
21 "garage",
22 "basement"
23 ],
24 "miles": 2500,
25 "stuff": "full"
26 }
27 ]
28};
29
30
31const run = await client.actor("jumblemog/moving-calculator").call(input);
32
33
34console.log('Results from dataset');
35console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
36const { items } = await client.dataset(run.defaultDatasetId).listItems();
37items.forEach((item) => {
38 console.dir(item);
39});
40
41