# SEC Filings to PDF Generator API > Convert any SEC EDGAR filing or exhibit into a PDF. Supports HTML, XML and text filings across all EDGAR form types, preserving the original formatting, images and tables. Source: https://sec-api.io/docs/sec-filings-to-pdf-generator-api Download any SEC filing or exhibit as a PDF file. Since most SEC filings, exhibits and attachments are not published in PDF format, converting the original content is necessary to download them as PDFs. The PDF Generator API offers this functionality by converting HTML, XML, or text-based filings and exhibits into PDFs while preserving the original formatting, including images and tables. The API supports downloading all EDGAR form types as PDFs, including filings and exhibits such as Form 10-K, 10-Q, 8-K, DEF14A, and more, while preserving the original formatting. Images are optimized and scaled for high-quality printing, such as in proxy statements, and invisible inline XBRL tags are removed to reduce PDF file size and prevent unnecessary bloating. All original content is preserved without alteration. The PDFs are designed to be easily shareable, printable, and suitable for archiving. Legacy text-based filings (.txt) were not originally designed for PDF-printable output. As a result, single table rows in these older filings may span multiple lines and may not fit within the standard A4 PDF page width. NLP, LLM or RAG-based tasks might encounter difficulties when parsing such files as PDFs. In these cases, it is recommended to use the original text content instead of the PDF version for better accuracy. To download the original file as filed, without converting it, use the [EDGAR File & SEC Filings Download API](https://sec-api.io/docs/edgar-file-and-sec-filings-download-api) instead. Coverage: All 20+ million SEC EDGAR filings and all 100+ million exhibits and attachments filed since 1993 to present, across all EDGAR form types. Supported input formats: HTML, XML and TXT filings and exhibits. Files already published as PDF are returned as-is. Output: A PDF file preserving the original formatting, including images and tables. Inline XBRL tags are stripped to keep the file size down. ## Use Cases The PDF Generator API is often used alongside the [real-time filing Stream API](https://sec-api.io/docs/stream-api) or the [pull-based filing Query API](https://sec-api.io/docs/query-api). The sec.gov source URL of a filing or exhibit is retrieved from the metadata those APIs return, then passed to the PDF Generator API. Use cases include: - Convert HTML, XML, and TXT filings to PDF for user exports - Attach a printable copy of a filing to an internal compliance record - Publish proxy statements and annual reports on an investor relations website in a single, consistent format - Share a filing over email, Slack, WhatsApp, Signal or any other messaging platform as a single file, rather than a link that needs a browser and an API key to open - Archive filings in a format that stays readable without a browser ## PDF Generator API ### API Endpoint Filings and exhibits can be converted to and downloaded as PDF by calling the following PDF Generator API endpoint with the URL of the original filing or exhibit as a query parameter: https://api.sec-api.io/filing-reader Supported HTTP Method: `GET` Response content type: `application/pdf` The API returns the filing or exhibit as a PDF file, preserving the original formatting, including images and tables. ### Authentication Two authentication methods are available. Choose the method that best fits your use case: - **Authorization header**: Set the API key as the value of the `Authorization` header. Do not add "Bearer" or any other words in front of the API key. Example: `Authorization: YOUR_API_KEY` - **Query parameter**: Set the API key as the `token` query parameter. Example: `https://api.sec-api.io/filing-reader?token=YOUR_API_KEY&url=...`. This is the method to use when the PDF has to open directly in a browser, since a browser address bar cannot send a header. When using the Python or Node.js SDK, the API key is automatically added to the request headers. ### Request Parameters - `token` (required) - Your API key. - `url` (required) - URL of the filing or exhibit attachment. All file types are supported (HTML, XML, TXT, etc). The URL must point at the file itself under `sec.gov/Archives`. EDGAR links to inline XBRL filings through a viewer URL that starts with `/ix?doc=`. That viewer page is not the file, so delete the `/ix?doc=` part before passing the URL to the API: Viewer URL, not accepted: `https://www.sec.gov/ix?doc=/Archives/edgar/data/320193/000130817926000008/aapl014016-def14a.htm` Same filing, accepted: `https://www.sec.gov/Archives/edgar/data/320193/000130817926000008/aapl014016-def14a.htm` Further example URLs: `https://www.sec.gov/Archives/edgar/data/1833764/000089924321006812/xslF345X02/doc3.xml` `https://www.sec.gov/Archives/edgar/data/815094/000156459021006205/abmd-8k_20210211.htm` ### Examples Replace `YOUR_API_KEY` with your actual API key, and copy and paste any of the following example URLs into a browser to download the filing as a PDF. **URL to download a Form 10-K filing as PDF:**     https://api.sec-api.io/filing-reader?     token=YOUR_API_KEY&     url=https://www.sec.gov/Archives/edgar/data/320193/000032019323000106/aapl-20230930.htm **URL to download a Form 4 filing in XML format as PDF:**     https://api.sec-api.io/filing-reader?     token=YOUR_API_KEY&     url=https://www.sec.gov/Archives/edgar/data/1833764/000089924321006812/xslF345X02/doc3.xml ```bash https://api.sec-api.io/filing-reader?url=https://www.sec.gov/Archives/edgar/data/320193/000032019323000106/aapl-20230930.htm&token=YOUR_API_KEY ``` ## FAQ ### Do all PDFs include images? Yes. Every image the filing references is rendered into the PDF: company logos, charts, performance graphs, signature images and scanned exhibits. Images are downloaded and scaled for print. Apple's 2026 DEF 14A, for example, carries 50 separate image files, among them the proxy voting card. All of them appear in the PDF in the position and at the size the filing intended: `https://www.sec.gov/Archives/edgar/data/320193/000130817926000008/aapl014016-def14a.htm` ### What does a 202 response mean and how do I handle it? Requesting the PDF of a newly published filing shortly after publication, during a peak filing volume window, can return HTTP `202` instead of the PDF. The response body is `{"message": "Cache miss: PDF generation started. Retry in 5 seconds."}`, with an `application/json` content-type. It means the filing or exhibit has been enqueued for conversion and the conversion has not finished yet. Retry the same request after 5 seconds. Repeating the request does not enqueue the file a second time, so retrying does not fast-track the conversion. ### What retry interval and backoff strategy is recommended for 202 handling? Start with 5 seconds. Linear and exponential backoff both work from there, and the choice depends on your own application rather than on the API: - Linear: 5, 10, 15, 20 seconds. Predictable, and it finds the PDF sooner once conversion finishes. - Exponential: 5, 10, 20, 40 seconds. Fewer calls in total, which matters when you are converting many filings at once. ### Is there a recommended maximum number of retries or timeout? Retrying 3 to 4 times usually returns the final PDF. Treat 4 minutes as the outer limit. Set the ceiling in your client, since the API does not impose one. A `202` response that persists past 4 minutes might indicate a failed conversion. Stop retrying, log the URL, and please report it to support@sec-api.io. Most HTTP client libraries give the request itself a separate transfer timeout. A successful response streams the PDF in byte chunks, and a large document takes a few seconds to transfer after the conversion is done. A transfer timeout of 30 seconds is reasonable. ### How long does PDF generation take for larger filings? Filing and exhibit conversion time depends on the document length, its content structure (e.g. number, scale and size of images), and the number of parallel filings disclosed at the same time. Filings and exhibits over 100 pages with many images take longer than short ones. For example: - Slower: prospectuses, registration statements and Regulation AB disclosures, which run to hundreds and sometimes thousands of pages and carry charts, tables and scanned documents. - Faster: press releases, material event disclosures on Form 8-K and 6-K, and insider trade reports on Forms 3, 4 and 5. Every filing and exhibit is converted once after publication. The PDF is stored on our infrastructure afterwards, so later requests for the same URL return it on the first call with no 202 and no wait. ### If the API returns 202 after the recommended retry period, is that an error that should be reported? Potentially, yes. PDF generation fails in rare edge cases. If you still get a `202` after 4 minutes, treat the request as failed and contact us at support@sec-api.io with the full request URL and the time of the first request.