Skip to content
REST APIWorkDocs menu

Work

A work, its editions and its contents.

GET/api/v1/library/{lang}/{author}/{work}

Mirrors the work page. The contents list the default edition's reading sections in order, a page at a time.

Parameters

Parameters
NameDescription
langstringRequiredIn the pathLanguage as in site URLs.

One of latin, greek. Example latin.

authorstringRequiredIn the path

Example virgil.

workstringRequiredIn the pathWork slug, as in the site URL.

Example aeneid.

limitintegerOptionalAt most 1000.

Default 200. From 1 to 1,000.

offsetintegerOptional

Default 0. From 0 to 100,000.

Response

200 OK with a Work object.

Response fields
NameDescription
titlestring
nativeTitlestring or nullThe title in Latin or Greek, when it differs.
authorstring
langstringLanguage code: la (Latin) or grc (Ancient Greek).

One of la, grc.

genrestring or null
wordsinteger
sectionsintegerReading sections.
urnstring or nullCTS 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).
urlstringAbsolute URL.
apistringAbsolute URL.
languagestring
formstring or nullprose, verse or mixed.
meterstring or null
markdownstringAbsolute URL.
authorUrlstringAbsolute URL.
creditCredit or nullThe default edition's credit: the text every section URL serves.
5 fields
credit fields
textstringCredit line for the edition: author, work, editor, source, licence and changes. Quote it when you reuse the text.
licensestringCC BY-SA 4.0, CC BY 3.0, Used with permission (The Latin Library), or a public-domain note.
licenseUrlstring or null
sourcestringWhere the edition comes from.
qualitystringocr: an unproofread scan.

One of proofread, ocr.

editionsarray of object
4 fields
editions fields
idstring
urnstring or nullCTS 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).
defaultboolean
creditCredit
5 fields
credit fields
textstringCredit line for the edition: author, work, editor, source, licence and changes. Quote it when you reuse the text.
licensestringCC BY-SA 4.0, CC BY 3.0, Used with permission (The Latin Library), or a public-domain note.
licenseUrlstring or null
sourcestringWhere the edition comes from.
qualitystringocr: an unproofread scan.

One of proofread, ocr.

contentsobject
5 fields
contents fields
totalinteger
offsetinteger
limitinteger
nextstring or nullThe next page of contents.
sectionsarray of object
5 fields
sections fields
refstring
refEndstring
labelstring
wordsinteger
urlstringAbsolute URL.

Errors

StatusWhen
400 Bad RequestA parameter is missing or invalid, or the reference isn't a text.
404 Not FoundNot in the library.
429 Too Many RequestsToo many requests from one address. Wait a minute.
500 Internal Server ErrorSomething went wrong on our side.

Error bodies are described in Caching, limits and errors.

Example request

curl "https://interlinea.aeterna-institute.org/api/v1/library/latin/virgil/aeneid"

Example response

Response200 OK
{
  "title": "Aeneid",
  "nativeTitle": "Aeneis",
  "author": "Virgil",
  "lang": "la",
  "genre": "epic",
  "words": 63347,
  "sections": 223,
  "urn": "urn:cts:latinLit:phi0690.phi003",
  "url": "https://interlinea.aeterna-institute.org/library/latin/virgil/aeneid",
  "api": "https://interlinea.aeterna-institute.org/api/v1/library/latin/virgil/aeneid",
  "language": "Latin",
  "form": "verse",
  "meter": "hexameter",
  "markdown": "https://interlinea.aeterna-institute.org/library/latin/virgil/aeneid.md",
  "authorUrl": "https://interlinea.aeterna-institute.org/library/latin/virgil",
  "credit": {
    "text": "Virgil, Aeneid, ed. J. B. Greenough. Text: the Perseus Digital Library, canonical-latinLit, CC BY-SA 4.0. Changes: apostrophes normalised an…",
    "license": "CC BY-SA 4.0",
    "licenseUrl": "https://creativecommons.org/licenses/by-sa/4.0/",
    "source": "https://github.com/PerseusDL/canonical-latinLit/blob/master/data/phi0690/phi003/phi0690.phi003.perseus-lat2.xml",
    "quality": "proofread"
  },
  "editions": [
    {
      "id": "phi0690.phi003.ll1",
      "urn": null,
      "default": false,
      "credit": {
        "text": "Virgil, AENEID. Text: The Latin Library (thelatinlibrary.com), used with permission. Changes: HTML markup removed and the text divided into…",
        "license": "Used with permission",
        "licenseUrl": "https://www.thelatinlibrary.com/about.html",
        "source": "https://www.thelatinlibrary.com/verg.html",
        "quality": "proofread"
      }
    },
    {
      "id": "phi0690.phi003.perseus-lat2",
      "urn": "urn:cts:latinLit:phi0690.phi003.perseus-lat2",
      "default": true,
      "credit": {
        "text": "Virgil, Aeneid, ed. J. B. Greenough. Text: the Perseus Digital Library, canonical-latinLit, CC BY-SA 4.0. Changes: apostrophes normalised an…",
        "license": "CC BY-SA 4.0",
        "licenseUrl": "https://creativecommons.org/licenses/by-sa/4.0/",
        "source": "https://github.com/PerseusDL/canonical-latinLit/blob/master/data/phi0690/phi003/phi0690.phi003.perseus-lat2.xml",
        "quality": "proofread"
      }
    }
  ],
  "contents": {
    "total": 223,
    "offset": 0,
    "limit": 200,
    "next": "https://interlinea.aeterna-institute.org/api/v1/library/latin/virgil/aeneid?offset=200&limit=200",
    "sections": [
      {
        "ref": "1.1",
        "refEnd": "1.45",
        "label": "Lines 1.1-1.45",
        "words": 287,
        "url": "https://interlinea.aeterna-institute.org/library/latin/virgil/aeneid/1.1"
      },
      {
        "ref": "1.46",
        "refEnd": "1.86",
        "label": "Lines 1.46-1.86",
        "words": 276,
        "url": "https://interlinea.aeterna-institute.org/library/latin/virgil/aeneid/1.46"
      },
      {
        "ref": "1.87",
        "refEnd": "1.130",
        "label": "Lines 1.87-1.130",
        "words": 290,
        "url": "https://interlinea.aeterna-institute.org/library/latin/virgil/aeneid/1.87"
      },
      // 197 more
    ]
  }
}
Cache-Control: public, max-age=3600, s-maxage=86400, stale-while-revalidate=604800

Try it

Send a real GET from your browser and see the answer, its status and how long it took.

GET /api/v1/library/latin/virgil/aeneid