Skip to content

Statistics

client.statistics reads the sum and usage routes. content(interval) returns ContentStatistic records of new and revised papers per period. usage(server, interval) returns UsageStatistic records: abstract views, full-text views, and PDF downloads. interval is "m" (monthly) or "y" (yearly), and the API rejects anything else with ConfigurationError before a request. Later blocks reuse the client from the first block.

from bibliofabric.rxiv import RxivClient

client = RxivClient()

Content statistics

The monthly list reaches back to 2013. Counts arrive as strings on some routes and blank or NA markers where a month has no data; the model coerces the counts to int and maps the markers to None.

stats = await client.statistics.content("m")
last = stats[-1]
print(
    last.month,
    "| new",
    last.new_papers,
    "| revised",
    last.revised_papers,
    "| cumulative",
    last.new_papers_cumulative,
)
2026-10 | new 5422 | revised 1827 | cumulative 358191

The yearly form answers one record per year, with year instead of month:

years = await client.statistics.content("y")
print(len(years), years[-1].year, years[-1].new_papers)
14 2026 50709

Usage statistics

usage() takes the server as well, because each server counts its own traffic:

usage = await client.statistics.usage("medrxiv", "m")
last = usage[-1]
print(
    last.month,
    "| abstract",
    last.abstract_views,
    "| full text",
    last.full_text_views,
    "| pdf",
    last.pdf_downloads,
)
2026-08-01 | abstract 1801187 | full text 1313216 | pdf 2321945

These answers are small single lists, so there is no paging. content() and usage() return plain lists, not Page objects. The routes name their payload bioRxiv content statistics or medRxiv content statistics instead of collection, and their messages is an object, not a list; see upstream quirks.