1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "searchKeywords": [
12 "marketing"
13 ],
14 "classificationMode": "b2b",
15 "patternSelectors": [
16 "email_for_bookings",
17 "bio_email_basic",
18 "contact_at_domain",
19 "business_development"
20 ],
21 "targetNetwork": "LinkedIn.com",
22 "geoFilter": "",
23 "maxLeads": 10,
24 "maxLeadsPerPattern": 15,
25 "enableSmartProxy": true,
26 "proxySettings": {
27 "useApifyProxy": true,
28 "apifyProxyGroups": [
29 "GOOGLE_SERP"
30 ]
31 }
32};
33
34
35const run = await client.actor("scraper-engine/linkedin-b2b-emails-scraper").call(input);
36
37
38console.log('Results from dataset');
39console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
40const { items } = await client.dataset(run.defaultDatasetId).listItems();
41items.forEach((item) => {
42 console.dir(item);
43});
44
45