1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "sourceMode": "search",
12 "queries": [
13 "python"
14 ],
15 "cities": [
16 "020000"
17 ],
18 "startUrls": [],
19 "experience": "all",
20 "education": "all",
21 "employmentType": "",
22 "companyType": "all",
23 "companySize": "all",
24 "industries": [],
25 "jobFunctions": [],
26 "salaryBand": "",
27 "postedWithin": "",
28 "sortBy": "0",
29 "excludeKeywords": [],
30 "includeRecruiterSignals": true,
31 "maxItems": 50,
32 "maxPagesPerSearch": 5,
33 "outputMode": "full",
34 "monitorMode": "snapshot",
35 "stateName": "default",
36 "includeUnchanged": false,
37 "notifyOnNoChanges": false,
38 "proxyConfiguration": {
39 "useApifyProxy": true
40 },
41 "notificationEvents": [
42 "NEW",
43 "UPDATED",
44 "REAPPEARED",
45 "EXPIRED"
46 ]
47};
48
49
50const run = await client.actor("getascraper/51job-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