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 "id": "fan-01",
14 "brand": "Hampton Bay",
15 "model": "AK396H-MBK",
16 "name": "Hampton Bay Halwin 52 in. LED Indoor/Outdoor Ceiling Fan, Matte Black",
17 "country": "US"
18 },
19 {
20 "id": "toy-07",
21 "gtin": "8056379188698",
22 "brand": "Giochi Preziosi",
23 "name": "Smurfs plush toy 20 cm",
24 "country": "EU"
25 },
26 {
27 "id": "mouse-03",
28 "gtin": "5099206080263",
29 "brand": "Logitech",
30 "model": "G502 HERO",
31 "name": "Logitech G502 HERO Gaming Mouse",
32 "country": "both"
33 }
34 ]
35};
36
37
38const run = await client.actor("subtleasianmerch/product-recall-matcher").call(input);
39
40
41console.log('Results from dataset');
42console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
43const { items } = await client.dataset(run.defaultDatasetId).listItems();
44items.forEach((item) => {
45 console.dir(item);
46});
47
48