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": "s1",
14 "role": "AI Engineer",
15 "company": "Acme",
16 "location": "Austin",
17 "salaryMid": 185000
18 },
19 {
20 "id": "s2",
21 "role": "AI Engineer",
22 "company": "Beta",
23 "location": "Austin",
24 "salaryMid": 178000
25 },
26 {
27 "id": "s3",
28 "role": "Data Engineer",
29 "company": "Gamma",
30 "location": "Boston",
31 "salaryMid": 150000
32 }
33 ],
34 "previousItems": [
35 {
36 "id": "s1",
37 "role": "AI Engineer",
38 "company": "Acme",
39 "location": "Austin",
40 "salaryMid": 160000
41 },
42 {
43 "id": "s2",
44 "role": "AI Engineer",
45 "company": "Beta",
46 "location": "Austin",
47 "salaryMid": 165000
48 },
49 {
50 "id": "s3",
51 "role": "Data Engineer",
52 "company": "Gamma",
53 "location": "Boston",
54 "salaryMid": 151000
55 }
56 ]
57};
58
59
60const run = await client.actor("quanmatrix/salary-band-drift-role-intelligence").call(input);
61
62
63console.log('Results from dataset');
64console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
65const { items } = await client.dataset(run.defaultDatasetId).listItems();
66items.forEach((item) => {
67 console.dir(item);
68});
69
70