Documents

Get documents

Get documents text, title and/or summary.

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

Request

Request Body

  • documents*object[]

    List of documents

  • fields(string (enum))[]

    Fields to fetch

    Default: ["title", "text"]Values: "title", "text", "summary"
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

  • errorobject | object
  • extracteddate-time

    The document's extraction date.

    Example: "2022-11-25T14:31:10.834Z"
  • id*string

    The document identifier.

    Example: "c34ac671a1b0b80078f9acd7e80217e28e8c554e14e1de707fb4370e52299add"
  • summarystring

    The document's summary. Undefined if 'summary' is not in the requested fields.

    Example: "A summary"
  • textstring

    The document's text. Undefined if 'text' is not in the requested fields.

    Example: "A text"
  • titlestring

    The document's title. Undefined if 'title' is not in the requested fields.

    Example: "A title"
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"
  }
]