Read SEC EDGAR filings and XBRL financials by ticker. No API key, no registration.
npx sec-edgar filings AAPL --forms 10-K
npx sec-edgar financials NVDA revenue --limit 82025-10-31 10-K 10-K
https://www.sec.gov/Archives/edgar/data/320193/000032019325000079/aapl-20250927.htm
The SEC publishes excellent APIs and asks nothing but that you identify yourself. Two things make them awkward to use directly, and this library fixes both:
- Everything is keyed by CIK, a ten-digit identifier nobody remembers. This resolves tickers
against the SEC's own list — 10,000+ companies — so
AAPLworks. - Financial figures are XBRL tags like
NetIncomeLossandCashAndCashEquivalentsAtCarryingValue. This maps plain names onto the ones people actually ask for, and still accepts a raw tag when you know the one you want.
It also spaces requests out, because the SEC asks for no more than ten a second.
npm install sec-edgar-apiNode 20 or newer. No dependencies.
import { filings, financials, options } from "sec-edgar-api";
// The SEC asks clients to identify themselves. Set a contact before doing anything real.
options.userAgent = "my-research-tool/1.0 (me@example.com)";
const annual = await filings("AAPL", { forms: ["10-K"], since: "2020-01-01" });
// → [{ form: "10-K", filedAt: "2025-10-31", documentUrl: "https://www.sec.gov/Archives/...", ... }]
const revenue = await financials("NVDA", "revenue", { limit: 8 });
// → [{ fiscalYear: 2026, fiscalPeriod: "FY", value: 215938000000, unit: "USD", form: "10-K", ... }]Newest first. Every row carries the company (name, tickers, industry, state of incorporation), the
filing (form, filedAt, reportDate, accession number, whether it has XBRL) and documentUrl
— a direct link to the document itself, so the next step in a pipeline needs no path arithmetic.
One figure across every period a company reported it, newest first.
Shorthands: revenue · netIncome · assets · liabilities · equity · cash · eps ·
operatingIncome · researchAndDevelopment · sharesOutstanding
A figure a company never reported returns [] rather than throwing — that distinction matters in
financial data, so it is preserved rather than flattened to a zero.
Returns the padded CIK, or null if it is neither a known ticker nor a CIK.
sec-edgar filings <ticker|cik> [--forms 10-K,10-Q] [--since 2024-01-01] [--limit 20] [--json]
sec-edgar financials <ticker|cik> <figure> [--limit 8] [--json]Set a contact with SEC_EDGAR_UA:
SEC_EDGAR_UA="my-tool/1.0 (you@example.com)" npx sec-edgar filings TSLA- Requests are spaced to stay well under the SEC's ten-per-second guidance.
- The ticker list is fetched once and reused.
- US registrants only — EDGAR covers companies that file with the SEC.
- XBRL figures exist from around 2009, and only for companies that tag them.
Revenuesis one of several revenue tags in US GAAP. A company using another will return nothing for therevenueshorthand; pass the exact tag when that matters.
The same code runs as a hosted, monitored Actor on Apify, with scheduling, storage and CSV export: SEC EDGAR Filings & Financials.
Independent library. Not affiliated with or endorsed by the U.S. Securities and Exchange Commission. Data comes from the SEC's publicly documented EDGAR APIs.
MIT