GET /v1/parse/formats lists them, and parsers and a few other fields change how a file is read.
List the formats
Get an API key in the Quickstart. The call is free.Read the response
data.formats has one entry for each kind of file. This real response is cut to two of its seven entries.
options names the request fields that apply to that kind of file. kind is document or image. Parse finds the type from the bytes of the file, so filename is only a hint.
Read a PDF
parsers takes one entry for a PDF. Other files ignore it.
mode: "fast" on a picture returns 400 invalidRequest, because a picture has no text layer. See a PDF read page by page in Large files.
Read an HTML file
includeTags, excludeTags, html and rawHtml on a file that is not HTML return 400 invalidRequest with includeTags, excludeTags, html and rawHtml apply to HTML files, and this file is not one.
Limits and errors
- Up to 36 MB for a file, and 2 MB without an API key. A password-protected file and a file that cannot be opened return
400 invalidRequest. - A PDF is read up to 100 pages.
isTruncatedsays when the file had more. - Without an API key, scanned pages and pictures of text are not read, and
mode: "ocr",summaryandjsonreturn400 invalidRequest. - A file with no readable text comes back as a
notFounderror and costs nothing.
Related
- Parse documents sends a file and lists every field.
- Large files sends a file up to 36 MB.
- PDFs and documents reads a file by its address.
- HTML covers the HTML formats.