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": "c1",
14 "vendor": "Acme SaaS",
15 "customer": "Northwind",
16 "industry": "Retail",
17 "useCase": "AI support",
18 "proofScore": 92,
19 "publishedAt": "2026-09-01"
20 },
21 {
22 "id": "c2",
23 "vendor": "Acme SaaS",
24 "customer": "Contoso",
25 "industry": "Finance",
26 "useCase": "Fraud analytics",
27 "proofScore": 85,
28 "publishedAt": "2026-09-05"
29 },
30 {
31 "id": "c3",
32 "vendor": "Beta Cloud",
33 "customer": "Fabrikam",
34 "industry": "Manufacturing",
35 "useCase": "Data platform",
36 "proofScore": 76,
37 "publishedAt": "2026-09-07"
38 }
39 ],
40 "previousItems": [
41 {
42 "id": "c1",
43 "vendor": "Acme SaaS",
44 "customer": "Northwind",
45 "industry": "Retail",
46 "useCase": "AI support",
47 "proofScore": 80,
48 "publishedAt": "2026-06-01"
49 },
50 {
51 "id": "c4",
52 "vendor": "Acme SaaS",
53 "customer": "OldCo",
54 "industry": "Media",
55 "useCase": "Automation",
56 "proofScore": 65,
57 "publishedAt": "2026-04-01"
58 }
59 ]
60};
61
62
63const run = await client.actor("quanmatrix/b2b-case-study-win-loss-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