1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "profileScraperMode": "Full",
12 "searchQuery": "Marketing Manager",
13 "jobTitles": [],
14 "pastJobTitles": [],
15 "locations": [],
16 "currentCompanies": [],
17 "pastCompanies": [],
18 "schools": [],
19 "industryIds": [],
20 "yearsOfExperience": [],
21 "yearsAtCurrentCompany": [],
22 "startPage": 1,
23 "takePages": 1,
24 "maxItems": 0,
25 "automaticQuerySegmentationLevels": [
26 "Countries",
27 "State/Region"
28 ],
29 "targetCountries": [],
30 "mongoDbConnectionString": "",
31 "postFilteringMongoDbQuery": {},
32 "queries": [],
33 "urls": [],
34 "publicIdentifiers": [],
35 "profileIds": []
36};
37
38
39const run = await client.actor("scrapeai/linkedin-profile-search").call(input);
40
41
42console.log('Results from dataset');
43console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
44const { items } = await client.dataset(run.defaultDatasetId).listItems();
45items.forEach((item) => {
46 console.dir(item);
47});
48
49