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 "https://www.charityjob.co.uk/jobs?workplace=on-site&workplace=hybrid&employerType=direct-employer"
13 ],
14 "cause": [
15 "human-rights"
16 ],
17 "workplace": [
18 "hybrid"
19 ],
20 "contractType": [
21 "full-time"
22 ],
23 "employerType": "direct-employer",
24 "minSalary": 30000,
25 "maxSalary": 60000,
26 "proxy": {
27 "useApifyProxy": true,
28 "apifyProxyGroups": [
29 "RESIDENTIAL"
30 ]
31 }
32};
33
34
35const run = await client.actor("memo23/charityjob-scraper").call(input);
36
37
38console.log('Results from dataset');
39console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
40const { items } = await client.dataset(run.defaultDatasetId).listItems();
41items.forEach((item) => {
42 console.dir(item);
43});
44
45