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 "reference": "demo-1",
14 "brand": "Goki",
15 "productName": "Wooden pull-along ship",
16 "ean": "4013594548496"
17 },
18 {
19 "reference": "demo-2",
20 "brand": "Wicked Costumes",
21 "productName": "Dinosaur toy costume"
22 },
23 {
24 "reference": "demo-3",
25 "brand": "Acme Gizmo Co",
26 "ean": "4006381333931"
27 }
28 ],
29 "maxItems": 3,
30 "lookbackMonths": 6
31};
32
33
34const run = await client.actor("goobertje/eu-product-recall-compliance-matcher").call(input);
35
36
37console.log('Results from dataset');
38console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
39const { items } = await client.dataset(run.defaultDatasetId).listItems();
40items.forEach((item) => {
41 console.dir(item);
42});
43
44