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 "searchKeyword": "",
13 "location": "",
14 "searches": [],
15 "provinces": [],
16 "nocCodes": [],
17 "datePosted": "any",
18 "lmiaStatus": "any",
19 "onlyLmiaRequested": false,
20 "excludeStudent": false,
21 "sourceType": "any",
22 "employmentSchedules": [],
23 "workplaceTypes": [],
24 "languages": [],
25 "sortBy": "relevance",
26 "monitoringMode": "off",
27 "stateName": "default",
28 "resetState": false,
29 "maxItems": 100,
30 "proxyConfiguration": {
31 "useApifyProxy": true
32 }
33};
34
35
36const run = await client.actor("getascraper/jobbank-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