SEC filings API with original document links
Build a filing catalog that keeps the accession number, reporting context, and original document together.
GET /api/v1/filings returns company filing metadata from SEC submissions data. The default is recent; history=all also traverses the issuer’s referenced supplemental history files. Filter by CIK and form, then follow documentUrl to the original filing.
Make a real request
Create an API key in your account and set SEC_API_KEY in your shell environment. Keep it server-side. These examples call the authenticated production route; the optional Node base URL override is useful for a separate development environment.
cURL
curl --fail-with-body \
"https://sec-api.dev/api/v1/filings?cik=320193&form=10-K&limit=5" \
-H "Authorization: Bearer $SEC_API_KEY"Node.js
// Node.js 22+. Set SEC_API_KEY in your environment.
const key = process.env.SEC_API_KEY;
if (!key) throw new Error("Set SEC_API_KEY first");
const base = process.env.SEC_API_BASE_URL || "https://sec-api.dev";
const response = await fetch(
base + "/api/v1/filings?cik=320193&form=10-K&limit=5",
{ headers: { Authorization: `Bearer ${key}` } }
);
if (!response.ok) throw new Error(`HTTP ${response.status}: ${await response.text()}`);
const payload = await response.json();
console.log(payload.data.map(({accessionNumber, filingDate, documentUrl}) => ({accessionNumber, filingDate, documentUrl})));
console.log(payload.meta);The examples print the actual response; no sample financial values or filing dates are fabricated.
Find the document you actually need
Supply a company CIK, and optionally a form filter such as 10-K, 10-Q, or 8-K. Filtering happens before pagination. Each returned row keeps the accession number with the filing date, report date, primary document name, and original-document URL. A form filter is an exact match: 10-K does not also select 10-K/A. If your workflow needs amendments, request the amended form explicitly and decide how those records should be presented alongside the original filing.
Select coverage before paginating
The endpoint accepts limit and offset. Limit defaults to 25 and ranges from 1 to 100; offset defaults to zero. Follow pagination.nextOffset until it is null when you want to traverse the returned recent dataset. Use nextOffset from the response rather than assuming every page contains the requested number of rows: response-size safeguards can shorten a page. pagination.total describes the filtered dataset for the selected mode. The default history=recent reads the recent submissions set. Opt into history=all to traverse all supplemental files referenced by that issuer’s SEC manifest, subject to safeguards of 100 files and 500,000 rows. A warming response can return 503; retry according to the response guidance. Full coverage means the available referenced files were validated, not every document ever filed with the SEC. Because the source can refresh between requests, offsets are not a snapshot cursor: deduplicate accession numbers and account for entries shifting between pages.
Metadata is a route to the source
The response is a catalog of filings, not extracted filing text. documentUrl is constructed from the source CIK, accession number, and primaryDocument value. Preserve accessionNumber when storing or exporting rows so a result can be reconciled with its source. A missing primary document yields a null document URL; do not replace that with a guessed document name. The isXbrl and isInlineXbrl indicators describe source metadata and do not mean this endpoint has parsed the financial statements inside that document.
Make scope and freshness visible
Inspect meta.historyCoverage together with meta.fetchedAt and meta.stale. The default coverage is recent; all-history coverage is marked full only after the referenced supplemental files have been validated. In all-history mode, retain sourceFiles, snapshotId, and availableDateRange for provenance. Company submissions are normally cached for five minutes. A bounded stale response may be served during a refresh or upstream failure, and that state is labeled. An empty result can mean the selected form is absent from the available recent window. It does not establish that no historical filing exists. This endpoint returns filing metadata. Separate search, section-extraction, insider-ownership, and13F endpoints handle those workflows; retain original document links when interpreting their results.
Fields to keep
| FIELD | HOW TO USE IT |
|---|---|
accessionNumber | Identifier preserved from the SEC filing record. |
form / filingDate / reportDate | Form label, filing date, and reporting date where supplied. |
primaryDocument / documentUrl | Source filename and constructed link to the original filing. |
isXbrl / isInlineXbrl | Filing-format indicators from submissions metadata. |
meta.historyCoverage | recent by default; full after validated history=all traversal. |
Authentication, limits, and errors
Every request uses an Authorization: Bearer header. Missing or revoked credentials return 401. Invalid parameters return 400, account limits return 429, and service or source failures return 5xx. Inspect the status before processing data, respect retry guidance, and avoid unbounded retry loops. API responses include a request ID for troubleshooting. Account allowances are listed on pricing; endpoint limits and response definitions are in the API reference.
Source and implementation boundary
The underlying data comes from SEC submissions API documentation. The public SEC data source can be accessed directly; sec-api.dev adds its documented authentication, caching, response structure, and integration workflow. Source retrieval time describes our cache, not a guarantee of source publication latency. We are independent of the SEC and sec-api.io.