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 "convertToUsd": false,
32 "onlyDisclosedSalary": false,
33 "dropCrossCityDuplicates": false,
34 "includeSourceFields": false,
35 "salaryStatistics": true,
36 "salaryStatisticsMinSample": 5,
37 "maxItems": 20,
38 "maxPagesPerSearch": 5,
39 "outputMode": "full",
40 "monitorMode": "snapshot",
41 "stateName": "default",
42 "includeUnchanged": false,
43 "notifyOnNoChanges": false,
44 "proxyConfiguration": {
45 "useApifyProxy": true
46 },
47 "notificationEvents": [
48 "NEW",
49 "UPDATED",
50 "REAPPEARED",
51 "EXPIRED"
52 ]
53};
54
55
56const run = await client.actor("getascraper/51job-scraper").call(input);
57
58
59console.log('Results from dataset');
60console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
61const { items } = await client.dataset(run.defaultDatasetId).listItems();
62items.forEach((item) => {
63 console.dir(item);
64});
65
66