# SEC AI Query Planner (`bb-tradetec/sec-ai-query-planner`) Actor

Translate controlled SEC research intents into explicit, dependency-aware, cost-bounded client execution plans.

- **URL**: https://apify.com/bb-tradetec/sec-ai-query-planner.md
- **Developed by:** [BB](https://apify.com/bb-tradetec) (community)
- **Categories:** Developer tools, Automation
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 query plans

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## SEC AI Query Planner

Creates a deterministic, structured client execution plan for one to twenty controlled SEC Complete Data Suite intents. It does not execute the plan, start another Actor, access SEC, use an LLM, or accept free text.

Use canonical CIK, ticker, accession, or series IDs with a closed period and a stated USD budget. Output records are `secAiRunPlan`; every step includes the actor input, record contract, availability, fallback disclosure, and minimum/maximum published plan charge. `executionPolicy` is always `clientExecutes`.

The bundled catalog is a build-time projection. A capability not currently public produces an explicit `CAPABILITY_NOT_AVAILABLE` error rather than an invented plan. The planner is not investment, legal, or compliance advice.

# Actor input Schema

## `requests` (type: `array`):

One to twenty controlled Suite intents with exact subjects, period, and cost constraints.

## `catalogVersion` (type: `string`):

Version of the bundled, network-free Suite capability projection.

## `maxResults` (type: `integer`):

Hard number of plan records returned in one page.

## `maxSourceRequests` (type: `integer`):

Reserved local manifest-catalog budget; no network request is made.

## `maxDownloadBytes` (type: `integer`):

Reserved local catalog budget; no remote bytes are downloaded.

## `outputSchemaVersion` (type: `string`):

Version of the deterministic plan-record contract.

## `outputMode` (type: `string`):

Full or compact plan metadata.

## `cursor` (type: `string`):

Opaque cursor from the preceding SUMMARY; omit for the first page.

## `queries` (type: `array`):

Reserved for the shared hard-limit contract. The runtime rejects this field; use requests.

## Actor input object example

```json
{
  "catalogVersion": "1.0",
  "maxResults": 20,
  "maxSourceRequests": 1,
  "maxDownloadBytes": 1048576,
  "outputSchemaVersion": "1.0",
  "outputMode": "full"
}
```

# Actor output Schema

## `plans` (type: `string`):

No description

## `summary` (type: `string`):

No description

## `errors` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("bb-tradetec/sec-ai-query-planner").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("bb-tradetec/sec-ai-query-planner").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call bb-tradetec/sec-ai-query-planner --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=bb-tradetec/sec-ai-query-planner",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/JGrd6eHsef5SQ7bwr/builds/r5j25hueqmhp5xPzj/openapi.json
