Filing search and retrieval
PDF Generator
https://api.sec-api.io/filing-reader?url={url}Convert any SEC EDGAR filing or exhibit into a PDF file. HTML, XML and text documents of every EDGAR form type are supported, and the PDF preserves the original formatting, including images and tables.
Authentication
Send the API key either as a header or as a query parameter. The header is preferred; the query parameter exists for cases where a header cannot be set, such as opening a URL directly in a browser.
Authorization: required header
The API key on its own. Do not prefix it with Bearer or any other word.
Example Authorization: YOUR_API_KEY
token: optional query parameter
The API key, appended to the URL. Use this only when a header is not possible.
Appended to the URL as a query string.
url: required string
URL of the filing or exhibit under sec.gov/Archives. All file types are supported: HTML, XML and TXT. EDGAR links inline XBRL filings through a viewer URL that starts with /ix?doc=. That viewer page is not the file itself, so delete the /ix?doc= part before you pass the URL to the API.
Example https://www.sec.gov/Archives/edgar/data/320193/000032019323000106/aapl-20230930.htm
Content-Type: application/pdf.
body: binary
The PDF file itself. It preserves the original formatting of the filing, including images and tables. Images are scaled for high-quality printing, and invisible inline XBRL tags are removed to keep the file size down. Files already published as PDF on EDGAR are returned as filed.
Content-Type: header
application/pdf when the PDF is returned. application/json when the API answers with 202 and the conversion is still running.
message: optional string
Only present in the JSON body of a 202 response: Cache miss: PDF generation started. Retry in 5 seconds.
Status codes
200 | Success. The body is the PDF file, with content type application/pdf. |
202 | The filing or exhibit is queued for conversion and the PDF is not ready yet. The body is JSON and holds message. Retry the same request after 5 seconds. Three to four retries usually return the PDF. Treat 4 minutes as the outer limit, then report the URL to support@sec-api.io. |
403 | The API key is missing, or it is not valid. |
404 | The url does not point at a file on www.sec.gov, or the file does not exist. |
429 | Too many requests. Slow the request rate and retry. |
500 | Server error. Retry, and report it if it persists. |