Documents
Get Documents
Get documents content using their datamarts_document_id.
POST
https://api.textreveal.com/v3/documents
Request
Parameters
fields(string (enum))[]Fields to include in the response
Values: "datamarts_document_id", "extract_date", "title", "text", "translated_title", "translated_text"translatelanguage-code (enum)In which language to translate the results.
Default translated fields are:
title,text.If empty,
translated_fields won't be returned.Example:
Values: "af", "afr", "afrikaans", "albanian", "am", "amh", "amharic", "ar", "ara", "arabic", "armenian", "az", "aze", "azerbaijani", "ben", "bengali", "bg", "bn", "bos", "bosnian", "bs", "bul", "bulgarian", "ca", "cat", "catalan", "chinese"...french
Request
{
"documents": [
{
"datamarts_document_id": "5e81c3cfab411d53ea4dcb045548d2a89ea9526f09b75b036f3f6c92e9edd9aa",
"extract_date": "2025-10-06T04:55:21.713Z"
}
]
}Response
Requested documents.
data*object[]Array of documents. Order is not guaranteed, not found documents won't be included
Array length: [0, 25]
Response
{
"data": [
{
"datamarts_document_id": "5e81c3cfab411d53ea4dcb045548d2a89ea9526f09b75b036f3f6c92e9edd9aa",
"extract_date": "2025-10-06T04:55:21.713Z",
"title": "string",
"text": "string",
"error": {
"message": "Your licence does not allow you to access the content of premium documents.",
"code": 403,
"reason": "forbidden"
},
"translated_title": "string",
"translated_text": "string"
}
]
}Error
Bad request
message*stringError message.
Example: "Check the errors field for more details"code*number (enum)Error code.
Values: 400reason*string (enum)Error reason.
Values: "invalid"errorsobject[]Possible error causes.
Response
{
"message": "Check the errors field for more details",
"code": 400,
"reason": "invalid",
"errors": [
{
"message": "string",
"field": "documents",
"reason": "invalid_type"
}
]
}Unauthorized
message*stringError message.
Example: "Authorization header is expected"code*number (enum)Error code.
Values: 401reason*string (enum)Error reason.
Values: "unauthorized"errors*object[]Array length: [1, 1]
Response
{
"message": "Authorization header is expected",
"code": 401,
"reason": "unauthorized",
"errors": [
{
"message": "Required",
"field": "headers.authorization",
"reason": "invalid_type"
}
]
}Generic errors are not shown, see Errors for more details.