1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "companies": [
12 "Apify",
13 "Mozilla",
14 "Basecamp",
15 "Stripe",
16 "Zapier",
17 "Notion",
18 "Vercel",
19 "Cloudflare"
20 ],
21 "country": "",
22 "industryHint": "",
23 "maxPagesPerDomain": 4,
24 "contactPathHints": [
25 "/contact",
26 "/contact-us",
27 "/about",
28 "/imprint",
29 "/impressum",
30 "/legal"
31 ],
32 "includePersonalEmails": false,
33 "extractPhones": true,
34 "extractSocials": true,
35 "requestTimeoutSecs": 20,
36 "maxRunSecs": 240,
37 "proxyConfiguration": {
38 "useApifyProxy": true
39 }
40};
41
42
43const run = await client.actor("insight.solutions/company-contact-finder").call(input);
44
45
46console.log('Results from dataset');
47console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
48const { items } = await client.dataset(run.defaultDatasetId).listItems();
49items.forEach((item) => {
50 console.dir(item);
51});
52
53