REST API · Library
Section
A section's text with its citation and credit.
GET
/api/v1/library/{lang}/{author}/{work}/{ref}Mirrors the section page. A citation inside a section (Aeneid 1.17) returns the section that holds it (1.1-11). Follow next.api to read on.
Parameters
| Name | Description |
|---|---|
langstring | RequiredIn the pathLanguage as in site URLs. One of |
authorstring | RequiredIn the path Example |
workstring | RequiredIn the path Example |
refstring | RequiredIn the pathA citation in the work: 1.46, 17, 1.1.3. Example |
includestring | OptionalExtra fields, comma-separated: analysis (stored word-by-word analysis), context (stored notes). |
Response
200 OK with a Text object.
| Name | Description | ||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
kindstring | section: a reading section of a library work. passage: a graded passage. One of | ||||||||||||||||||||||||||||||||||||||||||||
langstring | Language code: la (Latin) or grc (Ancient Greek). One of | ||||||||||||||||||||||||||||||||||||||||||||
languagestring | |||||||||||||||||||||||||||||||||||||||||||||
titlestring | "Aeneid 1.1-11" for a section; the passage title for a graded passage. | ||||||||||||||||||||||||||||||||||||||||||||
citationstring | "Virgil, Aeneid 1.1-11": quote this when you cite the text. | ||||||||||||||||||||||||||||||||||||||||||||
refstring or null | The section's first citation, as used in its URL. Null for a graded passage. | ||||||||||||||||||||||||||||||||||||||||||||
levelinteger or null | Graded passages: difficulty 1 to 5. | ||||||||||||||||||||||||||||||||||||||||||||
urnstring or null | CTS URN, e.g. urn:cts:latinLit:phi0690.phi003.perseus-lat2:1.1-1.11. Null when the edition has none (The Latin Library's own numbering). | ||||||||||||||||||||||||||||||||||||||||||||
urlstring | Canonical page. | ||||||||||||||||||||||||||||||||||||||||||||
apistring | Absolute URL. | ||||||||||||||||||||||||||||||||||||||||||||
markdownstring or null | The same text as Markdown. | ||||||||||||||||||||||||||||||||||||||||||||
authorobject | 2 fields
| ||||||||||||||||||||||||||||||||||||||||||||
workobject | 3 fields
| ||||||||||||||||||||||||||||||||||||||||||||
verseboolean | |||||||||||||||||||||||||||||||||||||||||||||
wordsinteger | |||||||||||||||||||||||||||||||||||||||||||||
textstring | Plain text; verse keeps its line breaks. | ||||||||||||||||||||||||||||||||||||||||||||
prevLink or null | 4 fields
| ||||||||||||||||||||||||||||||||||||||||||||
nextLink or null | Follow next.api to read on without searching again.4 fields
| ||||||||||||||||||||||||||||||||||||||||||||
creditCredit | 5 fields
| ||||||||||||||||||||||||||||||||||||||||||||
analysisAnalysis | OptionalOnly with include=analysis.5 fields
| ||||||||||||||||||||||||||||||||||||||||||||
contextContext | OptionalOnly with include=context.3 fields
|
Errors
| Status | When |
|---|---|
400 Bad Request | A parameter is missing or invalid, or the reference isn't a text. |
404 Not Found | Not in the library. |
429 Too Many Requests | Too many requests from one address. Wait a minute. |
500 Internal Server Error | Something went wrong on our side. |
Error bodies are described in Caching, limits and errors.