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 "releaseId": "p1",
14 "company": "Acme Corp",
15 "headline": "Acme expands AI platform in Europe",
16 "topic": "AI Expansion",
17 "geography": "Europe",
18 "importanceScore": 95,
19 "publishedAt": "2026-09-01"
20 },
21 {
22 "releaseId": "p2",
23 "company": "Acme Corp",
24 "headline": "Acme launches enterprise agent suite",
25 "topic": "AI Agents",
26 "geography": "Global",
27 "importanceScore": 90,
28 "publishedAt": "2026-09-06"
29 },
30 {
31 "releaseId": "p3",
32 "company": "Beta Inc",
33 "headline": "Beta opens new logistics hub",
34 "topic": "Supply Chain",
35 "geography": "US",
36 "importanceScore": 72,
37 "publishedAt": "2026-09-08"
38 }
39 ],
40 "previousItems": [
41 {
42 "releaseId": "p0",
43 "company": "Acme Corp",
44 "headline": "Acme updates legacy analytics platform",
45 "topic": "Analytics",
46 "geography": "US",
47 "importanceScore": 60,
48 "publishedAt": "2026-06-01"
49 },
50 {
51 "releaseId": "p3",
52 "company": "Beta Inc",
53 "headline": "Beta expands regional delivery",
54 "topic": "Supply Chain",
55 "geography": "US",
56 "importanceScore": 68,
57 "publishedAt": "2026-06-10"
58 }
59 ]
60};
61
62
63const run = await client.actor("quanmatrix/press-release-narrative-shift-intelligence").call(input);
64
65
66console.log('Results from dataset');
67console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
68const { items } = await client.dataset(run.defaultDatasetId).listItems();
69items.forEach((item) => {
70 console.dir(item);
71});
72
73