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": "k1",
14 "skill": "Rust",
15 "role": "Backend Engineer",
16 "company": "Acme",
17 "mentions": 40
18 },
19 {
20 "id": "k2",
21 "skill": "Python",
22 "role": "AI Engineer",
23 "company": "Beta",
24 "mentions": 80
25 },
26 {
27 "id": "k3",
28 "skill": "COBOL",
29 "role": "Developer",
30 "company": "Gamma",
31 "mentions": 5
32 }
33 ],
34 "previousItems": [
35 {
36 "id": "k1",
37 "skill": "Rust",
38 "role": "Backend Engineer",
39 "company": "Acme",
40 "mentions": 12
41 },
42 {
43 "id": "k2",
44 "skill": "Python",
45 "role": "AI Engineer",
46 "company": "Beta",
47 "mentions": 65
48 },
49 {
50 "id": "k3",
51 "skill": "COBOL",
52 "role": "Developer",
53 "company": "Gamma",
54 "mentions": 8
55 }
56 ]
57};
58
59
60const run = await client.actor("quanmatrix/skills-demand-acceleration-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