1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "mode": "byEntityName",
12 "entityName": "AMAZON",
13 "entityNameMatchType": "startsWith",
14 "idNumbers": [
15 "4087072"
16 ],
17 "assumedNameMatchType": "contains",
18 "agentMatchType": "contains",
19 "county": "New York",
20 "entityType": "DOMESTIC LIMITED LIABILITY COMPANY",
21 "jurisdiction": "Delaware",
22 "city": "BROOKLYN",
23 "cityMatchType": "startsWith",
24 "officerMatchType": "contains",
25 "zipCode": "10001",
26 "state": "NY",
27 "entityStatus": "Active",
28 "entityTypeCategories": [],
29 "includeDetails": false,
30 "includeHistory": false,
31 "sortBy": "source",
32 "maxItems": 1
33};
34
35
36const run = await client.actor("xyrelith-data/new-york-dos-business-entity-registry-lookup").call(input);
37
38
39console.log('Results from dataset');
40console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
41const { items } = await client.dataset(run.defaultDatasetId).listItems();
42items.forEach((item) => {
43 console.dir(item);
44});
45
46