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 "type": "iban",
14 "value": "DE89 3704 0044 0532 0130 00"
15 },
16 {
17 "type": "vat",
18 "value": "IE6388047V"
19 },
20 {
21 "type": "lei",
22 "value": "7LTWFZYICNSX8D621K86"
23 },
24 {
25 "type": "phone",
26 "value": "+44 20 7946 0018"
27 },
28 {
29 "type": "email",
30 "value": "support@github.com"
31 },
32 {
33 "type": "sanctions",
34 "value": "Banco Nacional de Cuba"
35 }
36 ]
37};
38
39
40const run = await client.actor("facts402/eu-business-validator").call(input);
41
42
43console.log('Results from dataset');
44console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
45const { items } = await client.dataset(run.defaultDatasetId).listItems();
46items.forEach((item) => {
47 console.dir(item);
48});
49
50