sec-api-dev
v0.1.0
Published
TypeScript/JavaScript client for the sec-api.dev SEC EDGAR API: filings, full-text search, XBRL facts, Form 4, 13F, Form D and FDA catalysts.
Maintainers
Readme
sec-api-dev (JavaScript / TypeScript)
Zero-dependency client for the sec-api.dev SEC EDGAR API, for Node 18+, Bun, Deno and edge runtimes: company lookup, filings, full-text search since 2001, filing text and sections, XBRL facts, parsed Form 3/4/5 and 13F tables, quarterly Form D and insider tables, and an FDA catalyst calendar. Typed responses.
sec-api.dev is independent: not sec-api.io, not affiliated with the SEC.
npm install sec-api-devNo key needed
import { SecApi } from 'sec-api-dev';
const api = new SecApi();
const { data } = await api.demo('filings', 'NVDA'); // 8 demo tickers, 20 requests an hour
for (const f of data) console.log(f.filingDate, f.form, f.accessionNumber);Output on November 15, 2026:
2026-02-25 10-K 0001045810-26-000021
2025-02-26 10-K 0001045810-25-000023
2024-02-21 10-K 0001045810-24-000029With a free key
Get a key at https://sec-api.dev/sign-up (100 requests a month, no card) and set SEC_API_KEY on the server.
Never ship the key to a browser.
import { SecApi, SecApiError } from 'sec-api-dev';
const api = new SecApi(); // reads process.env.SEC_API_KEY
const [apple] = (await api.companies('AAPL', { limit: 1 })).data;
const tenKs = await api.filings(apple.cik, { form: '10-K', limit: 3 });
const hits = await api.search('"substantial doubt"', { form: '10-Q', from: '2026-11-01', to: '2026-11-12' });
const revenue = await api.facts(apple.cik, { taxonomy: 'us-gaap', concept: 'RevenueFromContractWithCustomerExcludingAssessedTax', unit: 'USD' });
const risks = await api.extract({ cik: apple.cik, accession: '0000320193-26-000026', document: 'aapl-20260926.htm', form: '10-K', section: '1A' });
const berkshire = await api.holdings('1067983', '0001193125-26-352200', { limit: 5 });
const buys = await api.insiderTransactions({ period: '2026q3', transactionCode: 'P', limit: 10 });
for await (const f of api.pages((p) => api.filings(apple.cik, { form: '8-K', ...p }))) console.log(f.accessionNumber);
try {
await api.search('"going concern"');
} catch (e) {
if (e instanceof SecApiError) console.log(e.status, e.code, e.upgradeUrl);
}Methods map one to one to https://sec-api.dev/openapi.json: companies, company, filings, search,
filingIndex, documents, extract, facts, financialSeries, xbrlInstance, insiderTrades,
insiderTransactions, holdings, offerings, biotechCalendar, biotechEvents, biotechCompany,
biotechRunway, plus the keyless demo and fdaCalendar. Docs: https://sec-api.dev/docs. Plans:
https://sec-api.dev/pricing.
Tests
npm test # offline, against a local stub server (Node 22.6+ runs the .ts tests directly)
SEC_API_LIVE=1 npm test # also calls the real public demo
npm run build # emits dist/ for publishingOperated by Stunning Couches LLC. MIT licence. Not investment advice.
