Skip to content

Crossref quirks

Behavior of the live API that shapes how the client works.

Filters

  • filter=doi:a|b returns zero results. The supported OR form is repeated keys: filter=doi:a,doi:b. Batch lookups use that form.
  • Crossref has no publisher filter. Scope by prefix, member, or ror-id instead.
  • The location filter on /funders returns zero results for every value, including Netherlands, while plain queries match. Funder search with a query works.
  • The /licenses route ignores query and reports a total of 0 for every query; the plain list serves about 30,000 entries.
  • Unknown query parameters are rejected with 400, not ignored. The client sends only rows, offset, query, filter, sort, order, select, cursor, and mailto, and rejects per-route unsupported ones client-side.

Paging

  • There is no page parameter. Paging is offset plus rows, with offset + rows <= 10000 and rows <= 1000. search() raises ConfigurationError before sending a request past the cap.
  • Deep paging uses cursor on /works and scoped */works routes; non-works list routes (/journals, /funders, /members, /licenses) reject cursor with 400 and use offset paging instead. Cursor exhaustion is implicit: the last non-empty page still returns a next-cursor; only the following request returns empty items.
  • Cursor requests reject the issued and published* sorts with a sort-criteria-incompatible-with-cursor 400 (since 2026-08-24). Cursor result sets are no longer stable under index-date windows, so incremental sync should prefer from-created-date / until-created-date windows over from-index-date.
  • sample caps at 100 and cannot combine with rows or offset; sample() handles both.
  • The API serves both https://api.crossref.org and https://api.crossref.org/v1 with identical payloads; bibliofabric.crossref pins /v1.

Routes

  • /prefixes has no list route (404); only /prefixes/{prefix} and /prefixes/{prefix}/works exist. /licenses has no single-item route (404); only the list exists.
  • The generic batch_get sends a filter= request. It works on /works and on the scoped works routes; on /journals, /funders, /members, /types, and /licenses Crossref answers 400, and on /prefixes 404, because those routes reject filters or have no list route. The client therefore disables batch_get on those six resources with batch_size = 0, and the call raises ConfigurationError before any request.
  • /types ignores rows and offset and always returns the complete list (about 30 types).
  • /journals/{issn} returns title as a bare string while /journals returns a list; the Journal model accepts both.
  • /prefixes/{prefix} returns member and prefix as full https://id.crossref.org/member/297-style URIs; the Prefix model normalizes them to bare values.

Response shapes

  • Every response wraps in one message level: single items live in message, lists in message.items with totals in message.total-results. Page.meta carries the envelope minus the results, so facets and totals stay reachable.
  • The published spec is incomplete: several returned fields are absent from it. All models use extra="allow", so unknown fields survive parsing.
  • Reference entries, license entries, and funder entries vary in shape between publishers; every field is optional and tolerant types (SafeList, SafeStr, SafeInt) absorb nulls and scalar-vs-list differences.
  • event.sponsor is a string for one sponsor and a list for several (ACM GECCO proceedings print two sponsors). The Event model accepts both and always yields a list.

Exceptions

All errors subclass bibliofabric.BibliofabricError; import them from bibliofabric.exceptions:

Exception When
NotFoundError 404 response
RateLimitError 429 response after retries
AuthError 401 or 403 response
APIError any other error status; .body holds the parsed error payload
NetworkError connection failed
TimeoutError request exceeded timeout
ValidationError a response record failed model validation; .raw holds the payload
ConfigurationError a request the API would reject with 400, raised before sending

Records that fail validation raise ValidationError during iterate(). Pass on_error="skip" with a failures list to drop them instead:

import asyncio

from bibliofabric.crossref import CrossrefClient, WorksFilters


client = CrossrefClient()


async def main() -> None:
    async with client:
        failures = []
        async for work in client.works.iterate(
            WorksFilters(prefix="10.5194"), on_error="skip", failures=failures, limit=50
        ):
            print(work.doi)
        print("failures:", len(failures))


asyncio.run(main())
10.1007/s005850050006
10.1007/s005850050009
10.1007/s005850050011
... 47 more DOIs ...
failures: 0

For the full exception list, retry rules, and the Retry-After handling shared by every client, see Error handling.

Retries

The client retries 429, 500, 502, 503, and 504 responses, plus network failures and timeouts. A Retry-After header is honored; other failures back off with jittered exponential waits capped at max_retry_wait (60 seconds by default). 403 and 404 are never retried. max_retries defaults to 3 and is configurable through CROSSREF_MAX_RETRIES.

A 403 from Crossref means that the account was blocked, not throttled; stop and inspect the request rather than retrying.

Rate limits

When rate_limits, max_concurrency, and max_requests_per_second are not explicitly set on CrossrefSettings, CrossrefClient picks pool-aware defaults based on your credentials:

Pool Credentials rate_limits (req/s) max_concurrency
Public neither mailto nor plus_token {"single": 5.0, "list": 1.0, "datacitations": 3.0} 1
Polite mailto set (no plus_token) {"single": 10.0, "list": 3.0, "datacitations": 3.0} 3
Metadata Plus plus_token set {"single": 50.0, "list": 50.0, "datacitations": 3.0} 10

Pacing follows the 2026-07 Crossref split per request class: top-level /works searches run in the list class, the beta data citations route runs in the datacitations class, and single records, scoped /.../works routes, and all other routes run in the single class. The concurrency bound is shared across classes. Override each class through CROSSREF_RATE_LIMITS (a JSON object such as {"single": 10.0, "list": 3.0, "datacitations": 3.0}) and the shared bound through CROSSREF_MAX_CONCURRENCY.

Every response updates the read-only client.last_rate_limit_headers property, which holds Crossref's x-api-pool, x-rate-limit-limit, x-rate-limit-interval, and x-concurrency-limit headers.

On 429 the client backs off and retries automatically.