Corpus - List texts
To get a paginated list of texts in our corpus, issue a GET request to the /corpus/texts
endpoint:
GET https://manc.hu/api/corpus/texts
You can specify the following optional query string parameters to further refine your quest for the right text:
Field
Explanation
Required
page
(Integer) The page to return (default = 1)
no
size
(Integer) Number of items to return on every page (default = 10)
no
filter
(String) Filter the texts based on the title or subtitle. Partial matches will also be counted.
no
size
(Integer) Number of items to return on this page
no
Make sure to also set your access token in the Authorization
request header:
Header
Value
Authorization
Bearer <Your access token>
The response will look as follows:
{
"page": 1,
"size": 10,
"total": 1234,
"items": [
{
"dateFrom": "1685",
"dateTo": null,
"descriptionEnglish": "Imperial anthology of Classical Prose, in chronological order starting with the Zhou.",
"descriptionChinese": "此書是集歷代散文為一書的文學總集。"
"titleEnglish": "Profound Mirror of Classical Prose",
"titleManchu": "Gu wen yuwan giyan bithe",
"titleChinese": "古文淵鑑",
"isCollection": true,
"items": [
{
"id": 122959,
"dateFrom": "1685",
"dateTo": null,
"description": null,
"titleEnglish": "Intro to the Profound Mirror of Classical Prose",
"titleManchu": "Han i araha gu wen yuwan giyan bithei sioi",
"titleChinese": "古文淵鑑序",
"manchuType": "Translation, monolingual",
"genre": "Historical narrative",
"textForm": "Narrative",
"reignPeriod": "Kangxi (1662 - 1722)",
"isCollection": false
},
... (more items omitted)
]
},
... (more items omitted)
]
}
Every item on the page contains some basic information and might contain other items. If the item contains other items, the isCollection
boolean will be set to true
. The nesting goes a maximum of one level deep.
The items are counted on the highest level, so when the page size is set to 10 you will receive 10 collections or texts that are not part of a collection. The total
number also reflects the number of items on the highest level, not necessarily the number of texts in the corpus. It is purely a means to calculate the total number of pages that can be requested.
For every text (isCollection: false
) the unique ID is returned, which can be used to fetch the contents of the text. For more information, see the Fetch text by ID page.
Last updated
Was this helpful?