1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "currentItems": [
12 {
13 "id": "j1",
14 "company": "Acme",
15 "role": "AI Engineer",
16 "location": "Austin",
17 "openings": 18
18 },
19 {
20 "id": "j2",
21 "company": "Acme",
22 "role": "AI Engineer",
23 "location": "Austin",
24 "openings": 14
25 },
26 {
27 "id": "j3",
28 "company": "Beta",
29 "role": "Data Engineer",
30 "location": "Boston",
31 "openings": 6
32 }
33 ],
34 "previousItems": [
35 {
36 "id": "j1",
37 "company": "Acme",
38 "role": "AI Engineer",
39 "location": "Austin",
40 "openings": 6
41 },
42 {
43 "id": "j3",
44 "company": "Beta",
45 "role": "Data Engineer",
46 "location": "Boston",
47 "openings": 5
48 }
49 ]
50};
51
52
53const run = await client.actor("quanmatrix/employer-hiring-concentration-risk-intelligence").call(input);
54
55
56console.log('Results from dataset');
57console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
58const { items } = await client.dataset(run.defaultDatasetId).listItems();
59items.forEach((item) => {
60 console.dir(item);
61});
62
63