Documents

Read the text of the uploaded PDF, a run of pages at a time

Returns the text of each page as someone reading it would see it. One answer holds about 20,000 characters and at most 50 pages, in whole pages; nextPage says where to continue, so the number of pages is no limit. The file itself may be up to 25 MB. Pages without a text layer come back empty, and hasText is false when all of the returned ones are.

get/api/v1/documents/{id}/text/pages

Request

  • Base URL: https://api.korala.ai
  • URL: https://api.korala.ai/api/v1/documents/{id}/text/pages
  • Auth: one of:
    • API key in header X-API-Key
    • bearer (a scheme the document does not define)

Path parameters

idstring required

Query parameters

fromPagenumber
Example:1

First page to read. Defaults to 1.

toPagenumber
Example:3

Last page to read. Defaults to as many pages as fit in one answer; nextPage says where to continue.

Response

pageCountnumber required

Pages in the document

nextPagenumber nullable required

The page to continue from, or null when the last page was returned

hasTextboolean required

False when none of the returned pages has any text. They are scanned, and have to be looked at instead of read; other pages of the same document may still have text

Example response

{
  "pages": [
    {
      "pageNumber": 1
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.