Skip to content

API reference

Generated from the source with mkdocstrings.

Client

orchis.OrchisClient

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.

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

orchis.OrchisSyncClient

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.

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

orchis.OrchisSettings

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.

orchis.get_settings() cached

Return the process-wide settings, loaded once from the environment.

Resource clients

Each resource client inherits the generic operations from bibliofabric.ResourceClient (get, exists, search, iterate, collect, first, count) through orchis._async.resources.OrchisResourceClient. Only the members that ORCID adds are shown here.

orchis._async.resources.RecordClient

Bases: OrchisResourceClient[OrchisRecord]

Client for the record summary route (/{orcid}/record).

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).

orchis._async.resources.PersonClient

Bases: OrchisResourceClient[Person]

Client for the person section and its sub-section routes.

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.

orchis._async.resources.ActivitiesClient

Bases: OrchisResourceClient[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).

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.

orchis._async.resources.ExpandedSearchClient

Bases: OrchisResourceClient[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.

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.

search(filters=None, *, query=None, **kwargs) async

Fetch one page of expanded search results (query required).

orchis._async.resources.SolrSearchClient

Bases: OrchisResourceClient[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.

search(filters=None, *, query=None, **kwargs) async

Fetch one page of Solr search results (query required).

orchis._async.resources.OrchisResourceClient

Bases: ResourceClient[E]

Base client for ORCID resources: ORCID iD normalization and paths.

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

orchis.models.values.TextValue

Bases: BaseModel

A wrapped text value, for example {"value": "2020"}.

text property

The unwrapped text, or None.

orchis.models.values.IntValue

Bases: BaseModel

A wrapped integer value, used for epoch-millisecond timestamps.

text property

The value as text, or None.

orchis.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 the date as YYYY, YYYY-MM, or YYYY-MM-DD.

orchis.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

orchis.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:orchis._async.resources (its sync twin is generated from it).

Unwrapper

orchis.OrchisUnwrapper

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.