1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "suppliers": [
12 {
13 "name": "Siemens AG",
14 "country": "DE",
15 "vat": "DE129274202",
16 "lei": "W38RGI023J3WT1HWRP32"
17 },
18 {
19 "name": "BP p.l.c.",
20 "country": "GB",
21 "companyNumber": "00102498"
22 },
23 {
24 "name": "Pfizer Inc.",
25 "country": "US"
26 },
27 {
28 "name": "Škoda Auto a.s.",
29 "country": "CZ",
30 "vat": "CZ00177041"
31 }
32 ],
33 "checks": [
34 "vat",
35 "lei",
36 "sanctions",
37 "uk-insolvency",
38 "uk-company",
39 "us-osha-epa",
40 "fda-warning-letters",
41 "us-recalls"
42 ],
43 "mode": "all"
44};
45
46
47const run = await client.actor("offerastudio/supplier-risk-report").call(input);
48
49
50console.log('Results from dataset');
51console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
52const { items } = await client.dataset(run.defaultDatasetId).listItems();
53items.forEach((item) => {
54 console.dir(item);
55});
56
57