1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "searchTerms": [
12 "all jobs"
13 ],
14 "startUrls": [
15 {
16 "url": "https://remoteok.com/remote-react-jobs"
17 },
18 {
19 "url": "https://remoteok.com/remote-dev-jobs.json?order_by=salary"
20 },
21 {
22 "url": "https://remoteok.com/"
23 },
24 {
25 "url": "https://remoteok.com/api?tag=python"
26 },
27 {
28 "url": "https://remoteok.com/remote-python-jobs?page=2"
29 },
30 {
31 "url": "https://remoteok.com/remote-jobs?search=python"
32 },
33 {
34 "url": "https://www.remoteok.com/remote-dev-jobs"
35 }
36 ],
37 "proxy": {
38 "useApifyProxy": true,
39 "apifyProxyGroups": []
40 }
41};
42
43
44const run = await client.actor("abotapi/remoteok-com-scraper").call(input);
45
46
47console.log('Results from dataset');
48console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
49const { items } = await client.dataset(run.defaultDatasetId).listItems();
50items.forEach((item) => {
51 console.dir(item);
52});
53
54