bibliofabric.orcid
The Orcid client (bibliofabric.orcid) is a Python client for the ORCID Public API v3.0. It types the record, person, activities, and search endpoints with Pydantic models and ships an async client with a generated sync twin. The public API answers reads without credentials.
The upstream references for this client are the Public API guide and the swagger document it links to. Facts in these pages were verified against the live API on 2026-11-27; see upstream quirks.
Install
uv add bibliofabric
Requires Python 3.12 or newer.
The Orcid client ships in bibliofabric 0.9.0 and newer.
Pages
- Records: the record summary and its XML representation.
- Person: the person section and its sub-sections.
- Activities: the summary, the twelve sections, and single items.
- Search: expanded search and the Solr-compatible route.
- Upstream quirks: verified behavior that differs from what you might expect.
- API reference: generated from the source.
Quick start
import asyncio
from bibliofabric.orcid import OrcidClient
async def main():
async with OrcidClient() as client:
record = await client.record.get("0000-0002-1694-233X")
print(record.person.name.given_names.text)
page = await client.expanded_search.search(
query="family-name:Kucsko", page_size=10
)
print(page.total, [(r.given_names, r.family_names) for r in page.results])
asyncio.run(main())
Sync usage
The generated OrcidSyncClient has the same methods without async and await:
from bibliofabric.orcid import OrcidSyncClient
with OrcidSyncClient() as client:
work = client.activities.work("0000-0002-1694-233X", 145464015)
print(work.title.text)
Examples
Runnable scripts live in
packages/bibliofabric/examples/orcid:
quickstart.py for record, works, and search, works_detail.py for the
works section and bulk details, and sync_quickstart.py for the sync twin.
Settings
OrcidSettings loads from environment variables prefixed with ORCID_ and from a .env file in the working directory. The shared fields of bibliofabric.config.BaseApiSettings apply, such as ORCID_MAX_CONCURRENCY, ORCID_TIMEOUT, ORCID_MAX_RETRIES, and ORCID_USER_AGENT.
Rate limits
ORCID documents 12 requests per second for anonymous and public API callers and 24 for the member API, with a burst of 40. The client defaults to 4 requests per second; raise it with ORCID_MAX_REQUESTS_PER_SECOND.
Credentials
A token lifts the daily read quota from 25,000 to 100,000 reads for a registered public API client. Give the client one of two things:
ORCID_ACCESS_TOKEN: a token you already hold. The client sends it as a bearer header.ORCID_CLIENT_IDandORCID_CLIENT_SECRET: the credentials of your public API client. The client mints a/read-publictoken athttps://orcid.org/oauth/tokenon the first request, reuses it, and mints a new one after a 401.
ORCID_ACCESS_TOKEN wins when both are set. Credential values are stripped of surrounding whitespace, so a whitespace-only value counts as unset. access_token and client_secret are SecretStr fields, so they do not appear in repr(settings); read them with get_secret_value(). Setting only one of the client id and secret raises ConfigurationError.
settings = OrcidSettings(client_id="APP-XXXXXXXXXXXXXXXX", client_secret="...")
async with OrcidClient(settings=settings) as client:
record = await client.record.get("0000-0002-1694-233X")