/api/v1/scrapping/pdfDownload filing as PDF, HTML, or plain text.
Download filing as PDF, HTML, or plain text. Auto-detects CIK from the SEC URL (or accepts an explicit `cik` body field as fallback). The selected CIK must be a string containing only ASCII digits (0-9); invalid company numbers and paths outside the download directory return HTTP 400. iXBRL viewer links (containing `/ix?doc=`) are normalized server-side.
Why use this
Common use case
Returns the requested file directly. Save the response bytes instead of parsing JSON. The server checks the caller and existing download quota before creating a directory or removing a cached file. Company numbers must contain only ASCII digits, and resolved document paths must remain in the download directory.
Parameters
| Name | In | Required | Default | Allowed | Description | Example |
|---|---|---|---|---|---|---|
| link | body | required | — | — | Filing document URL. iXBRL viewer links containing /ix?doc= are normalized to the underlying document URL. | https://www.sec.gov/Archives/edgar/data/320193/000032019324000123/aapl-20240928.htm |
| cik | body | optional | — | — | Company number as a string of ASCII digits (0-9), required only when link contains no /data/<digits>/ segment. Leading zeroes are preserved. A company number extracted from link takes precedence over this fallback. | 320193 |
| type | body | optional | — | Output format: pdf renders the document; html and txt save the fetched source content with that extension. The txt option does not strip HTML markup. | ||
| fileName | body | optional | — | — | Attachment filename. The selected output extension is appended when missing. Defaults to the internal document filename. | AAPL-10K-2025 |
Response schema
| Field | Type | Nullable | Description |
|---|---|---|---|
| (binary) | string | no | File bytes returned directly as an attachment, with Content-Type determined by type and Content-Disposition containing the download name. There is no JSON success envelope or signed download URL. |
Errors
| Status | Label | Description |
|---|---|---|
| 400 | Invalid or missing input, an escaping download path, or document generation failure. | |
| 403 | The existing monthly download quota is exceeded. |
Code samples
curl -X POST "https://api.finradar.ai/api/v1/scrapping/pdf" \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"link": "https://www.sec.gov/Archives/edgar/data/320193/000032019324000123/aapl-20240928.htm",
"cik": "320193",
"type": "pdf",
"fileName": "AAPL-10K-2025"
}'Generate an API key in /account/credentials to run live queries (literal YOUR_API_KEY placeholder shown until then).