Upstream quirks
This page lists where the RAiD Federation API (api.raid.org) behaves in ways a caller would not guess from the route list alone. Where a quirk affects bibliofabric.raid, the behavior of the client is noted. The facts come from the live API and its published OpenAPI document (embedded in the page at docs.api.raid.org, not served as a standalone file).
Reference pages used:
- The Federation API document at https://docs.api.raid.org/ (Swagger UI with the OpenAPI 3.0.3 specification inline, version 5.2.1).
- The RAiD documentation at https://documentation.raid.org/.
The dataset
The API is a federation cache, not a live registry. A scheduled ingest
runs every 24 hours and collects the open-access RAiDs of each
participating registration agency; responses can also be served from
caches for up to an hour (Cache-Control: public, max-age=3600). A RAiD
appears only once its access is open, and never leaves the dataset:
RAiDs are not deleted, and access only moves from embargoed to open.
Every paged response carries a sources block with generatedAt,
included (each agency and its harvestedAt), unavailable, and
syncFrom. bibliofabric.raid surfaces the block as page.meta["sources"].
The embargo rule is one-way, so a record's access.embargoExpiry stays
visible on records whose embargo ended; the live dataset carried it on 86
of 635 records while every record answered with the open-access type
c_abf2.
Routing
Search lives at /raid/ (with the trailing slash), the prefix listing at
/raid/{prefix}/, a single RAiD at /raid/{prefix}/{suffix}, and the
directory at /service-point/. The same paths also answer without the
trailing slash; bibliofabric.raid sends /raid for searches (the core
joins path and query string) and the trailing-slash forms where the
route is path-shaped.
The handle slash in the single-RAiD path must not be percent-encoded:
/raid/10.26259%2F488751 answers 404. bibliofabric.raid builds the path
from the prefix and suffix separately and percent-encodes each part.
The roadmap facts that named /read and /raids are stale: both paths
answer 404 with {"error": "Not found", "message": "..."}. The live
operations are searchRaids, listRaidsByPrefix, getRaid, and
listServicePoints.
Unknown paths answer 404 with a JSON body that names the four routes. The
same JSON shape ({"error", "message"}) serves all error statuses.
Search semantics
q searches whole words of every title and description, ignoring case
and accents, with no stemming, no stop words, and no ranking. Any word
may match; a double-quoted phrase must appear in order in one text.
q is at most 200 characters; a longer q or an unbalanced quote is a
400 answer. An empty or whitespace-only q is ignored.
Identifier filters accept flexible input and normalise it before
matching: bare ids, hyphenated ids, and URLs all match, and the match is
host-tolerant on the handle path. A malformed identifier returns an
empty result rather than an error. Only one identifier filter parameter
is allowed per request; a second is a 400 answer.
bibliofabric.raid enforces the rule client-side in raid_filter_params().
Any query parameter an operation does not list is a 400 answer naming the parameter and the supported ones, so a misspelt filter fails loudly. Parameters are case-sensitive.
Results return the complete metadata record of each match, verbatim from
the minting agency, not a summary. Records from different agencies can
therefore carry different field sets: in the live dataset,
organisation appeared on 633 of 635 records, subject on 590, and the
schema-version-3 blocks (alternateIdentifier, alternateUrl,
relatedObject, relatedRaid, spatialCoverage) on about 510.
bibliofabric.raid models every field as optional and keeps undeclared
fields in model_extra.
Paging
Paging uses one opaque cursor parameter; there are no page numbers and
no offsets. limit is 1 to 100 (default 25); a larger limit is capped
at 100 and pageInfo.limit reports the size applied. A cursor the API
did not issue is a 400 answer, and cursors issued before release 5.0.0
are rejected.
Records come in ascending order of metadata.updated, then
identifier.id. If the dataset regenerates during a crawl, no record is
skipped or repeated, except one updated mid-crawl, which can arrive twice
with its newer metadata.
metadata.created and metadata.updated are epoch seconds, while the
sync windows (updatedSince, createdSince) take epoch seconds, ISO
8601 dates (midnight UTC), or date-times with a time zone. A timestamp
in milliseconds is a 400 answer. Both bounds are inclusive.
Caching
Every 200 answer carries a weak ETag built from the API version and
sources.generatedAt, for example W/"5.2.1-2026-11-30T02:47:48.435Z";
the 404 of a missing RAiD carries one too. Sending it as If-None-Match
returns 304 with no body when the dataset has not regenerated, even
though a new ETag means only that the dataset was rebuilt, not that this
response changed. The ETag is exposed to browsers through
Access-Control-Expose-Headers, and any origin may call the API.
bibliofabric.raid sends no If-None-Match itself; pass it through
headers= on a raw request() call when polling.
Bodies are compressed with Brotli or gzip when the request sends
Accept-Encoding, as most HTTP clients do by default.
Limits and politeness
No rate limit is enforced. The API asks for fair use: page sequentially rather than in parallel, and contact RAiD Support before heavy use. bibliofabric.raid defaults to 2 requests per second and concurrency 2. Requests more often than once an hour buy nothing, because the data changes at most once a day.
OPTIONS on any path answers 204 for CORS preflight, and HEAD is
accepted (the CORS header lists GET, HEAD, OPTIONS), so the default
exists() HEAD probe works against the single-RAiD route.
Service points
/service-point/ answers one unpaged JSON array, not the envelope the
RAiD routes use. Entries carry exactly id, name, and
identifierOwner; contact details and repository settings are not
collected. Service point ids are allocated in blocks per agency, but
agencies on releases that predate the allocation were numbered from
20000000 and can share an id with another agency, so an id identifies
its agency only on records that carry the allocation.