1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "enableCompanySearch": true,
12 "searchKeywords": [
13 "monzo",
14 "tesla"
15 ],
16 "searchMaxResults": 10,
17 "searchFetchFullDetails": false,
18 "searchJurisdiction": "",
19 "searchCompanyType": "",
20 "searchStatus": "all",
21 "searchSort": "name",
22 "enableOfficerSearch": false,
23 "officerKeywords": [
24 "Piracha"
25 ],
26 "officerMaxResults": 10,
27 "officerJurisdiction": "",
28 "officerStatus": "all",
29 "enableCompanyDetails": false,
30 "companyRefs": [
31 "https://opencorporates.com/companies/gb/00445790"
32 ],
33 "enableFilings": false,
34 "filingsMaxPerCompany": 10,
35 "enableOwnership": false,
36 "ownershipMaxPerCompany": 10,
37 "enableLeadDetails": false,
38 "webhookUrl": "",
39 "webhookFormat": "json",
40 "enableScrapeByUrl": false,
41 "scrapeUrls": [
42 "https://opencorporates.com/companies/gb/00445790"
43 ],
44 "proxyConfiguration": {
45 "useApifyProxy": true,
46 "apifyProxyGroups": [
47 "RESIDENTIAL"
48 ],
49 "apifyProxyCountry": "US"
50 }
51};
52
53
54const run = await client.actor("b2b_leads/opencorporates-real-time-data-scraper").call(input);
55
56
57console.log('Results from dataset');
58console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
59const { items } = await client.dataset(run.defaultDatasetId).listItems();
60items.forEach((item) => {
61 console.dir(item);
62});
63
64