# GET /v3/filings/{accession}/documents/{document}/pdf

Render one document as a PDF.

Renders the stored document on US Letter pages, scaled to fit the page width. HTML keeps its layout and the filing's own images. Text, XML, and JSON are shown in a fixed-width font with their line breaks. Nothing outside the filing is loaded, and scripts do not run.

**API key:** required. See [Authentication](https://www.secblast.com/docs/authentication).

**Group:** [Filings](https://www.secblast.com/docs/reference#filings)

## Try it

Send this route from the page, signed in with your key, or from the [console](https://www.secblast.com/console).

## Parameters

| Name | In | Type | Required | Default | Description |
|---|---|---|---|---|---|
| `accession` | path | string | yes |   | Accession number: the SEC's ID for a filing, such as 0001829126-26-010431. The dashes are optional. |
| `document` | path | string | yes |   | Document sequence number (1, 2, ...) or file name. |

## Details

**Headers:** X-Pdf-Cache (hit, miss, or joined) and X-Pdf-Documents (the sequence number). Supports ETag with If-None-Match (304). The PDF's size counts toward your transfer allowance.

**Errors:** a render that takes too long answers 503 pdf_rendering with Retry-After. The render goes on; retry after the delay to get it from the cache. Images, PDFs, ZIP files, and spreadsheets answer 422 not_renderable; get their bytes from the document URL.

## Responses

| Status | Body | Description |
|---|---|---|
| `200` | binary (`application/pdf`) | The PDF. Headers: `Content-Disposition`, `ETag`, `X-Pdf-Cache`, `X-Pdf-Documents`. |
| `304` | none | Not modified (If-None-Match matched the ETag). |
| `400` | [Problem](https://www.secblast.com/docs/reference/schemas#schema-problem) (`application/problem+json`) | Invalid or unknown parameter. |
| `401` | [Problem](https://www.secblast.com/docs/reference/schemas#schema-problem) (`application/problem+json`) | Missing, invalid, or inactive API key (code unauthorized), or a refused access token (code invalid_token: malformed, unknown key, bad signature, expired, wrong issuer or audience, revoked grant). WWW-Authenticate names the protected-resource metadata (RFC 9728). |
| `404` | [Problem](https://www.secblast.com/docs/reference/schemas#schema-problem) (`application/problem+json`) | Not found. |
| `422` | [Problem](https://www.secblast.com/docs/reference/schemas#schema-problem) (`application/problem+json`) | not_renderable: the document is not HTML, text, XML, or JSON (an image, PDF, ZIP, or spreadsheet; member document: its URL), or the filing has no such document; pdf_failed (member reason render_timeout, render_failed, or output_too_large): the renderer could not render it within its limits (the same request is refused for about 10 minutes); document_too_large (members document_bytes and limit): larger than the renderer takes. |
| `429` | [Problem](https://www.secblast.com/docs/reference/schemas#schema-problem) (`application/problem+json`) | The credential's organization (its key, for a legacy key) already has 3 PDF renders in progress (code rate_limited, reason pdf_concurrency, Retry-After: 2); or the plan's rate or quota limits (code rate_limited / quota_exceeded). |
| `503` | [Problem](https://www.secblast.com/docs/reference/schemas#schema-problem) (`application/problem+json`) | pdf_rendering (Retry-After): the PDF was not finished within the request's time; it goes on, and the same request after the delay is answered from the cache. pdf_busy (Retry-After): the renderer's queue is full. pdf_unavailable: the renderer cannot be reached (Retry-After) or this server has none; or db_unavailable. |
| `default` | [Problem](https://www.secblast.com/docs/reference/schemas#schema-problem) (`application/problem+json`) | Any other error (405, 500, 504). |

## Response body

A `200` carries the stored bytes, with the content type of the document.

## Example request

```python
import os
import requests

r = requests.get(
    "https://api.secblast.com/v3/filings/0001829126-26-010431/documents/1/pdf",
    headers={"Authorization": f"Bearer {os.environ['SECBLAST_API_KEY']}"},
    timeout=30,
)
r.raise_for_status()
print(r.json())
```

## More in Filings

Previous: [`GET /v3/filings/{accession}/documents/{document}`](https://www.secblast.com/docs/reference/get-filings-accession-documents-document) · Next: [`GET /v3/filings/{accession}/events`](https://www.secblast.com/docs/reference/get-filings-accession-events)
