1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "counterparties": [],
12 "maxDiscoveryChargeUsd": 0.5,
13 "sourceMode": "list",
14 "itemsList": [
15 {
16 "name": "Northwind Industrial Supplies GmbH",
17 "sample": true,
18 "country": "DE",
19 "vatNumber": "DE000000001",
20 "website": "https://northwind-industrial.example",
21 "sampleScreening": {
22 "legalName": "Northwind Industrial Supplies GmbH",
23 "lei": "529900SAMPLE00000001",
24 "leiStatus": "ISSUED",
25 "jurisdiction": "DE",
26 "legalAddress": "Hafenstrasse 12, 20457, Hamburg, DE",
27 "registrationNumber": "HRB 000001 (sample)",
28 "leiChosenBy": "rules",
29 "parents": [
30 {
31 "relation": "direct",
32 "lei": "529900SAMPLE00000002",
33 "legalName": "Northwind Holding AG",
34 "verdict": "clear"
35 }
36 ],
37 "vatNumber": "DE000000001",
38 "vatValid": true,
39 "vatName": "NORTHWIND INDUSTRIAL SUPPLIES GMBH",
40 "vatAddress": "HAFENSTRASSE 12, 20457 HAMBURG",
41 "vatNameMatches": true,
42 "vatCheckedAt": "2026-10-23T08:00:00+00:00",
43 "sanctionsHits": [],
44 "listsChecked": {
45 "OFAC_SDN": "2026-10-21",
46 "OFAC_CONS": "2026-10-21",
47 "US_CSL": "2026-10-21",
48 "UN": "2026-10-21",
49 "EU": "2026-10-15",
50 "UK": "2026-10-16"
51 }
52 }
53 },
54 {
55 "name": "Oceanic Vantage Shipping FZE",
56 "sample": true,
57 "country": "AE",
58 "address": "Office 1407, Jebel Ali Free Zone, Dubai",
59 "sampleScreening": {
60 "parents": [],
61 "sanctionsHits": [
62 {
63 "list": "OFAC_SDN",
64 "entryId": "OFAC_SDN-SAMPLE-1",
65 "matchedName": "OCEANIC VANTAGE SHIPPING FZE",
66 "entryName": "OCEANIC VANTAGE SHIPPING FZE",
67 "entryType": "company",
68 "score": 100,
69 "weakAlias": false,
70 "assessment": "likely",
71 "decidingFields": [
72 "name",
73 "country",
74 "address"
75 ],
76 "reason": "name 100/100 and country AE agree, address shares jebel, dubai",
77 "adjudicatedBy": "rules",
78 "programmes": [
79 "IRAN-EO13846"
80 ],
81 "countries": [
82 "AE"
83 ],
84 "listedOn": "2024-03-14",
85 "sourceUrl": "https://sanctionssearch.ofac.treas.gov/",
86 "subject": "counterparty",
87 "foundVia": "name"
88 },
89 {
90 "list": "UK",
91 "entryId": "UK-SAMPLE-2",
92 "matchedName": "Oceanic Vantage Shipping FZE",
93 "entryName": "Oceanic Vantage Shipping FZE",
94 "entryType": "company",
95 "score": 100,
96 "weakAlias": false,
97 "assessment": "likely",
98 "decidingFields": [
99 "name",
100 "country"
101 ],
102 "reason": "name 100/100 and country AE agree",
103 "adjudicatedBy": "rules",
104 "programmes": [
105 "The Iran (Sanctions) Regulations 2023"
106 ],
107 "countries": [
108 "AE",
109 "IR"
110 ],
111 "listedOn": "2024-05-02",
112 "sourceUrl": "https://sanctionslist.fcdo.gov.uk/docs/UK-Sanctions-List.csv",
113 "subject": "counterparty",
114 "foundVia": "name"
115 }
116 ],
117 "listsChecked": {
118 "OFAC_SDN": "2026-10-21",
119 "OFAC_CONS": "2026-10-21",
120 "US_CSL": "2026-10-21",
121 "UN": "2026-10-21",
122 "EU": "2026-10-15",
123 "UK": "2026-10-16"
124 }
125 }
126 },
127 {
128 "name": "Baltic Timber Export OU",
129 "sample": true,
130 "country": "EE",
131 "vatNumber": "EE100000000",
132 "sampleScreening": {
133 "parents": [],
134 "vatNumber": "EE100000000",
135 "vatValid": false,
136 "vatCheckedAt": "2026-10-23T08:00:00+00:00",
137 "sanctionsHits": [
138 {
139 "list": "EU",
140 "entryId": "EU-SAMPLE-3",
141 "matchedName": "Baltik Timber Export LLC",
142 "entryName": "Baltik Timber Export LLC",
143 "entryType": "company",
144 "score": 89,
145 "weakAlias": false,
146 "assessment": "unlikely",
147 "decidingFields": [
148 "country"
149 ],
150 "reason": "listed for BY, RU, the counterparty is in EE",
151 "adjudicatedBy": "rules",
152 "programmes": [
153 "BLR"
154 ],
155 "countries": [
156 "BY",
157 "RU"
158 ],
159 "listedOn": "2023-02-25",
160 "sourceUrl": "https://eur-lex.europa.eu/",
161 "subject": "counterparty",
162 "foundVia": "name"
163 }
164 ],
165 "listsChecked": {
166 "OFAC_SDN": "2026-10-21",
167 "OFAC_CONS": "2026-10-21",
168 "US_CSL": "2026-10-21",
169 "EU": "2026-10-15",
170 "UK": "2026-10-16"
171 },
172 "listsUnavailable": [
173 "UN"
174 ]
175 }
176 }
177 ]
178};
179
180
181const run = await client.actor("rich_minds/counterparty-check-ai").call(input);
182
183
184console.log('Results from dataset');
185console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
186const { items } = await client.dataset(run.defaultDatasetId).listItems();
187items.forEach((item) => {
188 console.dir(item);
189});
190
191