1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "keywords": "software engineer",
12 "location": "Kuala Lumpur",
13 "urls": [
14 "https://my.jobstreet.com/software-engineer-jobs/in-Kuala-Lumpur",
15 "https://my.jobstreet.com/it-jobs",
16 "https://my.jobstreet.com/jobs/in-Selangor",
17 "https://my.jobstreet.com/jobs-in-information-communication-technology",
18 "https://my.jobstreet.com/jobs-in-information-communication-technology/in-Kuala-Lumpur",
19 "https://my.jobstreet.com/jobs-in-information-communication-technology/developers-programmers",
20 "https://my.jobstreet.com/software-engineer-jobs/remote",
21 "https://my.jobstreet.com/software-engineer-jobs-in-information-communication-technology/in-Kuala-Lumpur/full-time",
22 "https://my.jobstreet.com/jobs?classification=6281&worktype=242&daterange=7&sortmode=ListedDate&page=2",
23 "https://sg.jobstreet.com/jobs-in-accounting/in-Singapore",
24 "https://ph.jobstreet.com/jobs-in-accounting/in-Manila",
25 "https://id.jobstreet.com/jobs-in-accounting/in-Jakarta",
26 "https://my.jobstreet.com/api/jobsearch/v5/search?siteKey=MY-Main&sourcesystem=houston&where=Kuala+Lumpur&keywords=software+engineer&page=1&pageSize=5"
27 ],
28 "proxyConfiguration": {
29 "useApifyProxy": true,
30 "apifyProxyGroups": []
31 },
32 "ignoreFieldsForChanges": []
33};
34
35
36const run = await client.actor("abotapi/jobstreet-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