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
https://usuarium.elte.hu/api/v1
01 Quick start #
Ask for the first two sources. Every list response has a data array and a page object.
curl 'https://usuarium.elte.hu/api/v1/sources?limit=2'
{
"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.
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
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.
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 /sourcesList sources
- GET /sources/{id}Get one source
- GET /sources/{id}/conspectusList the conspectus items of one source
- GET /conspectusList conspectus items
- GET /conspectus/{id}Get one conspectus item
- GET /openapi.jsonThis OpenAPI description
GET/sources#
The published sources, by id ascending, one page at a time.
| Parameter | Type | Description |
|---|---|---|
| limit | integer | Records 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. |
| cursor | string | Opaque 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 Filtering | Any 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.
| Parameter | Type | Description |
|---|---|---|
| id path | integer | The record id (digits). |
{
"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.
| Parameter | Type | Description |
|---|---|---|
| id path | integer | The record id (digits). |
| limit | integer | Records 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. |
| cursor | string | Opaque 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 Filtering | Any 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. |
{
"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.
| Parameter | Type | Description |
|---|---|---|
| limit | integer | Records 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. |
| cursor | string | Opaque 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 Filtering | Any 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.
| Parameter | Type | Description |
|---|---|---|
| id path | integer | The 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.
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 #
| Field | Type | Meaning |
|---|---|---|
| id | integer | The source id. |
| short_title | string | null | The short title, as used across Usuarium. |
| original_title | string | null | The original title. |
| edition | string | null | The edition statement (printed sources). |
| age | string | null | The date of the source as written. |
| age_order | integer | The number Usuarium sorts sources by date with. |
| online | string | null | A link to, or note on, an online copy elsewhere. |
| remark | string | null | Free-text remark. |
| manuscript | boolean | True for a manuscript, false for a printed source. |
| copy_kind | coded | null | The kind of copy: code 1 original, 2 edition, 3 facsimile. Null when not recorded. |
| published_at | date-time | null | When the source was published in Usuarium (ISO 8601 date-time). |
| shelfmark | integer | null | The Usuarium shelfmark number. |
| shelfmark_of_library | string | null | The shelfmark in the holding library. |
| library | object | null | The holding library; null when unknown. |
| id | integer | The library id. |
| name | string | null | The library name. |
| short_name | string | null | The short name (siglum). |
| city | string | null | The city. |
| country | string | null | The country. |
| origin | object | null | The origin (use) of the source; null when unknown. |
| id | integer | The origin id. |
| name | string | null | The origin (use) name. |
| country_code | string | null | The country code of the origin. |
| printers | object[] | The printers of a printed source; empty for manuscripts. |
| id | integer | The printer id. |
| name | string | null | The printer name. |
| genres | object[] | The genres of the source. |
| id | integer | The genre id. |
| label | string | null | The genre label. |
| catalogues | object[] | The catalogues that describe the source, with the catalogue number. |
| id | integer | The catalogue id. |
| short_name | string | null | The catalogue's short title. |
| title | string | null | The catalogue's full title. |
| catalogue_number | string | null | The source's number in the catalogue. |
| url | string | null | A link to the source in a digital catalogue. |
| book_group | object | null | The group of related sources (copies, volumes, editions...); null when not grouped. |
| id | integer | The group id. |
| relation_type | string | null | How the grouped sources relate. |
| relation_type_other | string | null | The relation in words, when relation_type is "other". |
| sources | integer[] | The ids of the published sources in the group (this one included), ascending. |
| has_conspectus | boolean | Whether the source has conspectus items (see conspectus_url). |
| has_index | boolean | Whether the source has a published index. |
| has_calendar | boolean | Whether the source has a calendar. |
| url | url | The source's public Usuarium page. |
| api_url | url | This record in the API. |
| conspectus_url | url | The API list of this source's conspectus items. |
Conspectus item #
| Field | Type | Meaning |
|---|---|---|
| id | integer | The item id. |
| source | object | null | The source the item belongs to. |
| id | integer | The source id. |
| short_title | string | null | The source's short title. |
| url | url | The source's public Usuarium page. |
| api_url | url | The source in the API. |
| item | string | null | The item (incipit) as written in the source. |
| standard_item | string | null | The standardised form of the item. |
| rubrics | string | null | The rubrics accompanying the item. |
| remark | string | null | Free-text remark. |
| module | string | null | The larger liturgical unit the item belongs to (e.g. Canon of the Mass). |
| sequence | integer | The item's position in the order of the items. |
| book_sequence | integer | The item's sequence number within the source. |
| ordering | integer | Equals the digital page number of the item's page (the number in page.label before any parenthesis). |
| layer | coded | null | The layer: sacramentary/collectary, gradual/antiphonal, lectionary or rubric. A {code, label} pair; null when unset. |
| rite | coded | null | The rite. A {code, label} pair; null when unset. |
| type | coded | null | The type: mass, office or other. A {code, label} pair; null when unset. |
| part | coded | null | The part: temporal, sanctoral, common, votive, ordinary or psalter. A {code, label} pair; null when unset. |
| season | coded | null | The season or month. A {code, label} pair; null when unset. |
| week | coded | null | The week. A {code, label} pair; null when unset. |
| day | coded | null | The day. A {code, label} pair; null when unset. |
| mass_hour | coded | null | The mass or hour. A {code, label} pair; null when unset. |
| genre | coded | null | The genre of the item. A {code, label} pair; null when unset. |
| series | coded | null | The series number; its label is always null. A {code, label} pair; null when unset. |
| ceremony | object | null | The ceremony; null when none. |
| id | integer | The ceremony id. |
| name | string | null | The ceremony name. |
| topics | object[] | The topics of the item. |
| id | integer | The topic id. |
| label | string | null | The topic label. |
| item_text | object | null | The standard text the item is identified with; null when not identified. |
| id | integer | The text id. |
| incipit | string | null | The standard incipit. |
| cantus_index_identifier | string | null | The Cantus Index identifier. |
| usuarium_identifier | string | null | The Usuarium text identifier. |
| page | object | null | The page the item is on (no image link: page views need a login); null when not assigned. |
| id | integer | The page id. |
| label | string | The folio label as the public conspectus table prints it: the digital page number, then the original page number in parentheses when there is one. |
| url | url | The item's row on the source's public conspectus page. |
| api_url | url | This 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 #
| Operator | Meaning | Value |
|---|---|---|
| eq | equals | one value |
| ne | does not equal; also excludes rows where the field is empty (null) | one value |
| in | equals any of; at most 100 values, not trimmed (no spaces after the commas) | comma-separated list |
| lt · lte | less than · less than or equal | one value |
| gt · gte | greater than · greater than or equal | one value |
| contains | contains the text, case-insensitive | text |
| null | is empty (true) or not empty (false) | true | false |
Which operators work on which field type
| Field type | eq | ne | in | lt | lte | gt | gte | contains | null |
|---|---|---|---|---|---|---|---|---|---|
| integer, coded | yes | yes | yes | yes | yes | yes | yes | — | yes |
| text | yes | yes | yes | — | — | — | — | yes | yes |
| boolean | yes | — | — | — | — | — | — | — | — |
| date-time | yes | — | — | yes | yes | yes | yes | — | yes |
| relation (to one) | yes | yes | yes | yes | yes | yes | yes | — | yes |
| relation (to many) | yes | — | yes | — | — | — | — | — | — |
neexcludes rows where the field is empty, too:filter[rite][ne]=1does not return items without a rite. Addfilter[rite][null]=truein a second request to get those.- A bare date (
YYYY-MM-DD) onpublished_atmeans the whole day:eqmatches the whole day,lt/gtecompare with its midnight,lte/gtwith the next midnight. A full ISO 8601 date-time compares as an instant. intakes at most 100 comma-separated values. They are not trimmed: writein=4,10, notin=4, 10.- Booleans are
true/false(or1/0) and take onlyeq. - Browser clients may call the API from any origin (
Access-Control-Allow-Origin: *). A simpleGETneeds no CORS preflight; a preflight (OPTIONS) is not supported and gets405 method_not_allowed, so do not add custom request headers in the browser.
Sources filters #
| Filter | Value | Operators | Description |
|---|---|---|---|
| filter[id] | integer | eq ne in lt lte gt gte null | The 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] | string | eq ne in contains null | The 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] | string | eq ne in contains null | The 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] | string | eq ne in contains null | The 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] | string | eq ne in contains null | The 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] | integer | eq ne in lt lte gt gte null | The 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] | string | eq ne in contains null | The 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] | string | eq ne in contains null | The 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] | boolean | eq | Whether the source is a manuscript (false: printed). Operator: eq, with true/false (or 1/0). |
| filter[copy_kind] | integer | eq ne in lt lte gt gte null | The 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] | string | eq lt lte gt gte null | When 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] | integer | eq ne in lt lte gt gte null | The 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] | string | eq ne in contains null | The 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] | integer | eq ne in lt lte gt gte null | The 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] | integer | eq ne in lt lte gt gte null | The 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] | integer | eq in | The 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] | integer | eq in | The 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] | integer | eq in | The 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] | integer | eq ne in lt lte gt gte null | The 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] | boolean | eq | Whether the source has a conspectus. Operator: eq, with true/false (or 1/0). |
| filter[has_index] | boolean | eq | Whether the source has an index. Operator: eq, with true/false (or 1/0). |
| filter[has_calendar] | boolean | eq | Whether the source has a calendar. Operator: eq, with true/false (or 1/0). |
Conspectus filters #
| Filter | Value | Operators | Description |
|---|---|---|---|
| filter[id] | integer | eq ne in lt lte gt gte null | The 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] | integer | eq ne in lt lte gt gte null | The 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] | string | eq ne in contains null | The 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] | string | eq ne in contains null | The 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] | string | eq ne in contains null | The 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] | string | eq ne in contains null | The 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] | string | eq ne in contains null | The 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] | integer | eq ne in lt lte gt gte null | The 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] | integer | eq ne in lt lte gt gte null | The 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] | integer | eq ne in lt lte gt gte null | The 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] | integer | eq ne in lt lte gt gte null | The 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] | integer | eq ne in lt lte gt gte null | The 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] | integer | eq ne in lt lte gt gte null | The 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] | integer | eq ne in lt lte gt gte null | The 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] | integer | eq ne in lt lte gt gte null | The 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] | integer | eq ne in lt lte gt gte null | The 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] | integer | eq ne in lt lte gt gte null | The 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] | integer | eq ne in lt lte gt gte null | The 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] | integer | eq ne in lt lte gt gte null | The 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] | integer | eq ne in lt lte gt gte null | The 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] | integer | eq ne in lt lte gt gte null | The 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] | integer | eq in | The 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] | integer | eq ne in lt lte gt gte null | The 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] | integer | eq ne in lt lte gt gte null | The 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 #
curl 'https://usuarium.elte.hu/api/v1/sources/837/conspectus?limit=500'
curl -g 'https://usuarium.elte.hu/api/v1/sources?filter[library]=140'
curl -g 'https://usuarium.elte.hu/api/v1/conspectus?filter[item][contains]=Asperges'
curl -g 'https://usuarium.elte.hu/api/v1/sources?filter[manuscript]=false&filter[genres][in]=4,10&filter[age_order][lt]=1501'
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.
"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.nextkeeps your filters and limit. If you usenext_cursorinstead, send the same filters with it.- Cursors do not expire, so an interrupted download can resume from the last
nextyou saved. Records added while you page are not missed or repeated before your position.
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.
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.
{
"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."
}
}
| Code | Status | Meaning and what to do |
|---|---|---|
| invalid_filter | 400 | Unknown 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_cursor | 400 | The cursor is malformed or was altered. Use page.next exactly as returned. |
| bad_request | 400 | Another malformed request. |
| not_found | 404 | No published record with that id (or its source is a draft), or an unknown path under /api/v1/. |
| method_not_allowed | 405 | Anything but GET, a CORS preflight (OPTIONS) included. |
| rate_limited | 429 | Too many requests. Wait Retry-After seconds. |
| server_error | 500 | An unexpected error on the server. The message carries no details; try again later. |
| query_timeout | 503 | The 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
urlso 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.
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