1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "companies": [
12 {
13 "name": "Stripe",
14 "ats_type": "greenhouse",
15 "ats_id": "stripe"
16 }
17 ],
18 "notify": {
19 "slack_webhook_url": "https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX",
20 "webhook_url": "",
21 "email": {
22 "smtp_host": "",
23 "smtp_port": 465,
24 "ssl": true,
25 "account": "",
26 "password": "",
27 "to": [
28 "you@yourcompany.com"
29 ]
30 }
31 }
32};
33
34
35const run = await client.actor("yongpub/hiring-intelligence-monitor").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