Skip to main content

Get a document's extracted text.

GET/api/v1/documents/{document_id}/textdocuments:read

The text of the newest extraction of the document's current file, with its page breaks. Needs View Document Text; View Document Versions permits a fallback to an archived file. 404 when the document has no extracted text the caller may read.

Scopedocuments:read
AsynchronousNo
MCP toolget_document_text
Portal permissionsview_document_text
Company capabilitytext

Parameters​

NameInTypeRequiredDescription
document_idpathstringRequired
Docwize-Versionheaderstring (date)Optional
If-None-MatchheaderstringOptionalAnswers 304 when the representation is unchanged (resources that publish an ETag).

Responses​

StatusDescriptionBody
200Success.application/json DocumentText
304Not modified (If-None-Match matched the ETag).
400invalid_versionapplication/problem+json Problem
401token_expired, unauthenticatedapplication/problem+json Problem
403forbidden, insufficient_scope, token_owner_inactiveapplication/problem+json Problem
404not_foundapplication/problem+json Problem
405method_not_allowedapplication/problem+json Problem
406not_acceptableapplication/problem+json Problem
421wrong_regionapplication/problem+json Problem
422unsupported_for_tenant, validation_failedapplication/problem+json Problem
500internal_errorapplication/problem+json Problem
503tenant_unavailable, unavailableapplication/problem+json Problem
504timeoutapplication/problem+json Problem

Errors​

The problem codes this operation can answer with. Each code links to its page.

Schemas​

DocumentText​

FieldTypeRequiredDescription
document_idstringRequired
image_namestringRequiredThe stored file the text was extracted from.
is_currentbooleanRequiredWhether that file is the document's current file (the newest extraction is preferred).
page_breaksarray of DocumentTextPageBreakRequired
textstringRequired

DocumentTextPageBreak​

FieldTypeRequiredDescription
endintegerRequired≥ -2147483648; ≤ 2147483647
indexintegerRequired≥ -2147483648; ≤ 2147483647
startintegerRequired≥ -2147483648; ≤ 2147483647