1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "items": [
12 {
13 "product": "Desk lamp",
14 "shop": "Sample Shop A",
15 "price": 18.5,
16 "stock": 12,
17 "added": "2026-11-02",
18 "url": "https://example.com/1"
19 },
20 {
21 "product": "Office chair",
22 "shop": "Sample Shop B",
23 "price": 99,
24 "stock": 3,
25 "added": "2026-11-05",
26 "url": "https://example.com/2"
27 },
28 {
29 "product": "Notebook set",
30 "shop": "Sample Shop A",
31 "price": 9.25,
32 "stock": 40,
33 "added": "2026-11-09",
34 "url": "https://example.com/3"
35 },
36 {
37 "product": "Monitor stand",
38 "shop": "Sample Shop B",
39 "price": 27,
40 "stock": 8,
41 "added": "2026-11-12",
42 "url": "https://example.com/4"
43 }
44 ]
45};
46
47
48const run = await client.actor("abzalp/dataset-to-excel-report").call(input);
49
50
51console.log('Results from dataset');
52console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
53const { items } = await client.dataset(run.defaultDatasetId).listItems();
54items.forEach((item) => {
55 console.dir(item);
56});
57
58