1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "demoMode": true,
12 "catalog": [
13 {
14 "id": "CANARY-SKU",
15 "name": "Example Product",
16 "brand": "Example Brand",
17 "model": "EX-100",
18 "upc": "000123456789"
19 }
20 ],
21 "catalogFormat": "auto",
22 "matching": {
23 "minScore": 70,
24 "requireBrandWithModel": true
25 },
26 "limits": {
27 "maxCatalogItems": 10,
28 "maxRecallsPerSource": 25,
29 "maxMatches": 25,
30 "maxResponseBytes": 500000,
31 "requestTimeoutSecs": 15,
32 "concurrency": 1
33 }
34};
35
36
37const run = await client.actor("bread-kim/product-recall-catalog-exposure-monitor").call(input);
38
39
40console.log('Results from dataset');
41console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
42const { items } = await client.dataset(run.defaultDatasetId).listItems();
43items.forEach((item) => {
44 console.dir(item);
45});
46
47