1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "startUrls": [
12 "https://www.glassdoor.com/Overview/Working-at-Elastic-EI_IE751551.11,18.htm",
13 "https://www.glassdoor.com/Reviews/Elastic-Reviews-E751551.htm",
14 "https://www.glassdoor.com/Reviews/Elastic-Reviews-E751551.htm?filter.iso3Language=eng&filter.employmentStatus=REGULAR&filter.employmentStatus=PART_TIME&filter.searchCategory=CULTURE",
15 "https://www.glassdoor.com/Interview/Elastic-Interview-Questions-E751551.htm",
16 "https://www.glassdoor.com/Interview/Elastic-Marketing-Assistant-Interview-Questions-EI_IE751551.0,7_KO8,27.htm#InterviewReview_76289952",
17 "https://www.glassdoor.com/Job/elastic-jobs-SRCH_KO0,7.htm",
18 "https://www.glassdoor.com/job-listing/federal-account-executive-nga-elastic-JV_IC1138213_KO0,29_KE30,37.htm?jl=1008611278488&pos=107&ao=1136043&s=58&guid=000001884d59c10aafb263d8cfe0037f&src=GD_JOB_AD&t=SR&vt=w&ea=1&cs=1_cd6d3492&cb=1684924907959&jobListingId=1008611278488&jrtk=3-0-1h16ljg9dk6fr801-1h16ljg9ti9j2800-c74621bdf8ed430d-&ctt=1684925008345",
19 "https://www.glassdoor.com/Salary/Elastic-Software-Engineer-Salaries-E751551_D_KO8,25.htm"
20 ],
21 "search": "agency",
22 "maxItems": 20,
23 "endPage": 1,
24 "extendOutputFunction": ($) => { return {} },
25 "customMapFunction": (object) => { return {...object} },
26 "proxy": {
27 "useApifyProxy": true
28 }
29};
30
31
32const run = await client.actor("epctex/advanced-glassdoor-scraper").call(input);
33
34
35console.log('Results from dataset');
36console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
37const { items } = await client.dataset(run.defaultDatasetId).listItems();
38items.forEach((item) => {
39 console.dir(item);
40});
41
42