API access

1. The dictionary is available to programs at stable addresses under

api/v1/

open and without a key, as JSON, TEI XML or HTML. Every answer carries the licence, CC BY-NC-ND 4.0, and the attribution. It sends the headers

answers 304 to a conditional request, and allows cross-origin requests from a browser. The machine-readable description (OpenAPI 3.0) is

api/v1/openapi.json

from which a client can be generated or the interface browsed in a standard viewer.

2. Entries are addressed by their persistent number, LAD followed by six digits,

LAD000000

which every entry carries in its header. The number survives a rename of the lemma; the internal id does not. A number that was retired answers with the address of its successor, or with 410 when it has none, so a stored number can always be followed. The dictionary is work in progress: every entry carries its editorial status, and an entry marked draft or review is unfinished.

Addresses

JSON entry

3. One entry is available as JSON at

api/v1/entries/LAD013308

with its grammar, meaning in four languages, periods, domains, the ids of the corresponding AHw, CAD and eBL entries, the senses with their attestations, discussion, cross-references, external resources and authorship. Every reference to a vocabulary is resolved to its label. Pending senses the editors have not sorted are left out, as on the page.

TEI and HTML

4. The same entry is available as TEI XML (Lex-0), identical to the download on the entry page,

api/v1/entries/LAD013308.xml

or as the rendered entry without the page around it, for embedding:

api/v1/entries/LAD013308.html

5. A search returns the entries matching a term, ranked lemma first:

api/v1/search?q=abu

It takes

limit
up to 100
offset
up to 1000

and the filters of the results page as

each taking one or more ids of the vocabularies, comma-separated. The answer carries the counts per period, part of speech and domain over the whole match, so a client can offer the same checkboxes. For more than a thousand results, take the archive.

Vocabularies

6. The controlled vocabularies the entries refer to by id (periods, domains, grammar, patterns, stems, roots, languages, museums, places, text types, text sources, vowel classes) are listed at

api/v1/taxonomies.json

Each one is available as its TEI file

taxonomies/period.xml

or as a flat list of categories with id, term, gloss and broader category

taxonomies/period.json

Concordance

7. The concordance gives one row per LAD number with the corresponding entries of the AHw, the CAD and the eBL dictionary, as JSON or as a table:

api/v1/concordance.json
api/v1/concordance.tsv

Retired numbers stay in with their reason. It is rebuilt nightly.

Registry

8. The registry lists every number ever assigned, with the entry it points to and the date,

api/v1/registry.xml

and a retired number carries the date, the reason and the former lemma.

Archive

9. The whole dictionary is available as one archive, with its description:

api/v1/dump/lad-latest.zip
api/v1/dump/manifest.json

The archive is described under Download LAD.

Technical notes

10. The search term is normalized as the website does it: a transliteration typed with a digit index (par2) matches its accented form (pár), and the answer reports the form it searched for as normalized. The answer also carries two counts, matched for the entries the term found and total for those left after the filters, so a client can show how much a filter removed. A missing term, a limit or offset outside the caps, or a filter value that is not an id answers 400 with a message saying what to change and, for the caps, where the archive is.

11. In the JSON of an entry, each attestation row carries the same field names as the nightly attestation index the website is built from, so one vocabulary serves both. Two fields,

keep the bracket notation of that index, in which

and two more,

give the same content as plain text. The rendered fragment of an entry (.html) is the entry as the page shows it, and its links are the relative links of this site, so a page that embeds it resolves them against https://lad.saw-leipzig.de/.

Limitations

12. Writing: the interface is read-only, and the editor stays private. The text of the AHw and the CAD: LAD displays both with permission but does not redistribute them; the concordance gives the correspondences to their entries instead. Internal working notes: they never leave the server. And more than a thousand results through the search: a machine that wants everything takes the archive, which exists for that reason.