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