1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "url": "https://www.linkedin.com/sales/search/people?query=(recentSearchParam%3A(doLogHistory%3Atrue)%2Cfilters%3AList((type%3ACURRENT_COMPANY%2Cvalues%3AList((id%3Aurn%253Ali%253Aorganization%253A18890478%2Ctext%3AFTMO%2CselectionType%3AINCLUDED%2Cparent%3A(id%3A0))))))&sessionId=P1DbKqCXT7CvuwbJNjT8dw%3D%3D&viewAllFilters=true",
12 "current_company_ids": [
13 162479,
14 1053
15 ],
16 "current_company_names": [
17 "Apple",
18 "Microsoft"
19 ],
20 "past_company_ids": [
21 1009
22 ],
23 "past_company_names": [
24 "Apple",
25 "Microsoft"
26 ],
27 "title_keywords": [
28 "Director",
29 "Operation"
30 ],
31 "past_job_titles": [
32 "CEO"
33 ],
34 "keywords": "system",
35 "company_headcounts": [
36 "1001-5000",
37 "5001-10000"
38 ],
39 "functions": [
40 "Accounting",
41 "Administrative"
42 ],
43 "industry_codes": [
44 3,
45 4
46 ],
47 "seniority_levels": [],
48 "company_type": [],
49 "geo_codes": [
50 103644278,
51 102299470
52 ],
53 "company_headquarter_location_ids": [],
54 "year_in_current_company": [],
55 "year_in_current_position": [],
56 "years_of_experience": [],
57 "profile_languages": [],
58 "school_ids": [
59 123456
60 ],
61 "changed_jobs": "false",
62 "posted_on_linkedin": "false",
63 "mentioned_in_news": "false",
64 "current_company_ids_exclude": [],
65 "title_keywords_exclude": [
66 "Sales"
67 ],
68 "functions_exclude": [],
69 "geo_codes_exclude": [
70 105080838,
71 102257491
72 ],
73 "past_company_ids_exclude": [
74 1009
75 ],
76 "past_job_titles_exclude": [
77 "Founder"
78 ],
79 "industry_codes_exclude": [
80 5,
81 6
82 ],
83 "seniority_levels_exclude": [],
84 "company_headquarter_location_ids_exclude": [],
85 "school_ids_exclude": [
86 654321
87 ],
88 "limit": 25,
89 "request_id": "664538c2dd7354c850f1f9ebb2346588",
90 "page": 1
91};
92
93
94const run = await client.actor("bestscrapers/sales-navigator-scraper-by-filters").call(input);
95
96
97console.log('Results from dataset');
98console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
99const { items } = await client.dataset(run.defaultDatasetId).listItems();
100items.forEach((item) => {
101 console.dir(item);
102});
103
104