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 "txId": "T1",
14 "politicianFullName": "Member Alpha",
15 "ticker": "NVDA",
16 "txType": "purchase",
17 "txDate": "2026-08-01",
18 "pubDate": "2026-08-20",
19 "amountRange": "$15,001 - $50,000"
20 },
21 {
22 "txId": "T2",
23 "politicianFullName": "Member Beta",
24 "ticker": "NVDA",
25 "txType": "purchase",
26 "txDate": "2026-08-02",
27 "pubDate": "2026-09-25",
28 "amountRange": "$50,001 - $100,000"
29 },
30 {
31 "txId": "T3",
32 "politicianFullName": "Member Alpha",
33 "ticker": "AAPL",
34 "txType": "sale",
35 "txDate": "2026-08-05",
36 "pubDate": "2026-08-15",
37 "amountRange": "$1,001 - $15,000"
38 }
39 ],
40 "previousItems": [
41 {
42 "txId": "T0",
43 "politicianFullName": "Member Alpha",
44 "ticker": "AAPL",
45 "txType": "purchase",
46 "txDate": "2026-07-01",
47 "pubDate": "2026-07-15",
48 "amountRange": "$1,001 - $15,000"
49 }
50 ]
51};
52
53
54const run = await client.actor("quanmatrix/congressional-trades-disclosure-intelligence").call(input);
55
56
57console.log('Results from dataset');
58console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
59const { items } = await client.dataset(run.defaultDatasetId).listItems();
60items.forEach((item) => {
61 console.dir(item);
62});
63
64