Agent-friendly SEC EDGAR CLI for filings and company facts.
npx-friendly native Go runtime (no Node runtime after launch, no Python runtime)- JSON envelope output by default for stable automation
- Strict SEC identity enforcement (
--user-agentorEDGAR_USER_AGENT) - Core commands:
resolvesearch companiescompany searchfilings listfilings getfacts getresearch syncresearch ask
npx edgar-cli --helpLocal development:
go test ./...
node npm/scripts/build-native.cjs
./dist/edgar --help
npm --prefix npm testSEC endpoints require declared automated access identity.
Use either:
export EDGAR_USER_AGENT="Your Name your.email@example.com"Or pass per command:
npx edgar-cli --user-agent "Your Name your.email@example.com" resolve AAPLIf identity is missing, commands fail with IDENTITY_REQUIRED.
# Resolve ticker -> canonical SEC identity mapping
npx edgar-cli --user-agent "Your Name your.email@example.com" resolve AAPL
# Search SEC company/entity names -> CIKs
npx edgar-cli --user-agent "Your Name your.email@example.com" search companies "Space Exploration Technologies"
# List recent 10-K filings
npx edgar-cli --user-agent "Your Name your.email@example.com" filings list --id AAPL --form 10-K --query-limit 5
# Get filing document URL by accession
npx edgar-cli --user-agent "Your Name your.email@example.com" filings get --id AAPL --accession 0000320193-26-000006 --format url
# Get filing converted to Markdown
npx edgar-cli --user-agent "Your Name your.email@example.com" filings get --id AAPL --accession 0000320193-26-000006 --format markdown
# Write raw extracted filing text directly to a file
npx edgar-cli --user-agent "Your Name your.email@example.com" filings get --id AAPL --accession 0000320193-26-000006 --format text --output /tmp/aapl-10q.txt
# Emit raw extracted filing text to stdout instead of a JSON envelope
npx edgar-cli --user-agent "Your Name your.email@example.com" filings get --id AAPL --accession 0000320193-26-000006 --format text --raw
# Get concept data (latest per unit)
npx edgar-cli --user-agent "Your Name your.email@example.com" facts get --id AAPL --taxonomy us-gaap --concept Revenues --latest
# Query explicit local docs (repeat --doc or pass --manifest)
npx edgar-cli research ask "board resignation details" --doc ./cache/nvda-8k.md --top-k 5
# Build a deterministic cached corpus for a ticker/profile
npx edgar-cli --user-agent "Your Name your.email@example.com" research sync --id NVDA --profile core
# Query by ticker against cached corpus (auto-syncs on cache miss)
npx edgar-cli --user-agent "Your Name your.email@example.com" research ask "what changed on the board?" --id NVDA --profile core
# Query latest filing(s) in one shot: discover -> fetch/cache -> search
npx edgar-cli --user-agent "Your Name your.email@example.com" research ask "gross margin drivers" --id AAPL --form 10-Q --latest 1research sync and research ask --id use deterministic filing profiles:
core: latest 1x10-K, latest 3x10-Q, and recent8-K(last 180 days, up to 12)events: recent8-K(last 365 days, up to 24)financials: latest 2x10-Kand latest 6x10-Q
By default, cached corpora are stored in:
$EDGAR_CACHE_DIR(if set), else$XDG_CACHE_HOME/edgar-cli(if set), else~/.cache/edgar-cli
Override per command with --cache-dir.
When using research ask --id, you can also scope discovery directly:
--form <form>to filter filings by form type (e.g.10-Q)--latest <n>to limit selection to the latest N filings after filters
All JSON-mode commands emit:
{
"ok": true,
"command": "resolve",
"provider": "sec",
"data": {},
"error": null,
"meta": {
"timestamp": "2026-02-11T00:00:00Z",
"output_schema": "v1",
"view": "summary"
}
}- This CLI targets SEC-hosted endpoints only in V0.
- Respect SEC fair-access guidance and use a valid identity in your user-agent.
References:
See SECURITY.md for vulnerability reporting guidance.
go test ./...
npm --prefix npm test
node npm/scripts/build-native.cjs