SEC API provides programmatic access to SEC filings, issuer records, and structured statements. Install the CLI with Homebrew for terminal research, reproducible scripts, and agent tools.
brew tap secapi-ai/tap
brew install secapiOr install it directly without a separate tap command:
brew install secapi-ai/tap/secapiConfirm the installed command and see the available commands:
secapi --helpCreate an API key in the SEC API dashboard, then set it in your shell. The CLI reads SECAPI_API_KEY from the environment, keeping credentials out of command arguments and shell history.
For CI and agent workflows, inject the value through the platform's masked-secret environment handling. When a wrapper must supply the value itself, read it noninteractively from standard input rather than placing it in a command argument; do not echo the key or include it in logs or prompts.
export SECAPI_API_KEY="your_api_key"
secapi entities resolve --ticker AAPL
secapi filings latest --ticker AAPL --form 10-K
secapi statements get --ticker AAPL --statement all --period annual --limit 1The commands return structured issuer data, the latest matching filing, and annual statements. Keep filing URLs, accession numbers, and request IDs with any research you carry forward; a later filing can change a latest-filing result.
secapi health
secapi filings latest --help
secapi agent-contextsecapi health checks the API origin without authentication. Command help runs locally, and agent-context prints a machine-readable command inventory for an integration or agent.
brew update
brew upgrade secapibrew uninstall secapi
brew untap secapi-ai/tapOnly run brew untap secapi-ai/tap when you no longer use any formulae from this tap.
This formula supports Homebrew on macOS and Linux. It installs Node.js as a dependency. secapi is the primary executable; omni-sec remains available as a compatibility alias.