Skip to content

Upstream quirks

This page lists where the lobid-gnd API behaves differently from what its documentation suggests. The references are the API page, the usage policy, and live behavior of the service at https://lobid.org/gnd. Where a quirk affects bibliofabric.lobidgnd, the behavior of the client is noted.

  • There are no cursors. Search pages with from and size, and the response carries no Link header. Iteration walks offset pages of size records.
  • from past roughly 10000 answers HTTP 500 (the Elasticsearch result window); at from=10000 upstream ignores the offset and returns the first page again. The dialect therefore caps the offset at 9999 and raises ConfigurationError past it. For complete result sets, use download_jsonl() or a narrower query.
  • size=0 is not honored: the answer carries a default page of records. count() sends size=1 and reads totalItems.
  • A bogus filter value does not raise an error; the answer is a normal envelope with totalItems: 0. Same for a fielded query against an unknown field (bogusfield:value answers 0 results). The GndFilter model exists so typos on entity_type fail on the client side, but any other free-form filter value stays unvalidated.
  • The reconciliation manifest publishes eight entity types; GND_ENTITY_TYPES adds Person, which the API documentation uses as a filter value. The index also answers broader and more specific ones, for example filter=type:Person (which matches DifferentiatedPerson records and answers 4 hits for preferredName:Twain) and MusicalCorporateBody.
  • size accepts at least 500; the client caps page_size at 1000.
  • Each member record embeds its own @context key. The models absorb it through extra="allow".

Record lookup

  • A missing id answers HTTP 500 with a Spring template error body ("Exception evaluating SpringEL expression ...") instead of 404, both for GET and HEAD. The client therefore cannot offer exists(), and a genuinely broken id raises APIError with status 500 rather than NotFoundError.
  • The direct route answers the record as the JSON-LD body. The same record is reachable as .rdf, .ttl, and .nt; the client wraps only the JSON representation.
  • Field shapes vary between records. Most linked nodes arrive as {"id": ..., "label": ...} objects, but some records serve plain strings or bare URIs for the same field; IdLabel and SameAsEntry coerce those. deprecatedUri can be a single URI or a list of them (for records merged into a successor); the model normalizes it to a list.

Bulk JSONL

  • format=jsonl ignores size and streams every matching record, one JSON-LD object per line, as application/x-jsonlines. A bulk request for a broad query is a full result-set dump; scope the query (q=type:Country yields about 300 records, q=* yields millions).

Reconciliation service

  • The service speaks the Reconciliation Specification 0.1 and 0.2. The client uses the 0.2 form: one queries form parameter whose value is a JSON object keyed by query id.
  • Candidate ids come back as bare GND numbers ("118540238"), while records and suggestions identify records as d-nb.info URIs.

General

  • The usage policy asks for at most 6000 simple lookups per minute and 30 complex searches per minute, a descriptive and stable User-Agent, and client-side caching of at least 12 hours, because the data updates once per day. The client paces at 2 requests per second by default; pass mailto= so the User-Agent carries a contact address.