Usuarium API v1

Public API · version 1

The Usuarium API

A read-only JSON API to the Usuarium database of medieval and early modern liturgical books. It gives you every public source (a manuscript or printed book) and every conspectus item describing its contents: feasts, services, incipits, rubrics and folios. It is free and needs no key. If you use the data, please include the attribution statement.

  • Read-only
  • No API key
  • JSON
  • ≈ 1,850 sources
  • ≈ 1.4 million conspectus items
  • Cursor pagination
Base URL https://usuarium.elte.hu/api/v1
On this page
  1. Quick start
  2. For your AI assistant
  3. Endpoints
  4. Fields
  5. Filtering
  6. Pagination
  7. Rate limits
  8. Errors
  9. Machine-readable description
  10. Terms and credit

01 Quick start #

Ask for the first two sources. Every list response has a data array and a page object.

shellRequest
curl 'https://usuarium.elte.hu/api/v1/sources?limit=2'
jsonResponse · 200 OK (shortened)
{
  "data": [
    {
      "id": 1,
      "short_title": "Missale Leodiense",
      "original_title": "Missale secundum usum insignis ecclesiae Leodiensis",
      "age": "1499",
      "manuscript": false,
      "copy_kind": { "code": 1, "label": "original" },
      "library": {
        "id": 140,
        "name": "Bayerische Staatsbibliothek",
        "short_name": "BSB München",
        "city": "München",
        "country": "DE"
      },
      "genres": [ { "id": 4, "label": "Missal" } ],
      …
      "url": "https://usuarium.elte.hu/book/1/view",
      "api_url": "https://usuarium.elte.hu/api/v1/sources/1",
      "conspectus_url": "https://usuarium.elte.hu/api/v1/sources/1/conspectus"
    },
    { "id": 2, "short_title": "Missale Pragense", … }
  ],
  "page": {
    "limit": 2,
    "next_cursor": "eyJpZCI6Mn0",
    "next": "https://usuarium.elte.hu/api/v1/sources?limit=2&cursor=eyJpZCI6Mn0"
  }
}

Download everything #

Follow page.next until it is null, and wait between requests. This loop stays inside the rate limit and backs off if the server answers 429.

pythondownload_conspectus.py
import json, time, urllib.error, urllib.request

url = "https://usuarium.elte.hu/api/v1/conspectus?limit=500"
headers = {"User-Agent": "my-research-script (me@example.org)"}

with open("conspectus.jsonl", "w", encoding="utf-8") as out:
    while url:
        req = urllib.request.Request(url, headers=headers)
        try:
            with urllib.request.urlopen(req) as r:
                body = json.load(r)
        except urllib.error.HTTPError as e:
            if e.code == 429:                       # too fast: wait as told
                time.sleep(int(e.headers.get("Retry-After", 10)))
                continue
            raise
        for item in body["data"]:
            out.write(json.dumps(item, ensure_ascii=False) + "\n")
        url = body["page"]["next"]          # None on the last page
        time.sleep(5)                               # 1 request / 5 s on average
shellSame loop with curl and jq
url='https://usuarium.elte.hu/api/v1/sources?limit=500'
while [ "$url" != "null" ]; do
  page=$(curl -sf --retry 5 "$url") || break
  echo "$page" | jq -c '.data[]' >> sources.jsonl
  url=$(echo "$page" | jq -r '.page.next')
  sleep 5
done

All sources fit in a handful of pages of 500, so this one finishes in under half a minute.

For your AI assistant

Working with Claude or a similar assistant? Give it this text, or just the URL below. It explains the API, the fields, the rate limit and how to credit Usuarium, in a form an assistant can follow without reading the rest of this page.

usuarium.elte.hu/api-doc/assistant.md
Show the text (assistant.md)
# Usuarium public API: a guide for AI assistants

Usuarium (https://usuarium.elte.hu) is a scholarly database of medieval and early modern
liturgical books (manuscripts and printed books), run at Eötvös Loránd University, Budapest.
Its public API is read-only JSON, free, and needs no key.

Base URL: https://usuarium.elte.hu/api/v1
Machine-readable description (OpenAPI 3.1): https://usuarium.elte.hu/api/v1/openapi.json
Human documentation: https://usuarium.elte.hu/api-doc

## Resources (GET only)
- /sources, /sources/{id}: the sources (books). Main fields: id, short_title, original_title,
  age (date as written), age_order (sortable year), manuscript, library {id, name, city, country},
  origin {id, name, country_code}, genres, printers, catalogues, has_conspectus, url.
- /sources/{id}/conspectus: the conspectus items of one source.
- /conspectus, /conspectus/{id}: the conspectus items (the contents of the books). Main fields:
  id, source {id, short_title}, item (incipit as written), standard_item, rubrics, ceremony,
  page {id, label}, sequence, and coded fields as {code, label}: layer, rite, type, part,
  season, week, day, mass_hour, genre, series.
- A list answers {"data": [...], "page": {"limit", "next_cursor", "next"}}; one record
  answers {"data": {...}}. Every record has "url" (its Usuarium page): keep it when citing.

## Downloading
GET a list with limit=500, then follow page.next until it is null. page.next keeps your
filters. Lists are ordered by id; there is no total count.

## Rate limit
Per IP: bursts of 20, then 1 request every 5 seconds. Every request costs a token, errors
included. On HTTP 429, wait Retry-After seconds, then go on. Stay at about one request
every 5 seconds and never send requests in parallel. A full conspectus download takes
about 4 hours.

## Filtering
filter[field]=value means equality; filter[field][op]=value takes an operator:
eq, ne, in, lt, lte, gt, gte, contains, null. Several filters are ANDed.
Relations filter by id, coded fields by their integer code. Examples:
- https://usuarium.elte.hu/api/v1/sources/837/conspectus?limit=500
- https://usuarium.elte.hu/api/v1/sources?filter[library]=140
- https://usuarium.elte.hu/api/v1/conspectus?filter[item][contains]=Asperges
- https://usuarium.elte.hu/api/v1/sources?filter[manuscript]=false&filter[age_order][lt]=1501
ne excludes rows where the field is empty; in takes up to 100 comma-separated values
(no spaces); a bare YYYY-MM-DD date matches the whole day.

## Errors
{"error": {"status", "code", "message"}}. Codes:
invalid_filter, invalid_cursor, bad_request, not_found, method_not_allowed, rate_limited, server_error, query_timeout.

## Terms
Licence: CC BY-NC 4.0 (https://creativecommons.org/licenses/by-nc/4.0/);
research use.
Technical problems: gkaroly@gmail.com.
Questions about the data: foldvary.miklos@btk.elte.hu.

## Attribution
Wherever the data are used, credit Usuarium:

Anyone using the USUARIUM datasets in any way and for any purpose is hereby asked to acknowledge the copyright and the source of the data by including the following attribution statement:

> Data retrieved from USUARIUM: A Digital Library and Database for the Study of Latin Liturgical History in the Middle Ages and Early Modern Period (http://usuarium.elte.hu) built by Miklós István Földváry et al. at Eötvös Loránd University (Budapest, Hungary), Research Group of Liturgical History—from 2015 onwards.

02 Resources and endpoints #

There are two resources. A source is one book; a conspectus item is one line of the item-level description of a book's contents. Paths are relative to the base URL. All endpoints accept only GET.

GET/sources#

The published sources, by id ascending, one page at a time.

ParameterTypeDescription
limitintegerRecords per page. Default 100; a value above 500 is clamped to 500 and one below 1 to 1, not rejected. A non-integer is a 400 invalid_filter.
cursorstringOpaque position from the previous page's page.next_cursor. Omit it for the first page. An invalid cursor is a 400 invalid_cursor. Following page.next sets it for you.
filter[…]see FilteringAny of these 22 fields (operators): id, short_title, original_title, edition, age, age_order, online, remark, manuscript, copy_kind, published_at, shelfmark, shelfmark_of_library, library, origin, printers, genres, catalogues, book_group, has_conspectus, has_index, has_calendar.

GET/sources/{id}#

One source; 404 if it does not exist or is a draft.

ParameterTypeDescription
id pathintegerThe record id (digits).
jsonGET /sources/837
{
  "data": {
    "id": 837,
    "short_title": "Manuale Cordubense",
    "original_title": "Manuale vetus Cordubense pro administratione sacramentorum et ad alia munera ecclesiastica fungenda",
    "edition": null,
    "age": "1617",
    "age_order": 1617,
    "online": "http://hdl.handle.net/2027/ucm.5319078356",
    "remark": "Second copy",
    "manuscript": false,
    "copy_kind": { "code": 1, "label": "original" },
    "published_at": "2014-10-28T08:49:38+00:00",
    "shelfmark": 30280,
    "shelfmark_of_library": "BH DER 12632",
    "library": {
      "id": 161,
      "name": "Universidad Complutense, Biblioteca de San Isidoro",
      "short_name": "Complutense Madrid",
      "city": "Madrid",
      "country": "ES"
    },
    "origin": { "id": 101, "name": "Córdoba", "country_code": "ES" },
    "printers": [ { "id": 378, "name": "s.n." } ],
    "genres": [ { "id": 21, "label": "Ritual" } ],
    "catalogues": [
      {
        "id": 22,
        "short_name": "CCPB",
        "title": "Catálogo Colectivo del Patrimonio Bibliográfico Español",
        "catalogue_number": "33318-2",
        "url": "http://catalogos.mecd.es/CCPB/cgi-ccpb/abnetopac?ACC=DOSEARCH&xsqf99=CCPB000033318-2"
      }
    ],
    "book_group": null,
    "has_conspectus": true,
    "has_index": true,
    "has_calendar": false,
    "url": "https://usuarium.elte.hu/book/837/view",
    "api_url": "https://usuarium.elte.hu/api/v1/sources/837",
    "conspectus_url": "https://usuarium.elte.hu/api/v1/sources/837/conspectus"
  }
}

GET/sources/{id}/conspectus#

The same as /conspectus?filter[source]={id}, but 404 if the source does not exist or is a draft. Further filters are ANDed; page.next keeps this path.

ParameterTypeDescription
id pathintegerThe record id (digits).
limitintegerRecords per page. Default 100; a value above 500 is clamped to 500 and one below 1 to 1, not rejected. A non-integer is a 400 invalid_filter.
cursorstringOpaque position from the previous page's page.next_cursor. Omit it for the first page. An invalid cursor is a 400 invalid_cursor. Following page.next sets it for you.
filter[…]see FilteringAny of these 24 fields (operators): id, source, item, standard_item, rubrics, remark, module, sequence, book_sequence, ordering, layer, rite, type, part, season, week, day, mass_hour, genre, series, ceremony, topics, item_text, page.
jsonGET /sources/244/conspectus?filter[item][contains]=Asperges&limit=1
{
  "data": [
    {
      "id": 77603,
      "source": {
        "id": 244,
        "short_title": "Missale Ebredunense",
        "url": "https://usuarium.elte.hu/book/244/view",
        "api_url": "https://usuarium.elte.hu/api/v1/sources/244"
      },
      "item": "Asperges",
      "standard_item": "Asperges me",
      "rubrics": "Ad aspersionem aquae benedictae in dominicis diebus ante missam extra temporis paschale",
      "remark": null,
      "module": null,
      "sequence": 8,
      "book_sequence": 0,
      "ordering": 18,
      "layer": { "code": 2, "label": "G/A" },
      "rite": { "code": 1, "label": "Rom" },
      "type": { "code": 3, "label": "Rit" },
      "part": null,
      "season": null,
      "week": null,
      "day": null,
      "mass_hour": null,
      "genre": { "code": 510, "label": "Ant" },
      "series": { "code": 1, "label": null },
      "ceremony": { "id": 72, "name": "minor blessing of water" },
      "topics": [],
      "item_text": null,
      "page": { "id": 33500, "label": "18 (1v)" },
      "url": "https://usuarium.elte.hu/book/244/conspectuses#conspectus_77603",
      "api_url": "https://usuarium.elte.hu/api/v1/conspectus/77603"
    }
  ],
  "page": {
    "limit": 1,
    "next_cursor": "eyJpZCI6Nzc2MDN9",
    "next": "https://usuarium.elte.hu/api/v1/sources/244/conspectus?limit=1&cursor=eyJpZCI6Nzc2MDN9&filter%5Bitem%5D%5Bcontains%5D=Asperges"
  }
}

GET/conspectus#

The conspectus items of published sources, by id ascending, one page at a time.

ParameterTypeDescription
limitintegerRecords per page. Default 100; a value above 500 is clamped to 500 and one below 1 to 1, not rejected. A non-integer is a 400 invalid_filter.
cursorstringOpaque position from the previous page's page.next_cursor. Omit it for the first page. An invalid cursor is a 400 invalid_cursor. Following page.next sets it for you.
filter[…]see FilteringAny of these 24 fields (operators): id, source, item, standard_item, rubrics, remark, module, sequence, book_sequence, ordering, layer, rite, type, part, season, week, day, mass_hour, genre, series, ceremony, topics, item_text, page.

GET/conspectus/{id}#

One item; 404 if it does not exist or its source is a draft.

ParameterTypeDescription
id pathintegerThe record id (digits).

GET/openapi.json#

This file, as-is. It is rate-limited like every other /api/v1/ path.

03 Fields #

Every field is always present. Three kinds of values need a word of explanation:

  • Coded values are {"code", "label"} pairs: an integer code and its short label as the public conspectus table prints it, e.g. {"code": 510, "label": "Ant"}. Filter on the code (filter[genre]=510); show the label. A code without a label has "label": null.
  • Embedded objects (library, origin, book_group, source, ceremony, item_text, page) and lists of them (printers, genres, catalogues, topics) carry their own id and a few fields. Their subfields are listed indented below. Filters take the id: filter[library]=140.
  • Missing data is null. Lists are [] when empty.
Scholarly notation is data

Dates, titles and incipits keep the database's notation: age is the date as written (e.g. 1489-1500), with age_order as the year to sort and compare by; titles, incipits and rubrics keep their original spelling. Don't normalise them away.

Source #

FieldTypeMeaning
idintegerThe source id.
short_titlestring | nullThe short title, as used across Usuarium.
original_titlestring | nullThe original title.
editionstring | nullThe edition statement (printed sources).
agestring | nullThe date of the source as written.
age_orderintegerThe number Usuarium sorts sources by date with.
onlinestring | nullA link to, or note on, an online copy elsewhere.
remarkstring | nullFree-text remark.
manuscriptbooleanTrue for a manuscript, false for a printed source.
copy_kindcoded | nullThe kind of copy: code 1 original, 2 edition, 3 facsimile. Null when not recorded.
published_atdate-time | nullWhen the source was published in Usuarium (ISO 8601 date-time).
shelfmarkinteger | nullThe Usuarium shelfmark number.
shelfmark_of_librarystring | nullThe shelfmark in the holding library.
libraryobject | nullThe holding library; null when unknown.
idintegerThe library id.
namestring | nullThe library name.
short_namestring | nullThe short name (siglum).
citystring | nullThe city.
countrystring | nullThe country.
originobject | nullThe origin (use) of the source; null when unknown.
idintegerThe origin id.
namestring | nullThe origin (use) name.
country_codestring | nullThe country code of the origin.
printersobject[]The printers of a printed source; empty for manuscripts.
idintegerThe printer id.
namestring | nullThe printer name.
genresobject[]The genres of the source.
idintegerThe genre id.
labelstring | nullThe genre label.
cataloguesobject[]The catalogues that describe the source, with the catalogue number.
idintegerThe catalogue id.
short_namestring | nullThe catalogue's short title.
titlestring | nullThe catalogue's full title.
catalogue_numberstring | nullThe source's number in the catalogue.
urlstring | nullA link to the source in a digital catalogue.
book_groupobject | nullThe group of related sources (copies, volumes, editions...); null when not grouped.
idintegerThe group id.
relation_typestring | nullHow the grouped sources relate.
relation_type_otherstring | nullThe relation in words, when relation_type is "other".
sourcesinteger[]The ids of the published sources in the group (this one included), ascending.
has_conspectusbooleanWhether the source has conspectus items (see conspectus_url).
has_indexbooleanWhether the source has a published index.
has_calendarbooleanWhether the source has a calendar.
urlurlThe source's public Usuarium page.
api_urlurlThis record in the API.
conspectus_urlurlThe API list of this source's conspectus items.

Conspectus item #

FieldTypeMeaning
idintegerThe item id.
sourceobject | nullThe source the item belongs to.
idintegerThe source id.
short_titlestring | nullThe source's short title.
urlurlThe source's public Usuarium page.
api_urlurlThe source in the API.
itemstring | nullThe item (incipit) as written in the source.
standard_itemstring | nullThe standardised form of the item.
rubricsstring | nullThe rubrics accompanying the item.
remarkstring | nullFree-text remark.
modulestring | nullThe larger liturgical unit the item belongs to (e.g. Canon of the Mass).
sequenceintegerThe item's position in the order of the items.
book_sequenceintegerThe item's sequence number within the source.
orderingintegerEquals the digital page number of the item's page (the number in page.label before any parenthesis).
layercoded | nullThe layer: sacramentary/collectary, gradual/antiphonal, lectionary or rubric. A {code, label} pair; null when unset.
ritecoded | nullThe rite. A {code, label} pair; null when unset.
typecoded | nullThe type: mass, office or other. A {code, label} pair; null when unset.
partcoded | nullThe part: temporal, sanctoral, common, votive, ordinary or psalter. A {code, label} pair; null when unset.
seasoncoded | nullThe season or month. A {code, label} pair; null when unset.
weekcoded | nullThe week. A {code, label} pair; null when unset.
daycoded | nullThe day. A {code, label} pair; null when unset.
mass_hourcoded | nullThe mass or hour. A {code, label} pair; null when unset.
genrecoded | nullThe genre of the item. A {code, label} pair; null when unset.
seriescoded | nullThe series number; its label is always null. A {code, label} pair; null when unset.
ceremonyobject | nullThe ceremony; null when none.
idintegerThe ceremony id.
namestring | nullThe ceremony name.
topicsobject[]The topics of the item.
idintegerThe topic id.
labelstring | nullThe topic label.
item_textobject | nullThe standard text the item is identified with; null when not identified.
idintegerThe text id.
incipitstring | nullThe standard incipit.
cantus_index_identifierstring | nullThe Cantus Index identifier.
usuarium_identifierstring | nullThe Usuarium text identifier.
pageobject | nullThe page the item is on (no image link: page views need a login); null when not assigned.
idintegerThe page id.
labelstringThe folio label as the public conspectus table prints it: the digital page number, then the original page number in parentheses when there is one.
urlurlThe item's row on the source's public conspectus page.
api_urlurlThis record in the API.

04 Filtering #

List endpoints take filters as query parameters, named after the JSON fields. Several filters combine with AND. Other unknown query parameters are ignored, but an unknown filter field or operator is a 400 invalid_filter whose message names the allowed ones.

filter[field]=value
Equality. The same as filter[field][eq]=value.
filter[field][op]=value
Apply operator op.
filter[relation]=id
An embedded object filters by its id (filter[library]=140, filter[source]=837), a coded value by its code (filter[season]=5).
filter[list]=id
A list (printers, genres, catalogues, topics) matches records that have that id among their entries: filter[genres]=4.

Operators #

OperatorMeaningValue
eqequalsone value
nedoes not equal; also excludes rows where the field is empty (null)one value
inequals any of; at most 100 values, not trimmed (no spaces after the commas)comma-separated list
lt · lteless than · less than or equalone value
gt · gtegreater than · greater than or equalone value
containscontains the text, case-insensitivetext
nullis empty (true) or not empty (false)true | false

Which operators work on which field type

Field typeeqneinltltegtgtecontainsnull
integer, codedyesyesyesyesyesyesyes—yes
textyesyesyes————yesyes
booleanyes————————
date-timeyes——yesyesyesyes—yes
relation (to one)yesyesyesyesyesyesyes—yes
relation (to many)yes—yes——————
Good to know
  • ne excludes rows where the field is empty, too: filter[rite][ne]=1 does not return items without a rite. Add filter[rite][null]=true in a second request to get those.
  • A bare date (YYYY-MM-DD) on published_at means the whole day: eq matches the whole day, lt/gte compare with its midnight, lte/gt with the next midnight. A full ISO 8601 date-time compares as an instant.
  • in takes at most 100 comma-separated values. They are not trimmed: write in=4,10, not in=4, 10.
  • Booleans are true/false (or 1/0) and take only eq.
  • Browser clients may call the API from any origin (Access-Control-Allow-Origin: *). A simple GET needs no CORS preflight; a preflight (OPTIONS) is not supported and gets 405 method_not_allowed, so do not add custom request headers in the browser.

Sources filters #

FilterValueOperatorsDescription
filter[id]integereq ne in lt lte gt gte nullThe source id. Operators: eq, ne, in, lt, lte, gt, gte, null. ne excludes rows where the field is null; in takes up to 100 comma-separated values.
filter[short_title]stringeq ne in contains nullThe short title. Operators: eq, ne, in, contains, null. contains is a case-insensitive substring match; ne excludes rows where the field is null; in takes up to 100 comma-separated values, which are not trimmed.
filter[original_title]stringeq ne in contains nullThe original title. Operators: eq, ne, in, contains, null. contains is a case-insensitive substring match; ne excludes rows where the field is null; in takes up to 100 comma-separated values, which are not trimmed.
filter[edition]stringeq ne in contains nullThe edition statement. Operators: eq, ne, in, contains, null. contains is a case-insensitive substring match; ne excludes rows where the field is null; in takes up to 100 comma-separated values, which are not trimmed.
filter[age]stringeq ne in contains nullThe date of the source as written. Operators: eq, ne, in, contains, null. contains is a case-insensitive substring match; ne excludes rows where the field is null; in takes up to 100 comma-separated values, which are not trimmed.
filter[age_order]integereq ne in lt lte gt gte nullThe number Usuarium sorts sources by date with. Operators: eq, ne, in, lt, lte, gt, gte, null. ne excludes rows where the field is null; in takes up to 100 comma-separated values.
filter[online]stringeq ne in contains nullThe online-availability link or note. Operators: eq, ne, in, contains, null. contains is a case-insensitive substring match; ne excludes rows where the field is null; in takes up to 100 comma-separated values, which are not trimmed.
filter[remark]stringeq ne in contains nullThe free-text remark. Operators: eq, ne, in, contains, null. contains is a case-insensitive substring match; ne excludes rows where the field is null; in takes up to 100 comma-separated values, which are not trimmed.
filter[manuscript]booleaneqWhether the source is a manuscript (false: printed). Operator: eq, with true/false (or 1/0).
filter[copy_kind]integereq ne in lt lte gt gte nullThe copy kind (1 original, 2 edition, 3 facsimile). Filters by the integer code, not the label. Operators: eq, ne, in, lt, lte, gt, gte, null. ne excludes rows where the field is unset; in takes up to 100 comma-separated codes.
filter[published_at]stringeq lt lte gt gte nullWhen the source was published in Usuarium. Operators: eq, lt, lte, gt, gte, null. A bare date (YYYY-MM-DD) means the whole day; a full ISO 8601 date-time compares as an instant.
filter[shelfmark]integereq ne in lt lte gt gte nullThe Usuarium shelfmark number. Operators: eq, ne, in, lt, lte, gt, gte, null. ne excludes rows where the field is null; in takes up to 100 comma-separated values.
filter[shelfmark_of_library]stringeq ne in contains nullThe holding library's shelfmark. Operators: eq, ne, in, contains, null. contains is a case-insensitive substring match; ne excludes rows where the field is null; in takes up to 100 comma-separated values, which are not trimmed.
filter[library]integereq ne in lt lte gt gte nullThe holding library. Filters by the related record's id. Operators: eq, ne, in, lt, lte, gt, gte, null. ne excludes rows without a related record; in takes up to 100 comma-separated ids.
filter[origin]integereq ne in lt lte gt gte nullThe origin (use). Filters by the related record's id. Operators: eq, ne, in, lt, lte, gt, gte, null. ne excludes rows without a related record; in takes up to 100 comma-separated ids.
filter[printers]integereq inThe printers. Matches records that have the related record with this id. Operators: eq (has this id), in (has any of up to 100 comma-separated ids).
filter[genres]integereq inThe genres. Matches records that have the related record with this id. Operators: eq (has this id), in (has any of up to 100 comma-separated ids).
filter[catalogues]integereq inThe catalogues that describe the source. Matches records that have the related record with this id. Operators: eq (has this id), in (has any of up to 100 comma-separated ids).
filter[book_group]integereq ne in lt lte gt gte nullThe group of related sources. Filters by the related record's id. Operators: eq, ne, in, lt, lte, gt, gte, null. ne excludes rows without a related record; in takes up to 100 comma-separated ids.
filter[has_conspectus]booleaneqWhether the source has a conspectus. Operator: eq, with true/false (or 1/0).
filter[has_index]booleaneqWhether the source has an index. Operator: eq, with true/false (or 1/0).
filter[has_calendar]booleaneqWhether the source has a calendar. Operator: eq, with true/false (or 1/0).

Conspectus filters #

FilterValueOperatorsDescription
filter[id]integereq ne in lt lte gt gte nullThe item id. Operators: eq, ne, in, lt, lte, gt, gte, null. ne excludes rows where the field is null; in takes up to 100 comma-separated values.
filter[source]integereq ne in lt lte gt gte nullThe source the item belongs to. Filters by the related record's id. Operators: eq, ne, in, lt, lte, gt, gte, null. ne excludes rows without a related record; in takes up to 100 comma-separated ids.
filter[item]stringeq ne in contains nullThe item (incipit) as written in the source. Operators: eq, ne, in, contains, null. contains is a case-insensitive substring match; ne excludes rows where the field is null; in takes up to 100 comma-separated values, which are not trimmed.
filter[standard_item]stringeq ne in contains nullThe standardised item. Operators: eq, ne, in, contains, null. contains is a case-insensitive substring match; ne excludes rows where the field is null; in takes up to 100 comma-separated values, which are not trimmed.
filter[rubrics]stringeq ne in contains nullThe rubrics. Operators: eq, ne, in, contains, null. contains is a case-insensitive substring match; ne excludes rows where the field is null; in takes up to 100 comma-separated values, which are not trimmed.
filter[remark]stringeq ne in contains nullThe free-text remark. Operators: eq, ne, in, contains, null. contains is a case-insensitive substring match; ne excludes rows where the field is null; in takes up to 100 comma-separated values, which are not trimmed.
filter[module]stringeq ne in contains nullThe larger liturgical unit the item belongs to (e.g. Canon of the Mass). Operators: eq, ne, in, contains, null. contains is a case-insensitive substring match; ne excludes rows where the field is null; in takes up to 100 comma-separated values, which are not trimmed.
filter[sequence]integereq ne in lt lte gt gte nullThe item's position in the order of the items. Operators: eq, ne, in, lt, lte, gt, gte, null. ne excludes rows where the field is null; in takes up to 100 comma-separated values.
filter[book_sequence]integereq ne in lt lte gt gte nullThe item's sequence number within the source. Operators: eq, ne, in, lt, lte, gt, gte, null. ne excludes rows where the field is null; in takes up to 100 comma-separated values.
filter[ordering]integereq ne in lt lte gt gte nullThe digital page number of the item's page. Operators: eq, ne, in, lt, lte, gt, gte, null. ne excludes rows where the field is null; in takes up to 100 comma-separated values.
filter[layer]integereq ne in lt lte gt gte nullThe layer (sacramentary/collectary, gradual/antiphonal, lectionary, rubric). Filters by the integer code, not the label. Operators: eq, ne, in, lt, lte, gt, gte, null. ne excludes rows where the field is unset; in takes up to 100 comma-separated codes.
filter[rite]integereq ne in lt lte gt gte nullThe rite. Filters by the integer code, not the label. Operators: eq, ne, in, lt, lte, gt, gte, null. ne excludes rows where the field is unset; in takes up to 100 comma-separated codes.
filter[type]integereq ne in lt lte gt gte nullThe type (mass, office, other). Filters by the integer code, not the label. Operators: eq, ne, in, lt, lte, gt, gte, null. ne excludes rows where the field is unset; in takes up to 100 comma-separated codes.
filter[part]integereq ne in lt lte gt gte nullThe part (temporal, sanctoral, common, votive, ordinary, psalter). Filters by the integer code, not the label. Operators: eq, ne, in, lt, lte, gt, gte, null. ne excludes rows where the field is unset; in takes up to 100 comma-separated codes.
filter[season]integereq ne in lt lte gt gte nullThe season or month. Filters by the integer code, not the label. Operators: eq, ne, in, lt, lte, gt, gte, null. ne excludes rows where the field is unset; in takes up to 100 comma-separated codes.
filter[week]integereq ne in lt lte gt gte nullThe week. Filters by the integer code, not the label. Operators: eq, ne, in, lt, lte, gt, gte, null. ne excludes rows where the field is unset; in takes up to 100 comma-separated codes.
filter[day]integereq ne in lt lte gt gte nullThe day. Filters by the integer code, not the label. Operators: eq, ne, in, lt, lte, gt, gte, null. ne excludes rows where the field is unset; in takes up to 100 comma-separated codes.
filter[mass_hour]integereq ne in lt lte gt gte nullThe mass or hour. Filters by the integer code, not the label. Operators: eq, ne, in, lt, lte, gt, gte, null. ne excludes rows where the field is unset; in takes up to 100 comma-separated codes.
filter[genre]integereq ne in lt lte gt gte nullThe genre of the item. Filters by the integer code, not the label. Operators: eq, ne, in, lt, lte, gt, gte, null. ne excludes rows where the field is unset; in takes up to 100 comma-separated codes.
filter[series]integereq ne in lt lte gt gte nullThe series number. Filters by the integer code, not the label. Operators: eq, ne, in, lt, lte, gt, gte, null. ne excludes rows where the field is unset; in takes up to 100 comma-separated codes.
filter[ceremony]integereq ne in lt lte gt gte nullThe ceremony. Filters by the related record's id. Operators: eq, ne, in, lt, lte, gt, gte, null. ne excludes rows without a related record; in takes up to 100 comma-separated ids.
filter[topics]integereq inThe topics. Matches records that have the related record with this id. Operators: eq (has this id), in (has any of up to 100 comma-separated ids).
filter[item_text]integereq ne in lt lte gt gte nullThe standard text the item is identified with. Filters by the related record's id. Operators: eq, ne, in, lt, lte, gt, gte, null. ne excludes rows without a related record; in takes up to 100 comma-separated ids.
filter[page]integereq ne in lt lte gt gte nullThe page the item is on. Filters by the related record's id. Operators: eq, ne, in, lt, lte, gt, gte, null. ne excludes rows without a related record; in takes up to 100 comma-separated ids.

Examples #

shellAll conspectus items of source 837
curl 'https://usuarium.elte.hu/api/v1/sources/837/conspectus?limit=500'
shellAll sources held by one library
curl -g 'https://usuarium.elte.hu/api/v1/sources?filter[library]=140'
shellItems whose incipit contains “Asperges”
curl -g 'https://usuarium.elte.hu/api/v1/conspectus?filter[item][contains]=Asperges'
shellPrinted missals and breviaries before 1501
curl -g 'https://usuarium.elte.hu/api/v1/sources?filter[manuscript]=false&filter[genres][in]=4,10&filter[age_order][lt]=1501'
Brackets in URLs

Some tools treat [ and ] specially. With curl, add -g, or encode them as %5B and %5D. Python's urllib and requests handle them as they are.

05 Pagination #

Lists are ordered by id and paged with a cursor. limit sets the page size: the default is 100, the maximum 500 (a larger value is clamped, not rejected). To get the next page, request the URL in page.next as it is. On the last page page.next and page.next_cursor are null.

jsonThe page object
"page": {
  "limit": 500,
  "next_cursor": "eyJpZCI6NTAwfQ",
  "next": "https://usuarium.elte.hu/api/v1/conspectus?limit=500&cursor=eyJpZCI6NTAwfQ"
}
  • Cursors are opaque. Do not decode, edit or build them; they may change format.
  • page.next keeps your filters and limit. If you use next_cursor instead, send the same filters with it.
  • Cursors do not expire, so an interrupted download can resume from the last next you saved. Records added while you page are not missed or repeated before your position.
Why there is no total count

Counting every match means reading every match, and on 1.4 million conspectus items with filters that costs more than serving the page itself. Cursor pages, by contrast, cost the same at the end of the list as at the start.

06 Rate limits #

Usuarium runs on modest university hardware, so requests are limited per IP address: on average 1 request every 5 seconds, with bursts of up to 20. You start with 20 requests in hand; one more becomes available every 5 seconds. Every request under /api/v1/ costs one, errors and 404s included.

Response headers

X-RateLimit-Limit
The bucket size: the burst a client IP may send (20).
X-RateLimit-Remaining
Requests left in the bucket. One token comes back every 5 seconds.
X-RateLimit-Reset
Unix time (seconds) when the bucket is full again.
Retry-After
Seconds to wait before the next request (on 429).

When you go over

The server answers 429 Too Many Requests with the error code rate_limited and a Retry-After header in seconds. Wait that long, then continue. Do not run requests in parallel: it does not make a download faster.

How long does a full download take?

All 1.4 million conspectus items at 500 per page are about 2,800 requests. At one request every 5 seconds that is roughly 4 hours. All sources take a handful of requests.

07 Errors #

Errors use the usual HTTP status codes and always have the same JSON body.

json400 Bad Request
{
  "error": {
    "status": 400,
    "code": "invalid_filter",
    "message": "Operator \"contains\" is not allowed on field \"source\". Allowed operators: eq, ne, in, lt, lte, gt, gte, null."
  }
}
CodeStatusMeaning and what to do
invalid_filter400Unknown filter field or operator, an operator the field does not allow, a bad value, or a bad limit. The message names the allowed fields or operators. Check Filtering.
invalid_cursor400The cursor is malformed or was altered. Use page.next exactly as returned.
bad_request400Another malformed request.
not_found404No published record with that id (or its source is a draft), or an unknown path under /api/v1/.
method_not_allowed405Anything but GET, a CORS preflight (OPTIONS) included.
rate_limited429Too many requests. Wait Retry-After seconds.
server_error500An unexpected error on the server. The message carries no details; try again later.
query_timeout503The query took too long. Narrow it, usually with filter[source], or use a longer contains text.

08 Machine-readable description #

The whole API is described in OpenAPI 3.1 at /api/v1/openapi.json. Use it to generate a client, or give it to an assistant together with assistant.md.

09 Terms and credit #

  • The data are offered for research use. Please do not republish bulk copies; link to Usuarium instead.
  • Wherever you use the data, include the attribution statement below, and keep each record's url so readers can check the source.
  • There are no API keys for now. Higher limits for larger projects may come later; tell us if you need them.

Licence #

CC BY-NC 4.0 Creative Commons Attribution-NonCommercial: reuse and adapt with attribution, not for commercial purposes.

Attribution statement #

Anyone using the USUARIUM datasets in any way and for any purpose is hereby asked to acknowledge the copyright and the source of the data by including the following attribution statement:

Data retrieved from USUARIUM: A Digital Library and Database for the Study of Latin Liturgical History in the Middle Ages and Early Modern Period (http://usuarium.elte.hu) built by Miklós István Földváry et al. at Eötvös Loránd University (Budapest, Hungary), Research Group of Liturgical History—from 2015 onwards.
Same text as on the site's Copyright page. Please quote it unchanged.

Contact

Technical problems
Errors, an endpoint that does not answer, rate limits: gkaroly@gmail.com
Questions about the data
Content, field meanings, use and credit: Miklós István Földváry, foldvary.miklos@btk.elte.hu