Documentation Index
Fetch the complete documentation index at: https://docs.secapi.ai/llms.txt
Use this file to discover all available pages before exploring further.
POST /v1/analytics/query
Run a tenant-safe analytical query over supported Datastream history datasets without exposing raw SQLAudience: application and coding agent.
Supported datasets
| Dataset | Description | Dimensions | Measures |
|---|---|---|---|
filings | SEC filing history | year, form, ticker | count |
sections_items | Filing section extracts | year, form, ticker | count |
segmented_revenues | XBRL segmented revenue data | year, ticker | count, sum_value |
ownership | Institutional ownership filings (13F, 13D/G) | year, form, ticker | count |
enforcement | SEC enforcement actions | year, source_type | count |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
dataset | string | Yes | One of filings, sections_items, segmented_revenues, ownership, enforcement |
dimensions | string[] | Yes | 1-2 dimensions to group by: year, form, ticker, source_type |
measures | string[] | No | Aggregation measures: count (default), sum_value |
filters | object | No | Filter by ticker, cik, or form |
timeWindow | object | No | { from?: string, to?: string } date range filter |
sort | object | No | { field: string, direction?: "asc" | "desc" } |
limit | number | No | Max rows returned (1-200, default 50) |
Canonical metadata
requestIdtraceparentdatasetdimensionsfilterstimeWindowsortrowCountwarningsprovenance
Example request
Example response
Give this prompt to your agent
Failure posture
- treat non-2xx responses as contract-aware failures, not free-form errors
- preserve
requestIdandtraceparentin logs and downstream reports - if provenance or freshness metadata is present, return it unchanged so trust is not lost in the handoff