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 {
13 "url": "https://hiringcafe.com/classic"
14 },
15 {
16 "url": "https://hiringcafe.com/classic?searchState=%7B%22searchQuery%22%3A%22software%20engineer%22%7D"
17 },
18 {
19 "url": "https://hiringcafe.com/classic?searchState=%7B%22searchQuery%22%3A%22software%20engineer%22%7D&page=2"
20 },
21 {
22 "url": "https://hiringcafe.com/?searchState=%7B%22searchQuery%22%3A%22software%20engineer%22%7D"
23 },
24 {
25 "url": "https://hiringcafe.com/?searchState=eyJzZWFyY2hRdWVyeSI6InNvZnR3YXJlIGVuZ2luZWVyIn0%3D"
26 },
27 {
28 "url": "https://hiringcafe.com/job/bt38fz2pqe76nimr"
29 }
30 ],
31 "location": "",
32 "workplaceType": "Any",
33 "commitmentType": "Any",
34 "seniorityLevel": "Any",
35 "maxItems": 20,
36 "fetchDetails": true,
37 "proxy": {
38 "useApifyProxy": true,
39 "apifyProxyGroups": [
40 "RESIDENTIAL"
41 ]
42 },
43 "incrementalMode": false,
44 "emitUnchanged": false,
45 "emitExpired": false,
46 "ignoreFieldsForChanges": []
47};
48
49
50const run = await client.actor("abotapi/hiring-cafe-scraper").call(input);
51
52
53console.log('Results from dataset');
54console.log(`๐พ Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
55const { items } = await client.dataset(run.defaultDatasetId).listItems();
56items.forEach((item) => {
57 console.dir(item);
58});
59
60