Parse turns a document into clean Markdown: a PDF, a Word file, a spreadsheet and more. Send the URL of a public document, or upload a file from disk. For details, see the Parse Endpoint API Reference.

Quickstart

Installation

Parse a document from a URL

Send the document’s URL as JSON. For a PDF, maxPages caps how many pages are read, and billed.
Response
numPages is the number of pages read, and totalPages the length of the document. This paper has 15 pages; the request read 2 and cost 2 credits.

Upload a file

Send the file as multipart/form-data, in a field named file. In Python, pass a path, bytes or an open file. In Node, pass the bytes and the file name.

Response

Response

Options with an upload

With an upload, send options as JSON in a form field named options. They are the same page options as Scrape, like formats.
cURL
Response
A spreadsheet comes back as a Markdown table.

Supported formats

Upload any of these the same way, like this Word file:
cURL
Its text comes back in data.markdown. Uploading any other file type answers 415 with the code unsupported_file_type.

Considerations

  • Size: uploads are limited to 4 MB. A bigger file answers 413 with the code file_too_large: parse it from a URL instead.
  • Cost: a PDF costs 1 credit per page read. Any other document costs 1 credit. Formats like json add their own cost, see Billing.
  • Uploads or URLs: send one or the other. A request with both is refused.