Skip to content

Upstream quirks

These are behaviors of the ChemRxiv public API (Cambridge Open Engage), with the final published OpenAPI specification (0.0.102) as the reference. Each quirk was verified live; ChemRxiv retired the public API on 2026-01-21 when it moved to Wiley Research Exchange Preprints, so the live checks ran against the sibling Engage instance at https://www.cambridge.org/engage/coe/public-api/v1 (spec 0.0.112), which serves the same platform. Point the client at a live instance through the base_url argument:

from bibliofabric.chemrxiv import ChemRxivClient

client = ChemRxivClient(base_url="https://www.cambridge.org/engage/coe/public-api/v1")

Where a quirk affects bibliofabric.chemrxiv, the behavior of the client is noted.

Paging

  • /items pages by offset: skip (0-based) and limit. limit above 50 answers 400 with "limit" must be less than or equal to 50; the dialect clamps page_size to 50 before the request.
  • The envelope is {"totalCount": ..., "itemHits": [{"item": ...}]}. The unwrapper flattens it into a Page; the totalCount lands in page.total and page.meta.
  • There is no cursor: paging stops at the last skip window, and deep pagination is plain offset counting.

Sort tokens

  • sort takes fixed enum tokens such as PUBLISHED_DATE_DESC, VIEWS_COUNT_ASC, not field:direction. Unknown tokens answer 400. sort_token() maps published_date:desc and plain tokens to the wire spelling and raises ConfigurationError for anything else.
  • A sort sequence is not allowed on /items; search(sort=...) rejects a list with TypeError.

Filters

  • categoryIds and subjectIds take Mongo-style 24-character hexadecimal ids. A shorter or non-hex id answers 400 ("categoryIds" length must be 24 characters long). ItemFilters validates the shape before the request and raises ConfigurationError.
  • Repeated values are sent as repeated query parameters (categoryIds=a &categoryIds=b).
  • Date filters are searchDateFrom and searchDateTo; the live host accepts ISO dates and full ISO timestamps.

Records

  • item.version is a JSON string ("1"), not a number. Same for gainedEthicsApproval, which is an enum string such as NOT_RELEVANT, not a boolean.
  • A missing item answers 404 with an empty body. A withdrawn item answers 410; both raise NotFoundError.
  • Records carry fields the specification does not list; the models use extra="allow", so unknown fields survive on model_extra.
  • event.eventGroup and event.sponsors are objects (with id, name, and asset links), not strings or plain names.
  • The DOI lookup route is /items/doi/{doi}; the version suffix of a versioned ChemRxiv DOI (10.26434/chemrxiv.8011268.v1) is part of the identifier and is kept verbatim.

Routes that do not exist

/item-types, /items/{id}/versions, /versions/{id}, and /versions/{id}/file appear in some drafts but not in the published spec 0.0.102, and the live Engage host answers 404 for all of them. They are not wrapped.

Taxonomy routes

/categories, /subjects, and /licenses answer one unpaged list with no paging parameters. The envelope is {"totalCount": ..., "categories": [...]} (the list key names the route). /categories on the sibling instance answers {"totalCount": 0, "categories": []}; the route is implemented but the instance publishes no categories.

OAI-PMH

  • /oai speaks OAI-PMH 2.0 with the oai_dc metadata prefix; ListSets and ListMetadataFormats work.
  • Resumption tokens are base64-encoded JSON with a skip offset inside. The resumptionToken element carries completeListSize and cursor attributes.
  • OAI protocol errors are not XML: the host answers HTTP 400 with a JSON body. ListRecords with an unknown metadata prefix still answers XML with an OAI <error> element; the JSON error path covers the rest.

Host behavior

  • The retired chemrxiv.org host answers 403 to plain HTTP clients (Cloudflare TLS fingerprinting); the old Engage backend under it answers 404 "Missing resource" for every path.
  • Identify echoes the internal cluster hostname of the deployment (repo-engage-prod...), not a public URL.

Rate limit

No documented limit. bibliofabric.chemrxiv defaults to 1 request per second and concurrency 1.