OpenCite aggregates results from many academic sources, deduplicates them, and
presents them as text, JSON, BibTeX, or CSV. It also retrieves PDFs, fetches
structured full-text, and converts PDFs to markdown.
IDSet is frozen. It centralizes every identifier type (DOI, PMID, PMCID,
OpenAlex, S2, arXiv) so cross-API lookup and deduplication have one source of
truth.
Provenance.Paper.data_sources records which APIs contributed data to a
merged record.
Rate-limited clients.BaseClient provides a token-bucket rate limiter,
retry with backoff, an optional in-flight cap, and httpx session management.
Each source has its own limit (OpenAlex 100 req/s, PubMed 10 req/s, Semantic
Scholar 1 req/s, arXiv one request per 3 s on a single connection, and so on).
CrossRef, bioRxiv, and medRxiv share one CrossRef budget: 1 req/s with one
request in flight, or 3 and 3 when contact_email is set (polite pool).
Parallel fan-out, sequential drain.SearchOrchestrator.search() launches
one task per source, then awaits them, merges, deduplicates, sorts, and
truncates to max_results. Pending tasks are always cancelled and drained so
none outlives the call. A source whose search raises is recorded in
SearchResult.failed_sources (shown as failed in the CLI summary), never as
zero results; CORE without an API key is left out of default searches. The
CLI exits with status 1 when no requested source could be searched.
Full-text shortcuts. When converting, OpenCite prefers PMC BioC structured
full-text for open-access articles (no PDF needed) and HTML full-text for
arXiv ar5iv and bioRxiv/medRxiv .full.
PDF priority chain. Publisher APIs (if tokens are configured) -> OpenAlex /
S2 PDF locations -> PMC OA -> direct arXiv/bioRxiv URL -> DOI content
negotiation.