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 "keyword": "",
13 "keywords": [],
14 "city": "any",
15 "cities": [],
16 "region": "any",
17 "regions": [],
18 "categoryIds": [],
19 "jobTypeIds": [],
20 "postedWithinDays": 0,
21 "workplaceTypes": [],
22 "englishOnly": false,
23 "namedEmployersOnly": false,
24 "detailMode": "auto",
25 "incrementalMode": false,
26 "stateName": "default",
27 "changeTypes": [
28 "NEW",
29 "UPDATED",
30 "REPOSTED",
31 "REAPPEARED",
32 "EXPIRED"
33 ],
34 "notificationEvents": [
35 "NEW",
36 "UPDATED",
37 "REPOSTED",
38 "REAPPEARED",
39 "EXPIRED"
40 ],
41 "notifyOnNoChanges": false,
42 "maxItems": 10,
43 "outputMode": "full",
44 "proxyConfiguration": {
45 "useApifyProxy": true,
46 "apifyProxyGroups": [
47 "RESIDENTIAL"
48 ],
49 "apifyProxyCountry": "IL"
50 }
51};
52
53
54const run = await client.actor("getascraper/alljobs-scraper").call(input);
55
56
57console.log('Results from dataset');
58console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
59const { items } = await client.dataset(run.defaultDatasetId).listItems();
60items.forEach((item) => {
61 console.dir(item);
62});
63
64