Skip to content

bibliofabric.rxiv

The bioRxiv and medRxiv client (bibliofabric.rxiv) is a Python client for the bioRxiv and medRxiv API. One client serves both preprint servers. It reads preprint metadata by DOI and by date range, the links from preprints to the journal articles they became, preprints by funder, and the content and usage statistics. It ships an async client and a generated sync twin with the same API. The API needs no credentials.

Install

uv add bibliofabric

Requires Python 3.12 or newer.

The bioRxiv and medRxiv client ships in bibliofabric 0.9.0 and newer.

Quick start

from bibliofabric.rxiv import RxivClient

async with RxivClient() as client:
    versions = await client.details.get("10.1101/339747")
    [(version.version, version.date) for version in versions]

    page = await client.details.search("medrxiv", "2026-11-01", "2026-11-01")
    page.total, [preprint.title for preprint in page.results]

    async for preprint in client.details.iterate("medrxiv", "2026-11-01", "2026-11-01"):
        preprint.doi, preprint.category, preprint.published_doi

Routes

Method Route Returns
details.get(doi, server=) /details/{server}/{doi}/na/json every version as Preprint
details.search(server, start, end, cursor=, category=) /details/{server}/{start}/{end}/{cursor} a page of 30
details.iterate(server, start, end, category=) the same, every page Preprint
details.recent(server, posts= or days=) /details/{server}/{N} or /{N}d one cursorless page
published.get(doi, server=) /pubs/{server}/{doi}/na/json PublishedArticle list; preprint or journal DOI
published.search / iterate(server, start, end) /pubs/{server}/{start}/{end}/{cursor} pages of 100
published.by_publisher / iterate_by_publisher(prefix, start, end) /publisher/{prefix}/{start}/{end}/{cursor} bioRxiv only
published.biorxiv(start, end, cursor=) /pub/{start}/{end}/{cursor} bioRxiv only, fewer fields
published.recent(posts= or days=) /pub/{N} or /pub/{N}d one cursorless page
funders.search / iterate(server, ror_id, start, end) /funder/{server}/{start}/{end}/{ror}/{cursor} Preprint with funder declarations
statistics.content(interval) /sum/{m,y} ContentStatistic list
statistics.usage(server, interval) /usage/{m,y}/{server} UsageStatistic list

server is biorxiv or medrxiv. Dates are YYYY-MM-DD strings, date or datetime objects. category filters by subject category, written with spaces or underscores (cell biology). The funder route covers posts from 2025-04-10 on.

details, published, and funders also have collect(...), which gathers iterate() output into a list; pass limit= to bound it.

Errors the API reports with HTTP 200 raise APIError with the request and response attached; empty answers are empty results. See Upstream quirks for the details, and the API reference for every class and model.

Settings

Settings load from the environment with the RXIV_ prefix. The API publishes no rate limit; the client defaults to one request per second over one connection.

Examples

Runnable scripts live at packages/bibliofabric/examples/rxiv: quickstart.py (versions by DOI, a date window, bounded collect), rxiv_sync.py (the sync client and published-article links), and published_links.py (preprint-to-journal links for bioRxiv and medRxiv).