Skip to main content

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.

Python SDK

The Python SDK is built for research, ETL, notebooks, and backend services that want REST parity without turning every request into a small framework project.

Start here

1

Install the SDK

Add the package to the environment where your notebook, worker, or service will run.
2

Set the API key and base URL

Default to https://api.secapi.ai unless you are testing a local or staging environment.
3

Run one issuer workflow and one semantic investor workflow

Prove both the investor path and the one-call intelligence path before you move on.
pip install omni-datastream-py

What it is good for

Notebooks

Good for research sessions where you need entity resolution, filings, statements, and compact extracted sections quickly.

Research pipelines

Useful when you need benchmarkable workflows with explicit freshness and provenance metadata.

ETL and enrichment

Fit for downstream enrichment services that need Datastream payloads and artifact workflows.

Backend jobs

Works well in recurring workers that need the same contract shape as the public API.

First useful calls

from omni_datastream_py import OmniDatastreamClient

client = OmniDatastreamClient(
    api_key="ods_test_...",
    base_url="https://api.secapi.ai",
)

issuer = client.resolve_entity(ticker="AAPL")
filing = client.latest_filing(ticker="AAPL", form="10-K")
statements = client.all_statements(ticker="AAPL", period="annual", limit=1)
market = client.market_snapshots(symbols=["AAPL"])
macro = client.macro_indicators(country="JP", indicator_key="CPIAUCSL", limit=3)
factors = client.factor_returns(keys=["MKT_US", "QUALITY"], lookback="6m", window="1m")
answer = client.intelligence_query({
    "query": "Give me a recommendation for how to make this portfolio factor neutral.",
    "portfolio": [
        {"symbol": "AAPL", "weight": 0.4},
        {"symbol": "MSFT", "weight": 0.35},
        {"symbol": "NVDA", "weight": 0.25},
    ],
    "responseMode": "compact_json_and_md",
})

Operator paths

artifact = client.create_artifact({
    "ticker": "AAPL",
    "form": "10-K",
    "sectionKey": "item_1a",
    "kind": "markdown_bundle",
})
manifest = client.artifact_manifest(artifact["id"])
observability = client.observability()
If you are caching responses in a notebook or long-running worker, keep the freshness block next to the payload. Otherwise you lose the context that tells you whether a result is still safe to trust.

API Reference

Open the exact wire format behind the Python methods you are using.

Libraries & SDKs

Compare Python with the other runtime surfaces before standardizing.

Benchmark workflows

See how OMNI measures latency, freshness, and workflow parity.