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 "jobId": "J1",
14 "company": "Acme",
15 "role": "Data Engineer",
16 "employmentType": "Permanent",
17 "conversionWeight": 1,
18 "date": "2026-09-10"
19 },
20 {
21 "jobId": "J2",
22 "company": "Acme",
23 "role": "Data Engineer",
24 "employmentType": "Permanent",
25 "conversionWeight": 1,
26 "date": "2026-09-10"
27 },
28 {
29 "jobId": "J3",
30 "company": "Beta",
31 "role": "Designer",
32 "employmentType": "Contract",
33 "conversionWeight": 0,
34 "date": "2026-09-10"
35 }
36 ],
37 "previousItems": [
38 {
39 "jobId": "P1",
40 "company": "Acme",
41 "role": "Data Engineer",
42 "employmentType": "Contract",
43 "conversionWeight": 0,
44 "date": "2026-08-01"
45 },
46 {
47 "jobId": "P2",
48 "company": "Beta",
49 "role": "Designer",
50 "employmentType": "Contract",
51 "conversionWeight": 0,
52 "date": "2026-08-01"
53 }
54 ]
55};
56
57
58const run = await client.actor("quanmatrix/contractor-employee-conversion-intelligence").call(input);
59
60
61console.log('Results from dataset');
62console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
63const { items } = await client.dataset(run.defaultDatasetId).listItems();
64items.forEach((item) => {
65 console.dir(item);
66});
67
68