The PDF parser endpoint converts PDF documents into other formats. This is useful when you need to extract and process text content from PDF files for further analysis or integration into your workflow.
You need an API key to access the Writer API. Get an API key by following the steps in the API quickstart.
We recommend setting the API key as an environment variable in a .env
file with the name WRITER_API_KEY
.
URL: POST https://api.writer.com/v1/tools/pdf-parser
Parameter | Description |
---|---|
file_id | The ID of the uploaded PDF file to parse. |
Before using the PDF parser, you’ll need to upload your PDF file to the Writer API and obtain its file ID. Learn more about how to upload files with the Files API.
The request body includes the following parameters:
Parameter | Type | Description |
---|---|---|
format | string | The desired output format. Can be text or markdown . |
Returns an object with a content
field containing the extracted text in the specified format.