1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "listings": [
12 {
13 "listingId": "demo-bike-1",
14 "year": 2025,
15 "make": "KTM",
16 "model": "390 Duke",
17 "price": 5899,
18 "dealerName": "Demo Powersports",
19 "location": "Austin, TX"
20 },
21 {
22 "listingId": "demo-bike-2",
23 "year": 2025,
24 "make": "KTM",
25 "model": "390 Duke",
26 "price": 5299,
27 "dealerName": "Demo Powersports",
28 "location": "Austin, TX"
29 },
30 {
31 "listingId": "demo-bike-3",
32 "year": 2025,
33 "make": "KTM",
34 "model": "390 Duke",
35 "price": 6499,
36 "dealerName": "Another Demo Dealer",
37 "location": "Dallas, TX"
38 }
39 ]
40};
41
42
43const run = await client.actor("repairiq/powersports-inventory-aging").call(input);
44
45
46console.log('Results from dataset');
47console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
48const { items } = await client.dataset(run.defaultDatasetId).listItems();
49items.forEach((item) => {
50 console.dir(item);
51});
52
53