Skip to main content
POST
Extract text from a PDF or Word document

Authorizations

Authorization
string
header
required

API key starting with zt_live_ (production) or zt_test_ (sandbox). Get your key at https://developers.zebratruth.ai

Body

multipart/form-data
document
file
required

One PDF (application/pdf, .pdf) or Word file (application/vnd.openxmlformats-officedocument.wordprocessingml.document, .docx). The bytes are sniffed; the declared type and the filename extension must agree with what the bytes are. Legacy .doc is refused.

Response

Extracted text

format
enum<string>
required
Available options:
pdf,
word_doc
wordCount
integer
required

Billable words. A check on this text is priced by ceil(wordCount / 500) blocks.

charCount
integer
required
text
string
required

The extracted text, line breaks preserved.

limits
object
required

The limits that applied to this workspace.

pageCount
integer

Present for PDF only.

_meta
object

Present only for test-mode keys.