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": "a1",
14 "company": "Acme",
15 "technology": "Python",
16 "mentions": 24
17 },
18 {
19 "id": "a2",
20 "company": "Acme",
21 "technology": "Rust",
22 "mentions": 12
23 },
24 {
25 "id": "b1",
26 "company": "Beta",
27 "technology": "Java",
28 "mentions": 9
29 }
30 ],
31 "previousItems": [
32 {
33 "id": "a1",
34 "company": "Acme",
35 "technology": "Python",
36 "mentions": 15
37 },
38 {
39 "id": "a2",
40 "company": "Acme",
41 "technology": "Rust",
42 "mentions": 2
43 },
44 {
45 "id": "b1",
46 "company": "Beta",
47 "technology": "Java",
48 "mentions": 11
49 }
50 ]
51};
52
53
54const run = await client.actor("quanmatrix/job-tech-stack-change-intelligence").call(input);
55
56
57console.log('Results from dataset');
58console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
59const { items } = await client.dataset(run.defaultDatasetId).listItems();
60items.forEach((item) => {
61 console.dir(item);
62});
63
64