1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "requests": [
12 {
13 "requestId": "plan-1",
14 "intent": "analyze_ownership",
15 "subjects": [
16 {
17 "identifierType": "cik",
18 "identifier": "0000320193"
19 }
20 ],
21 "period": {
22 "from": "2025-01-01",
23 "to": "2026-07-26"
24 },
25 "constraints": {
26 "maximumTotalChargeUsd": "0.050000",
27 "maximumRecords": 1000,
28 "preferExistingPublicActors": true,
29 "requireCompleteCoverage": false
30 }
31 }
32 ],
33 "catalogVersion": "1.0"
34};
35
36
37const run = await client.actor("bb-tradetec/sec-ai-query-planner").call(input);
38
39
40console.log('Results from dataset');
41console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
42const { items } = await client.dataset(run.defaultDatasetId).listItems();
43items.forEach((item) => {
44 console.dir(item);
45});
46
47