1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "mode": "items",
12 "items": [
13 {
14 "vendorName": "Acme Payments",
15 "source": "Statuspage",
16 "severity": "major outage",
17 "status": "resolved",
18 "incidentTitle": "Checkout API outage",
19 "description": "Checkout API returned elevated 500 errors. Payments and webhooks were delayed for enterprise customers.",
20 "components": [
21 "Checkout API",
22 "Webhooks"
23 ],
24 "startedAt": "2026-07-06T10:00:00.000Z",
25 "resolvedAt": "2026-07-06T12:45:00.000Z",
26 "incidentUrl": "https://status.example/incidents/acme-checkout-api"
27 },
28 {
29 "vendorName": "GrowthStack",
30 "source": "Instatus",
31 "severity": "scheduled maintenance",
32 "status": "scheduled",
33 "incidentTitle": "Database migration maintenance",
34 "description": "Scheduled database migration may cause dashboard latency for 30 minutes.",
35 "components": [
36 "Database",
37 "Dashboard"
38 ],
39 "startedAt": "2026-07-08T02:00:00.000Z",
40 "resolvedAt": "2026-07-08T02:30:00.000Z",
41 "incidentUrl": "https://status.example/incidents/growthstack-db-maintenance"
42 },
43 {
44 "vendorName": "Acme Payments",
45 "source": "Statuspage",
46 "severity": "degraded performance",
47 "status": "investigating",
48 "incidentTitle": "Webhook delivery delays",
49 "description": "Webhook delivery is delayed for API customers in EU region. Engineers are investigating elevated queue latency.",
50 "components": [
51 "Webhooks",
52 "API",
53 "EU region"
54 ],
55 "startedAt": "2026-07-07T09:15:00.000Z",
56 "incidentUrl": "https://status.example/incidents/acme-webhook-delays"
57 }
58 ],
59 "yourProduct": "Reliable payment orchestration platform for SaaS teams that need resilient checkout, webhooks, and customer communication",
60 "targetVendors": [
61 "Acme Payments",
62 "GrowthStack"
63 ],
64 "targetSegments": [
65 "enterprise SaaS",
66 "customer success",
67 "RevOps"
68 ],
69 "criticalComponents": [
70 "checkout",
71 "payments",
72 "webhooks",
73 "api",
74 "auth"
75 ],
76 "scrapedAt": "2026-07-07T00:00:00.000Z"
77};
78
79
80const run = await client.actor("rotvuvo/status-page-incident-trigger-scorer").call(input);
81
82
83console.log('Results from dataset');
84console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
85const { items } = await client.dataset(run.defaultDatasetId).listItems();
86items.forEach((item) => {
87 console.dir(item);
88});
89
90