Documents

Get Documents

Get documents text, title and/or summary.

Deprecated: This route is deprecated, and will no longer be updated in the future.

Use the Get Documents API instead.

POST
https://api.textreveal.com/api/2.0/documents

Request

Request Body

  • documents*object[]

    List of documents

    Array length: [1, 500]
  • fields(string (enum))[]

    Fields to fetch

    Default: ["title", "text"]Values: "title", "text", "summary"Array length: [1, ∞]
Request
{
  "documents": [
    {
      "extracted": "2022-12-30T22:59:57.502Z",
      "id": "c34ac671a1b0b80078f9acd7e80217e28e8c554e14e1de707fb4370e52299add"
    },
    {
      "extracted": "2022-12-28T13:15:06.644Z",
      "id": "0d285bcb024438d022c91d75556c4159786e72b7f3b4b3a22562ca9d1dbabb4a"
    }
  ],
  "fields": [
    "title",
    "text"
  ]
}

Response

Response - 200

The requested documents

  • []array

    Document

Response
[
  {
    "extracted": "2022-12-30T22:59:57.502Z",
    "id": "c34ac671a1b0b80078f9acd7e80217e28e8c554e14e1de707fb4370e52299add",
    "text": "the document's text",
    "title": "the document's title"
  },
  {
    "extracted": "2022-12-28T13:15:06.644Z",
    "id": "0d285bcb024438d022c91d75556c4159786e72b7f3b4b3a22562ca9d1dbabb4a",
    "text": "the document's text",
    "title": "the document's title"
  }
]

Error

Error - 400

Bad request

  • fieldstring[]

    The field where the error happened.

    Example: "string"
Response
{
  "field": [
    "string"
  ]
}

Generic errors are not shown, see Errors for more details.