1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "remoteOnly": false,
12 "startUrls": [
13 {
14 "url": "https://www.cake.me/jobs?page=1"
15 }
16 ],
17 "maxItems": 50,
18 "startPage": 1,
19 "includeDetails": false,
20 "requestIntervalMs": 1000,
21 "concurrency": 3,
22 "maxRunSeconds": 3600,
23 "proxyConfiguration": {
24 "useApifyProxy": false
25 },
26 "useProxyFallback": false,
27 "allowDetailOnResidential": false,
28 "residentialMaxMb": 5
29};
30
31
32const run = await client.actor("stone_jadex/cake-me-jobs-scraper").call(input);
33
34
35console.log('Results from dataset');
36console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
37const { items } = await client.dataset(run.defaultDatasetId).listItems();
38items.forEach((item) => {
39 console.dir(item);
40});
41
42