1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "catalogId": "demo-catalog-001",
12 "catalogProducts": [
13 {
14 "id": "SKU-001",
15 "title": "Example Cotton Shirt",
16 "price": "499.00",
17 "available": true,
18 "sku": "SKU-001"
19 },
20 {
21 "id": "SKU-002",
22 "title": "Example Canvas Bag",
23 "price": "699.00",
24 "available": true,
25 "sku": "SKU-002"
26 }
27 ]
28};
29
30
31const run = await client.actor("digicrem/digicrem-catalog-delta-intelligence").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