/api/v1/sec/filings/{accession_number}/htmlGet the primary document's HTML content by accession number.
Get the primary document's HTML content by accession number. Returns the full raw HTML of the main filing document (e.g. the 10-K, 8-K body, or — for `13F-HR` / `13F-HR/A` — the INFORMATION TABLE with positions, not the cover page). For XBRL filings, automatically resolves through the SEC viewer to the actual inline XBRL document.
Why use this
Common use case
One-call shortcut to the primary filing document's HTML body. Auto-resolves SEC's /ix?doc= inline-XBRL viewer wrapper to the underlying tagged HTML — so calls like ?accession=0000320193-25-000123 return the actual 10-K body, not the viewer chrome. 13F-HR / 13F-HR/A special-case (since v3.37.1, PR #295): these filings have multiple documents in the same accession folder — the cover page (primary_doc.xml, Form 13F front matter) plus the actual positions in a separate XML file (xslForm13F_X02/<infotable>.xml). The endpoint now returns the INFORMATION TABLE (positions) for 13F-HR / 13F-HR/A, not the cover page — the XSL-rendered URL is preferred so SEC's server-side XSLT returns styled HTML with the COLUMN 1-8 position headers. Pre-fix cached cover pages are detected on read (title contains FORM 13F COVER PAGE and not FORM 13F INFORMATION TABLE) and re-fetched automatically; no client action required. The server-side _fix_sec_html post-processor strips <noscript> warnings and rewrites relative URLs to absolute https://www.sec.gov/... — the HTML is renderable in a browser outside sec.gov without broken images or stylesheets. Returns Content-Type: text/html, NOT JSON — most clients will need to set Accept: text/html or read response.text() rather than response.json(). Returns 404 with a JSON error body when the accession is unknown OR when the filing has no extractable HTML (some pre-2001 filings are TXT-only — for those use GET /api/v1/sec/document?url=... with the .txt URL from the filing's all_links). For specific exhibits or data files within a filing, use the per-URL fetcher. For surgical item-level extraction (e.g. just Item 1A Risk Factors), use GET /api/v1/scrapping/extractor instead.
Parameters
| Name | In | Required | Default | Allowed | Description | Example |
|---|---|---|---|---|---|---|
| accession_number | path | required | — | — | SEC accession number in 18-char dashed format `XXXXXXXXXX-YY-NNNNNN`. Returns 404 with a JSON error body when the accession is not in the local index (or has no extractable HTML — e.g. some pre-2001 filings are TXT-only). | 0000320193-25-000123 |
| offset | query | optional | 0 | — | Byte offset (UTF-8) at which to start the returned slice. Combine with `length`/`max_bytes` to page through a large document instead of pulling it whole. Omit (with no `length`/`max_bytes`) to get the full document — the default, unchanged behaviour. | 0 |
| length | query | optional | — | — | Max number of UTF-8 bytes to return starting at `offset`. Alias of `max_bytes` (if both are given the smaller wins). A raw 10-K can be tens of MB; agents should bound the response (e.g. 200000) and page via `offset` to avoid context/token blow-up. When the response is sliced, truncation is reported in the response HEADERS (`X-Content-Total-Bytes`, `X-Content-Offset`, `X-Content-Returned-Bytes`, `X-Content-Truncated`) — the body stays valid HTML. | 200000 |
| max_bytes | query | optional | — | — | Alias of `length` — max UTF-8 bytes to return from `offset`. Provided for clients that think in terms of a hard response-size cap. | 200000 |
Response schema
| Field | Type | Nullable | Description |
|---|---|---|---|
| (body) | string | no | Raw filing HTML — UTF-8 encoded `text/html` body. NOT a JSON envelope (this endpoint returns the document body directly). Server-side post-processing strips `<noscript>` blocks (the SEC "Javascript required" warning) and rewrites relative `href`/`src` URLs to absolute `https://www.sec.gov/...` — so the HTML can be rendered in a browser outside sec.gov without broken assets. Length ranges from 50 KB (Form 4) to 2 MB+ (large 10-K filings). |
| (headers).Content-Type | string | no | Always `text/html`. Distinguishes this endpoint from JSON-returning siblings — your client must accept HTML responses, not assume JSON. |
Sample response
Errors
| Status | Label | Description |
|---|---|---|
| 200 | OK | Request succeeded. |
| 400 | Bad Request | Invalid query, body, or path parameter. |
| 401 | Unauthorized | Missing or invalid Authorization header / api_Token. |
| 402 | Payment Required | Insufficient token balance for this call. Top up |
| 429 | Too Many Requests | Rate limit exceeded for your tier (see /pricing for tier limits). Tier limits |
| 500 | Server Error | Unexpected server-side failure. Retry with backoff; report if persistent. |
Code samples
curl "https://api.finradar.ai/api/v1/sec/filings/{accession_number}/html?api_Token=YOUR_API_KEY" \
-H "Authorization: Bearer YOUR_JWT_TOKEN"Generate an API key in /account/credentials to run live queries (literal YOUR_API_KEY placeholder shown until then).