1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "dataset1_ids": [
12 "GYVCj4hEeqnX3dJyu"
13 ],
14 "dataset2_ids": [
15 "OmzHV4VEByO4KohMF"
16 ],
17 "input_mapping": {
18 "eshop1": {
19 "id": "url",
20 "name": "name",
21 "price": "price",
22 "short_description": "shortDescription",
23 "long_description": "longDescription",
24 "specification": "specification",
25 "code": [
26 "sku",
27 "productModel"
28 ]
29 },
30 "eshop2": {
31 "id": "url",
32 "name": "name",
33 "price": "price",
34 "short_description": "shortDescription",
35 "long_description": "longDescription",
36 "specification": "specification",
37 "code": [
38 "sku",
39 "productModel"
40 ]
41 }
42 }
43};
44
45
46const run = await client.actor("equidem/ai-product-matcher").call(input);
47
48
49console.log('Results from dataset');
50console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
51const { items } = await client.dataset(run.defaultDatasetId).listItems();
52items.forEach((item) => {
53 console.dir(item);
54});
55
56