API reference
Generated from the source with mkdocstrings.
Client
bibliofabric.orcid.OrcidClient
Bases: BaseApiClient
Client for the ORCID Public API v3.0.
Reads need no credentials. The client sends Accept: application/json
on every request; methods such as
:meth:RecordClient.representation ask for another representation and
return the body as text. A token lifts the public API daily read quota
from 25,000 to 100,000 reads (registered public API clients only).
settings.access_token travels as a bearer header. Without it, a
settings.client_id and settings.client_secret pair mints a
/read-public token at https://orcid.org/oauth/token on the first
request and reuses it; a 401 mints a new one. Setting only one of the
pair raises :class:ConfigurationError.
record
cached
property
The record summary resource.
person
cached
property
The person section and its sub-sections.
activities
cached
property
The activities summary, its sections, and single items.
expanded_search
cached
property
The expanded search route with profile fields per result.
search
cached
property
The Solr-compatible search route.
default_headers
property
Headers sent with every request: the JSON representation.
Sync client
bibliofabric.orcid.OrcidSyncClient
Bases: SyncBaseApiClient
Client for the ORCID Public API v3.0.
Reads need no credentials. The client sends Accept: application/json
on every request; methods such as
:meth:RecordClient.representation ask for another representation and
return the body as text. A token lifts the public API daily read quota
from 25,000 to 100,000 reads (registered public API clients only).
settings.access_token travels as a bearer header. Without it, a
settings.client_id and settings.client_secret pair mints a
/read-public token at https://orcid.org/oauth/token on the first
request and reuses it; a 401 mints a new one. Setting only one of the
pair raises :class:ConfigurationError.
record
cached
property
The record summary resource.
person
cached
property
The person section and its sub-sections.
activities
cached
property
The activities summary, its sections, and single items.
expanded_search
cached
property
The expanded search route with profile fields per result.
search
cached
property
The Solr-compatible search route.
default_headers
property
Headers sent with every request: the JSON representation.
Settings
bibliofabric.orcid.OrcidSettings
Bases: BaseApiSettings
ORCID-specific client settings.
Inherits timeout, max_retries, max_retry_wait,
max_requests_per_second, max_concurrency, user_agent and
mailto from :class:bibliofabric.config.BaseApiSettings and sets ORCID
defaults (4 req/s, concurrency 4). The public API answers reads without
credentials. A token lifts the daily read quota from 25,000 to 100,000
reads per day for a registered public API client. Set access_token
to send a token you already hold, or set client_id and
client_secret and the client mints a /read-public token itself
on the first request. access_token wins when both are set.
access_token and client_secret are SecretStr fields; read
them with get_secret_value().
bibliofabric.orcid.get_settings()
cached
Return the process-wide settings, loaded once from the environment.
Resource clients
Each resource client inherits the generic operations of bibliofabric.ResourceClient where the ORCID routes can serve them. The record-bound clients (RecordClient, PersonClient, ActivitiesClient) support get() and exists(); their inherited search(), iterate(), collect(), first(), and count() raise ConfigurationError, because every ORCID route is bound to one ORCID iD. The search clients (ExpandedSearchClient, SolrSearchClient) support search(), iterate(), collect(), first(), and count(); their get() and exists() raise ConfigurationError. batch_get() is disabled on every resource client (batch_size = 0), and both search clients require a non-blank query. Only the members that ORCID adds are shown here.
bibliofabric.orcid._async.resources.RecordClient
Bases: OrcidResourceClient[OrcidRecord]
Client for the record summary route (/{orcid}/record).
The route serves one record, so the inherited search operations have no
upstream counterpart and raise ConfigurationError.
representation(orcid, accept='application/xml')
async
Return the record in another representation as text.
application/xml is served today; application/ld+json answers
406 on the public API (verified 2026-11-27).
bibliofabric.orcid._async.resources.PersonClient
Bases: OrcidResourceClient[Person]
Client for the person section and its sub-section routes.
The routes serve one person, so the inherited search operations have no
upstream counterpart and raise ConfigurationError.
addresses(orcid)
async
Fetch /{orcid}/address.
biography(orcid)
async
Fetch /{orcid}/biography; None when the record has none.
emails(orcid)
async
Fetch /{orcid}/emails; None when the record has none.
external_identifiers(orcid)
async
Fetch /{orcid}/external-identifiers.
item(orcid, kind, put_code)
async
Fetch one person item as the parsed JSON object.
kind is the route segment of the section: address,
keywords, other-names, researcher-urls, or
external-identifiers. The section routes above return the same
items in their lists.
keywords(orcid)
async
Fetch /{orcid}/keywords.
other_names(orcid)
async
Fetch /{orcid}/other-names.
personal_details(orcid)
async
Fetch /{orcid}/personal-details; None on a missing record.
researcher_urls(orcid)
async
Fetch /{orcid}/researcher-urls.
bibliofabric.orcid._async.resources.ActivitiesClient
Bases: OrcidResourceClient[ActivitiesSummary]
Client for the activities summary, its sections, and single items.
Section readers return None when the record has none of that kind;
the API answers 404 for such sections (verified 2026-11-27 for a record
without distinctions, qualifications, and similar empty sections).
The routes serve one record, so the inherited search operations have no
upstream counterpart and raise ConfigurationError.
affiliation_item(orcid, kind, put_code)
async
Fetch one qualification, membership, service, or similar item.
kind is the singular route segment (qualification,
membership, service, distinction, invited-position,
or research-resource). These single-item routes share the
affiliation shape, so the client returns the parsed JSON object
instead of one model per kind.
distinctions(orcid)
async
Fetch /{orcid}/distinctions.
education(orcid, put_code)
async
Fetch one education item (/{orcid}/education/{put-code}).
educations(orcid)
async
Fetch /{orcid}/educations.
employment(orcid, put_code)
async
Fetch one employment item (/{orcid}/employment/{put-code}).
employments(orcid)
async
Fetch /{orcid}/employments.
funding(orcid, put_code)
async
Fetch one full funding entry (/{orcid}/funding/{put-code}).
fundings(orcid)
async
Fetch /{orcid}/fundings.
invited_positions(orcid)
async
Fetch /{orcid}/invited-positions.
The invitation-to-peer-review listing lives on
/{orcid}/peer-reviews; the activities summary names this section
invited-positions.
memberships(orcid)
async
Fetch /{orcid}/memberships.
peer_review(orcid, put_code)
async
Fetch one full peer review (/{orcid}/peer-review/{put-code}).
peer_reviews(orcid)
async
Fetch /{orcid}/peer-reviews.
qualifications(orcid)
async
Fetch /{orcid}/qualifications.
representation(orcid, suffix, accept='application/xml')
async
Return any route under the ORCID iD in another representation.
For example representation(orcid, "work/1234") returns the work
as XML text.
research_resources(orcid)
async
Fetch /{orcid}/research-resources.
services(orcid)
async
Fetch /{orcid}/services.
work(orcid, put_code)
async
Fetch one full work (/{orcid}/work/{put-code}).
works(orcid)
async
Fetch /{orcid}/works.
works_bulk(orcid, put_codes)
async
Fetch full works by put code, up to 100 per request.
Uses /{orcid}/works/{code},{code},... and splits longer lists
into requests of 100. ORCID answers an error entry for a put
code it does not know; those codes are absent from the result. A
work entry that is not an object raises ValidationError with
the response attached.
bibliofabric.orcid._async.resources.ExpandedSearchClient
Bases: OrcidResourceClient[ExpandedResult]
Client for the expanded search route (/expanded-search).
The route answers an expanded profile per result (names, emails,
institutions). rows sets the page size and start the zero-based
offset, both through the dialect paging. A query is required and must
not be blank. get() and exists() have no single-item route and
raise ConfigurationError.
count(filters=None, *, query=None, **kwargs)
async
Count expanded search results (query required).
csv(query, *, fields=None, rows=None, start=None)
async
Return one page of the CSV search (/csv-search) as text.
The route searches the same index as the expanded search and answers
CSV with a header row. fields picks the columns (the fl
parameter, for example ["orcid", "given-names", "family-name"]);
without it ORCID answers its nine default columns. rows above
EXPANDED_SEARCH_MAX_ROWS (100) are capped, because a larger page
makes Solr fail with HTTP 500.
iterate(filters=None, *, query=None, **kwargs)
Iterate over expanded search results (query required).
search(filters=None, *, query=None, **kwargs)
async
Fetch one page of expanded search results (query required).
bibliofabric.orcid._async.resources.SolrSearchClient
Bases: OrcidResourceClient[SolrResult]
Client for the Solr-compatible search route (/search).
The route answers the same Solr index with one orcid-identifier per
result and accepts the same rows and start paging. A query is
required and must not be blank. get() and exists() have no
single-item route and raise ConfigurationError.
count(filters=None, *, query=None, **kwargs)
async
Count Solr search results (query required).
iterate(filters=None, *, query=None, **kwargs)
Iterate over Solr search results (query required).
search(filters=None, *, query=None, **kwargs)
async
Fetch one page of Solr search results (query required).
bibliofabric.orcid._async.resources.OrcidResourceClient
Bases: ResourceClient[E]
Base client for ORCID resources: ORCID iD normalization and paths.
Every route is bound to one ORCID iD or is a search, so batch_get()
has no upstream route and is disabled (batch_size = 0).
normalize_id(value)
Return the hyphenated ORCID iD (URLs and compact forms accepted).
item_path(id)
Return /{orcid}/{suffix} for the record-bound route.
exists(id)
async
Return True when the record exists; 404 returns False.
Uses GET so the check does not depend on HEAD support.
Values and helpers
bibliofabric.orcid.models.values.TextValue
Bases: BaseModel
A wrapped text value, for example {"value": "2020"}.
text
property
The unwrapped text, or None.
bibliofabric.orcid.models.values.IntValue
Bases: BaseModel
A wrapped integer value, used for epoch-millisecond timestamps.
text
property
The value as text, or None.
bibliofabric.orcid.models.common.FuzzyDate
Bases: BaseModel
A date that may carry only some of year, month, and day.
Each part is a {"value": "2020"} wrapper, because ORCID keeps the
calendar parts as text.
iso()
Return YYYY, YYYY-MM, or YYYY-MM-DD.
Parts join from the year downward and stop at the first missing
part, so a month without a day is 2020-06 and a day without a
month yields the year alone. A date with no year at all is an empty
string.
bibliofabric.orcid.text(value)
Return the wrapped text of a value object, or None.
Works on any model with a text property, so callers never walk the
wrapper dictionaries themselves.
Dialect
bibliofabric.orcid.dialect
ORCID query dialect constants and the search paging rules.
ORCID_SEARCH_DIALECT tells bibliofabric how the ORCID search routes name
their query parameters. The resource-client base that consumes these
constants lives in :mod:bibliofabric.orcid._async.resources (its sync twin is
generated from it).
Unwrapper
bibliofabric.orcid.OrcidUnwrapper
Extracts results, totals, and metadata from ORCID JSON.
item(body)
Return the record itself; ORCID single routes are unwrapped.
meta(body)
Return the envelope minus the result list.
next_cursor(body)
Return None; ORCID pages by start offset only.
body is unused; ORCID has no cursor paging.
results(body)
Return the expanded-result or result list, whichever is present.
total(body)
Return num-found, or None when absent.