Skip to main content
Retrieve the text of a document

Authorizations

Authorization
string
header
required

Authorize using an API key. Send it in the Authorization: Bearer <api-key> header. Only API keys are accepted — session tokens are rejected. Create your first API key in the Circularo web app; further keys can be managed through this API.

Path Parameters

id
string
required

Identifier of the document whose text to retrieve.

Minimum string length: 1
Pattern: ^[A-Za-z0-9_-]+$
Example:

"a0d01c9d-f72f-4c57-af11-e26bda19cc59"

Response

Returns the text of the document and where its extraction stands.

The text extracted from the main file of a document.

isTruncated
boolean
required

Whether text holds only the beginning of a longer text — at most its first 1000000 characters. The rest cannot be read through this endpoint; download the main file for it.

status
enum<string>
required

Where the extraction of the text stands.

  • pending: No text has been extracted from the current main file: its extraction has not started yet, or does not run for this document.
  • processing: The text of the main file is being extracted.
  • completed: The text of the main file has been extracted.
  • failed: The text could not be extracted from the main file, for example because it is too large. A new version of the main file is extracted again.
Available options:
pending,
processing,
completed,
failed
Example:

"completed"

text
string | null
required

The text of the main file, without its layout; in an uploaded file, line breaks are not kept either and its words are separated by single spaces. Text present only as an image, such as in a scan, is not included, so a scanned file yields an empty text. Null until status is completed.

Example:

"MASTER SERVICES AGREEMENT This Agreement is entered into by and between Acme Corporation and Globex Inc."

totalLength
integer | null
required

Number of characters, counted in UTF-16 code units, of the whole stored text, also when text holds only its beginning. Null until status is completed.

Required range: x >= 0
Example:

48210