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": "entity-a",
14 "entity": "Alpha",
15 "category": "growth",
16 "value": 132,
17 "date": "2026-09-01",
18 "source": "current"
19 },
20 {
21 "id": "entity-b",
22 "entity": "Beta",
23 "category": "risk",
24 "value": 78,
25 "date": "2026-09-01",
26 "source": "current"
27 },
28 {
29 "id": "entity-c",
30 "entity": "Gamma",
31 "category": "new",
32 "value": 55,
33 "date": "2026-09-01",
34 "source": "current"
35 }
36 ],
37 "previousItems": [
38 {
39 "id": "entity-a",
40 "entity": "Alpha",
41 "category": "growth",
42 "value": 100,
43 "date": "2026-08-01",
44 "source": "previous"
45 },
46 {
47 "id": "entity-b",
48 "entity": "Beta",
49 "category": "stable",
50 "value": 92,
51 "date": "2026-08-01",
52 "source": "previous"
53 }
54 ]
55};
56
57
58const run = await client.actor("quanmatrix/keyword-cannibalization-seo-collision-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