Skip to content

Upstream quirks

Behaviours of the bioRxiv and medRxiv API that the client works around. Checked against the live API on 2026-11-28.

Errors arrive with HTTP 200

The API answers HTTP 200 for rejected requests and puts the reason in messages[0].status, for example Both dates must be in yyyy-mm-dd format or funder value not found. check_status() raises APIError with the request and response attached for those answers. Empty answers pass: the statuses no posts found and no articles found for ... mean the answer has no records.

The recent forms take no cursor

The newest-posts forms, /details/{server}/{N} and /details/{server}/{N}d, answer in one page and reject a trailing cursor with the date-format error. The same forms exist on the pub route, /pub/{N} and /pub/{N}d, for published articles. details.recent() and published.recent() wrap them into a Page with next_cursor=None. The funder route accepts date ranges only; a 30d interval answers the date-format error there.

Values arrive in mixed forms

  • cursor is a number on the first page and a string on later pages.
  • total is a string on some routes and a number on others, and the cursorless recent answers omit it. The unwrapper reads both forms, and iteration without a total stops on the first empty page.
  • authors is one string with ; between the names; Preprint.author_list splits it.
  • published is the journal DOI, or NA, n/a, or the empty string when the preprint is unpublished; Preprint.published_doi maps all of those to None.
  • The statistics routes send the month counts as strings and blank or NA markers where a month has no data; ContentStatistic and UsageStatistic map the markers to None and coerce the counts to int.
  • On the statistics routes messages is an object, not a list, and the records sit under bioRxiv content statistics or medRxiv content statistics instead of collection.

DOIs travel unescaped in the path

A DOI with parentheses, such as 10.1371/journal.pone(1), breaks the upstream route, so the client percent-escapes the DOI segment of details.get() and published.get() paths. Empty DOIs and ROR ids raise ConfigurationError before a request.

No published rate limit

The API publishes no rate limit. The client defaults to one request per second over one connection, configurable through RXIV_MAX_REQUESTS_PER_SECOND.