1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "boards": [
12 {
13 "provider": "lever",
14 "board": "lever",
15 "region": "eu"
16 }
17 ],
18 "mode": "snapshot",
19 "maxResults": 10,
20 "maxResultsPerBoard": 10,
21 "maxConcurrency": 1,
22 "pageSize": 3,
23 "maxPages": 4,
24 "timeoutMs": 8000,
25 "maxRetries": 0,
26 "minIntervalMs": 300,
27 "maxResponseBytes": 1048576,
28 "maxRetryWaitMs": 0,
29 "greenhousePayDetails": false,
30 "maxPayDetailRequests": 0
31};
32
33
34const run = await client.actor("felixgoldwin/greenhouse-lever-ashby-jobs-scraper").call(input);
35
36
37console.log('Results from dataset');
38console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
39const { items } = await client.dataset(run.defaultDatasetId).listItems();
40items.forEach((item) => {
41 console.dir(item);
42});
43
44