1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "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",
10 "current_company_ids": [
11 162479,
12 1053,
13 ],
14 "current_company_names": [
15 "Apple",
16 "Microsoft",
17 ],
18 "past_company_ids": [1009],
19 "past_company_names": [
20 "Apple",
21 "Microsoft",
22 ],
23 "title_keywords": [
24 "Director",
25 "Operation",
26 ],
27 "past_job_titles": ["CEO"],
28 "keywords": "system",
29 "company_headcounts": [
30 "1001-5000",
31 "5001-10000",
32 ],
33 "functions": [
34 "Accounting",
35 "Administrative",
36 ],
37 "industry_codes": [
38 3,
39 4,
40 ],
41 "seniority_levels": [],
42 "company_type": [],
43 "geo_codes": [
44 103644278,
45 102299470,
46 ],
47 "company_headquarter_location_ids": [],
48 "year_in_current_company": [],
49 "year_in_current_position": [],
50 "years_of_experience": [],
51 "profile_languages": [],
52 "school_ids": [123456],
53 "changed_jobs": "false",
54 "posted_on_linkedin": "false",
55 "mentioned_in_news": "false",
56 "current_company_ids_exclude": [],
57 "title_keywords_exclude": ["Sales"],
58 "functions_exclude": [],
59 "geo_codes_exclude": [
60 105080838,
61 102257491,
62 ],
63 "past_company_ids_exclude": [1009],
64 "past_job_titles_exclude": ["Founder"],
65 "industry_codes_exclude": [
66 5,
67 6,
68 ],
69 "seniority_levels_exclude": [],
70 "company_headquarter_location_ids_exclude": [],
71 "school_ids_exclude": [654321],
72 "limit": 25,
73 "request_id": "664538c2dd7354c850f1f9ebb2346588",
74 "page": 1,
75}
76
77
78run = client.actor("bestscrapers/sales-navigator-scraper-by-filters").call(run_input=run_input)
79
80
81print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
82for item in client.dataset(run["defaultDatasetId"]).iterate_items():
83 print(item)
84
85