1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "mode": "search",
12 "keywords": "",
13 "sort": "added",
14 "postedWithinHours": 0,
15 "urls": [
16 "https://hijobs.net/jobs",
17 "https://hijobs.net/search/results?Keywords=chef",
18 "https://hijobs.net/jobs/oban",
19 "https://hijobs.net/search/results?employers=charity-cic&where=Scotland&sort=relevance",
20 "https://hijobs.net/jobs?pg=2",
21 "https://hijobs.net/job/427074/support-practitioner"
22 ],
23 "fetchDetails": true,
24 "maxItems": 20,
25 "maxPages": 0,
26 "proxy": {
27 "useApifyProxy": true
28 },
29 "incrementalMode": false,
30 "emitUnchanged": false,
31 "emitExpired": false,
32 "ignoreFieldsForChanges": []
33};
34
35
36const run = await client.actor("abotapi/hijobs-net-jobs-scraper").call(input);
37
38
39console.log('Results from dataset');
40console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
41const { items } = await client.dataset(run.defaultDatasetId).listItems();
42items.forEach((item) => {
43 console.dir(item);
44});
45
46