1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "schemaVersion": "1.1",
12 "left": [
13 {
14 "signalId": "sig-acme-recall-002",
15 "brandName": "Acme Labs",
16 "eventType": "risk",
17 "severity": "critical",
18 "status": "active",
19 "observedAt": "2026-08-04T13:00:00Z",
20 "sourceUrl": "https://alerts.example.com/acme-recall"
21 },
22 {
23 "signalId": "sig-nike-launch-001",
24 "brandName": "Nike",
25 "eventType": "product_launch",
26 "severity": "high",
27 "status": "active",
28 "observedAt": "2026-08-04T12:00:00Z",
29 "sourceUrl": "https://news.example.com/nike-launch"
30 },
31 {
32 "signalId": "sig-left-only-004",
33 "brandName": "Northstar",
34 "eventType": "review",
35 "severity": "low",
36 "status": "resolved",
37 "observedAt": "2026-02-28T09:00:00Z",
38 "sourceUrl": "https://reviews.example.com/northstar"
39 }
40 ],
41 "right": [
42 {
43 "signalId": "sig-acme-recall-002",
44 "brandName": "Acme Labs",
45 "eventType": "risk",
46 "severity": "high",
47 "status": "active",
48 "observedAt": "2026-08-04T13:00:00Z",
49 "sourceUrl": "https://alerts.example.com/acme-recall-updated"
50 },
51 {
52 "signalId": "sig-nike-launch-001",
53 "brandName": "Nike",
54 "eventType": "product_launch",
55 "severity": "high",
56 "status": "active",
57 "observedAt": "2026-08-04T12:00:00Z",
58 "sourceUrl": "https://news.example.com/nike-launch"
59 },
60 {
61 "signalId": "sig-right-only-003",
62 "brandName": "Contoso",
63 "eventType": "price_change",
64 "severity": "medium",
65 "status": "active",
66 "observedAt": "2026-08-04T14:00:00Z",
67 "sourceUrl": "https://prices.example.com/contoso"
68 }
69 ]
70};
71
72
73const run = await client.actor("zinin/us-brand-signal-merge-report").call(input);
74
75
76console.log('Results from dataset');
77console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
78const { items } = await client.dataset(run.defaultDatasetId).listItems();
79items.forEach((item) => {
80 console.dir(item);
81});
82
83