1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "company_urls": [
12 {
13 "url": "https://www.linkedin.com/company/google"
14 }
15 ],
16 "usernames": [
17 "microsoft"
18 ],
19 "include_locations": true,
20 "include_affiliated_pages": true,
21 "include_similar_pages": true,
22 "max_posts": 10,
23 "max_jobs": 0,
24 "jobs_date_posted": "all",
25 "jobs_under_10_applicants": false,
26 "scrape_job_details": false,
27 "proxyCountry": "US"
28};
29
30
31const run = await client.actor("crawlix/linkedin-company-scraper").call(input);
32
33
34console.log('Results from dataset');
35console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
36const { items } = await client.dataset(run.defaultDatasetId).listItems();
37items.forEach((item) => {
38 console.dir(item);
39});
40
41