API reference
Async client
stavrophora._async.client
The Crossref API client; the sync twin is generated by scripts/unasync.py.
StavrophoraClient
Bases: BaseApiClient
Client for the Crossref API.
StavrophoraClient drives async code and its generated twin
StavrophoraSyncClient drives synchronous code; both expose the same
resources and methods.
Credentials are resolved in the constructor: an explicit auth_strategy
wins, then a Metadata Plus key (crossref-api-key header), then
mailto (polite pool via query parameter). When rate_limits,
max_concurrency, and max_requests_per_second are not explicitly
set on settings, pool-aware defaults apply: Metadata Plus
(50/50 req/s, concurrency 10), Polite Pool (10/3 req/s,
concurrency 3), or Public Pool (5/1 req/s, concurrency 1).
Source code in packages/stavrophora/src/stavrophora/_async/client.py
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 | |
data_citations
cached
property
The beta /beta/datacitations route (search, iterate, count).
funders
cached
property
The /funders resource.
journals
cached
property
The /journals resource.
last_pool
property
The x-api-pool header value from the most recent response, if any.
last_rate_limit_headers
property
Crossref rate-limit headers captured from the most recent response.
licenses
cached
property
The /licenses resource (list/iterate only).
members
cached
property
The /members resource.
prefixes
cached
property
The /prefixes resource.
types
cached
property
The /types resource.
works
cached
property
The /works resource (search, iterate, batch DOI lookup, agency).
on_response(response)
Capture Crossref pool and rate-limit headers from each response.
Source code in packages/stavrophora/src/stavrophora/_async/client.py
143 144 145 146 147 148 149 150 151 | |
rate_class(request)
Map the request onto Crossref's polite pools (D-19).
Source code in packages/stavrophora/src/stavrophora/_async/client.py
200 201 202 203 204 205 206 207 | |
Sync client
stavrophora._sync.client
The Crossref API client; the sync twin is generated by scripts/unasync.py.
StavrophoraSyncClient
Bases: SyncBaseApiClient
Client for the Crossref API.
StavrophoraClient drives async code and its generated twin
StavrophoraSyncClient drives synchronous code; both expose the same
resources and methods.
Credentials are resolved in the constructor: an explicit auth_strategy
wins, then a Metadata Plus key (crossref-api-key header), then
mailto (polite pool via query parameter). When rate_limits,
max_concurrency, and max_requests_per_second are not explicitly
set on settings, pool-aware defaults apply: Metadata Plus
(50/50 req/s, concurrency 10), Polite Pool (10/3 req/s,
concurrency 3), or Public Pool (5/1 req/s, concurrency 1).
Source code in packages/stavrophora/src/stavrophora/_sync/client.py
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 | |
data_citations
cached
property
The beta /beta/datacitations route (search, iterate, count).
funders
cached
property
The /funders resource.
journals
cached
property
The /journals resource.
last_pool
property
The x-api-pool header value from the most recent response, if any.
last_rate_limit_headers
property
Crossref rate-limit headers captured from the most recent response.
licenses
cached
property
The /licenses resource (list/iterate only).
members
cached
property
The /members resource.
prefixes
cached
property
The /prefixes resource.
types
cached
property
The /types resource.
works
cached
property
The /works resource (search, iterate, batch DOI lookup, agency).
on_response(response)
Capture Crossref pool and rate-limit headers from each response.
Source code in packages/stavrophora/src/stavrophora/_sync/client.py
144 145 146 147 148 149 150 151 152 | |
rate_class(request)
Map the request onto Crossref's polite pools (D-19).
Source code in packages/stavrophora/src/stavrophora/_sync/client.py
201 202 203 204 205 206 207 208 | |
Settings
stavrophora.config
Stavrophora settings for the Crossref API client.
StavrophoraSettings
Bases: BaseApiSettings
Crossref-specific tunables.
Loaded from environment variables prefixed with STAVROPHORA_ (or a
.env file): STAVROPHORA_MAILTO for the polite pool, and
STAVROPHORA_PLUS_TOKEN for a Metadata Plus key. Generic behavior
(timeout, retries, pacing) is inherited from
:class:bibliofabric.config.BaseApiSettings.
Source code in packages/stavrophora/src/stavrophora/config.py
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | |
get_settings()
cached
Provide cached access to application settings.
Source code in packages/stavrophora/src/stavrophora/config.py
64 65 66 67 | |
Async resources
stavrophora._async.works
Works resources: the top-level /works route and parent-scoped works.
ScopedWorksResource
Bases: _WorksListResource
Works capabilities bound to a parent route, e.g. members/{id}/works.
Obtain instances via the parent's works() method; scoped routes
accept the full works list parameter set and count as single-record
requests for Crossref rate limiting. Single-work methods (get,
exists, agency, latest_version) are omitted because Crossref
serves them only at /works/{doi}.
Source code in packages/stavrophora/src/stavrophora/_async/works.py
422 423 424 425 426 427 428 429 430 | |
WorksResource
Bases: _WorksListResource
Typed client for the Crossref /works route.
Source code in packages/stavrophora/src/stavrophora/_async/works.py
355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 | |
agency(doi)
async
Look up the DOI registration agency for a work.
Source code in packages/stavrophora/src/stavrophora/_async/works.py
376 377 378 379 380 381 382 | |
exists(id)
async
Return True when the DOI exists (HTTP HEAD); 404 returns False.
Source code in packages/stavrophora/src/stavrophora/_async/works.py
372 373 374 | |
get(id, *, select=None, params=None)
async
Fetch one work by DOI; 404 raises :class:NotFoundError.
Source code in packages/stavrophora/src/stavrophora/_async/works.py
362 363 364 365 366 367 368 369 370 | |
item_path(id)
Return the single-work path with the DOI percent-encoded.
Source code in packages/stavrophora/src/stavrophora/_async/works.py
358 359 360 | |
latest_version(doi, update_types=DEFAULT_VERSION_UPDATE_TYPES)
async
Resolve a DOI to the newest record in its Crossmark update chain.
Older records of an update chain carry updated-by entries naming
the works that updated them, each with a type and a timestamp or
date parts. By default only ("new_version", "new_edition") entries
are followed so retractions and corrections are not mistaken for newer
versions; pass update_types=None to follow all Crossmark updates.
A DOI without matching update data is returned unchanged.
Source code in packages/stavrophora/src/stavrophora/_async/works.py
384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 | |
stavrophora._async.journals
Journals resource: /journals and the /journals/{issn}/works scope.
JournalsResource
Bases: CrossrefResourceClient[Journal]
Typed client for the Crossref /journals routes.
Accepts plain query only; filter, sort, and select are
rejected client-side because the route returns 400 for them.
Source code in packages/stavrophora/src/stavrophora/_async/journals.py
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | |
dois_by_year(issn)
async
Return DOI counts per issued year from the journal record.
Reads breakdowns.dois-by-issued-year from /journals/{issn}.
Returns an empty dict when the record carries no breakdown.
Source code in packages/stavrophora/src/stavrophora/_async/journals.py
26 27 28 29 30 31 32 33 34 35 | |
normalize_id(value)
Return the hyphenated uppercase ISSN form.
Source code in packages/stavrophora/src/stavrophora/_async/journals.py
22 23 24 | |
works(issn)
Return a works client bound to journals/{issn}/works.
Accepts print or electronic ISSNs; hyphens and case are normalized.
Source code in packages/stavrophora/src/stavrophora/_async/journals.py
37 38 39 40 41 42 43 | |
stavrophora._async.funders
Funders resource: /funders and the /funders/{id}/works scope.
FunderWorksResource
Bases: ScopedWorksResource
Works client that ORs a funder id plus its descendants into the
funder filter of every request.
The id set is fetched from the funder record on first use and cached.
Requests that carry their own funder filter are rejected, since the
two would silently AND together.
Source code in packages/stavrophora/src/stavrophora/_async/funders.py
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 | |
FundersResource
Bases: CrossrefResourceClient[Funder]
Typed client for the Crossref /funders routes.
Accepts plain query plus the location filter.
Source code in packages/stavrophora/src/stavrophora/_async/funders.py
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | |
descendants(funder_id)
async
Return the funder's descendant registry ids from its record.
Funder ids come back in Crossref's bare form ("100000025").
Returns an empty list for funders without a hierarchy; list items
from search() carry no hierarchy data at all.
Source code in packages/stavrophora/src/stavrophora/_async/funders.py
34 35 36 37 38 39 40 41 42 | |
normalize_id(value)
Return the bare lowercase funder DOI.
Source code in packages/stavrophora/src/stavrophora/_async/funders.py
30 31 32 | |
works(funder_id, *, include_descendants=False)
Return a works client bound to funders/{id}/works.
funder_id is the funder's Funder Registry DOI. The scoped route
already includes descendants' works; with include_descendants=True
the funder's own id plus its descendant ids are additionally ORed
into every request's funder filter, pinning the result set to
the listed ids.
Source code in packages/stavrophora/src/stavrophora/_async/funders.py
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | |
stavrophora._async.members
Members resource: /members and the /members/{id}/works scope.
MembersResource
Bases: CrossrefResourceClient[Member]
Typed client for the Crossref /members routes.
Accepts plain query plus the member-specific filters (prefix,
backfile-doi-count, current-doi-count).
Source code in packages/stavrophora/src/stavrophora/_async/members.py
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | |
works(member_id)
Return a works client bound to members/{id}/works.
Source code in packages/stavrophora/src/stavrophora/_async/members.py
23 24 25 26 | |
stavrophora._async.types
Types resource: /types and the /types/{id}/works scope.
TypesResource
Bases: CrossrefResourceClient[CrossRefType]
Typed client for the Crossref /types routes.
The type list serves no query, filter, sort, or select;
any of those parameters is rejected client-side. Crossref ignores
rows and offset on /types and always returns the complete
list in one response, so dialect is :data:CrossrefUnpagedDialect
and count() and iterate() issue a single unpaged fetch.
Source code in packages/stavrophora/src/stavrophora/_async/types.py
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | |
count(filters=None, *, query=None, params=None)
async
Return the total number of Crossref work types (single unpaged fetch).
Source code in packages/stavrophora/src/stavrophora/_async/types.py
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | |
works(type_id)
Return a works client bound to types/{id}/works.
Source code in packages/stavrophora/src/stavrophora/_async/types.py
29 30 31 32 | |
stavrophora._async.prefixes
Prefixes resource: /prefixes/{prefix} and its works scope.
Crossref serves no /prefixes list route (verified live: 404); prefixes
are only addressable individually.
PrefixesResource
Bases: CrossrefResourceClient[Prefix]
Typed client for the Crossref /prefixes/{prefix} route.
Source code in packages/stavrophora/src/stavrophora/_async/prefixes.py
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | |
count(*_args, **_kwargs)
Not supported: Crossref serves no /prefixes list route.
Source code in packages/stavrophora/src/stavrophora/_async/prefixes.py
34 35 36 37 38 | |
iterate(*_args, **_kwargs)
Not supported: Crossref serves no /prefixes list route.
Source code in packages/stavrophora/src/stavrophora/_async/prefixes.py
40 41 42 43 44 | |
search(*_args, **_kwargs)
Not supported: Crossref serves no /prefixes list route.
Source code in packages/stavrophora/src/stavrophora/_async/prefixes.py
28 29 30 31 32 | |
works(prefix)
Return a works client bound to prefixes/{prefix}/works.
Source code in packages/stavrophora/src/stavrophora/_async/prefixes.py
23 24 25 26 | |
stavrophora._async.licenses
Licenses resource: the /licenses list route.
Crossref has no single-license route (verified live: /licenses/{id}
returns 404); only the list endpoint exists.
LicensesResource
Bases: CrossrefResourceClient[License]
Typed client for the Crossref /licenses route (list/iterate only).
Source code in packages/stavrophora/src/stavrophora/_async/licenses.py
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | |
exists(id)
async
Not supported: Crossref has no /licenses/{id} route.
Source code in packages/stavrophora/src/stavrophora/_async/licenses.py
34 35 36 37 38 | |
get(id, *, select=None, params=None)
async
Not supported: Crossref has no /licenses/{id} route.
Source code in packages/stavrophora/src/stavrophora/_async/licenses.py
22 23 24 25 26 27 28 29 30 31 32 | |
stavrophora._async.datacitations
Data citations resource: the beta /beta/datacitations route.
The route lives beside the /v1 API (https://api.crossref.org/beta/
datacitations), runs in its own datacitations pool (3 requests per
second, 3 concurrent on 2026-11-28), and pages by a 0-based page number:
message.next-page holds the next page number, or null after the last
page. Crossref marks the route as beta, so its contents and output format
may change.
DataCitationsResource
Typed client for the Crossref Data Citations API (beta).
Every filter is optional and the filters combine with AND:
subject_id (DOI of the citing work), object_id (DOI of the cited
dataset or software), member_id (Crossref member of the citing
work), relation (for example references), and
from_created_date / until_created_date (when Crossref added the
relationship; 2025, 2025-01, 2025-01-01, or
2025-01-01T12:00).
Source code in packages/stavrophora/src/stavrophora/_async/datacitations.py
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 | |
count(*, subject_id=None, object_id=None, member_id=None, relation=None, from_created_date=None, until_created_date=None)
async
Return the number of matching data citations (one 1-row request).
Source code in packages/stavrophora/src/stavrophora/_async/datacitations.py
135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 | |
iterate(*, subject_id=None, object_id=None, member_id=None, relation=None, from_created_date=None, until_created_date=None, rows=DATACITATIONS_MAX_ROWS)
async
Yield every matching data citation, following next-page.
Source code in packages/stavrophora/src/stavrophora/_async/datacitations.py
90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 | |
search(*, subject_id=None, object_id=None, member_id=None, relation=None, from_created_date=None, until_created_date=None, rows=None, page=None)
async
Return one page of data citations.
page is 0-based. page.next_cursor holds the next page number
as a string, or None after the last page; page.total is the
number of matching relationships.
Source code in packages/stavrophora/src/stavrophora/_async/datacitations.py
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 | |
Sync resources
stavrophora._sync.works
Works resources: the top-level /works route and parent-scoped works.
SyncScopedWorksResource
Bases: _WorksListResource
Works capabilities bound to a parent route, e.g. members/{id}/works.
Obtain instances via the parent's works() method; scoped routes
accept the full works list parameter set and count as single-record
requests for Crossref rate limiting. Single-work methods (get,
exists, agency, latest_version) are omitted because Crossref
serves them only at /works/{doi}.
Source code in packages/stavrophora/src/stavrophora/_sync/works.py
423 424 425 426 427 428 429 430 431 | |
SyncWorksResource
Bases: _WorksListResource
Typed client for the Crossref /works route.
Source code in packages/stavrophora/src/stavrophora/_sync/works.py
356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 | |
agency(doi)
Look up the DOI registration agency for a work.
Source code in packages/stavrophora/src/stavrophora/_sync/works.py
377 378 379 380 381 382 383 | |
exists(id)
Return True when the DOI exists (HTTP HEAD); 404 returns False.
Source code in packages/stavrophora/src/stavrophora/_sync/works.py
373 374 375 | |
get(id, *, select=None, params=None)
Fetch one work by DOI; 404 raises :class:NotFoundError.
Source code in packages/stavrophora/src/stavrophora/_sync/works.py
363 364 365 366 367 368 369 370 371 | |
item_path(id)
Return the single-work path with the DOI percent-encoded.
Source code in packages/stavrophora/src/stavrophora/_sync/works.py
359 360 361 | |
latest_version(doi, update_types=DEFAULT_VERSION_UPDATE_TYPES)
Resolve a DOI to the newest record in its Crossmark update chain.
Older records of an update chain carry updated-by entries naming
the works that updated them, each with a type and a timestamp or
date parts. By default only ("new_version", "new_edition") entries
are followed so retractions and corrections are not mistaken for newer
versions; pass update_types=None to follow all Crossmark updates.
A DOI without matching update data is returned unchanged.
Source code in packages/stavrophora/src/stavrophora/_sync/works.py
385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 | |
stavrophora._sync.journals
Journals resource: /journals and the /journals/{issn}/works scope.
SyncJournalsResource
Bases: CrossrefResourceSyncClient[Journal]
Typed client for the Crossref /journals routes.
Accepts plain query only; filter, sort, and select are
rejected client-side because the route returns 400 for them.
Source code in packages/stavrophora/src/stavrophora/_sync/journals.py
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | |
dois_by_year(issn)
Return DOI counts per issued year from the journal record.
Reads breakdowns.dois-by-issued-year from /journals/{issn}.
Returns an empty dict when the record carries no breakdown.
Source code in packages/stavrophora/src/stavrophora/_sync/journals.py
27 28 29 30 31 32 33 34 35 36 | |
normalize_id(value)
Return the hyphenated uppercase ISSN form.
Source code in packages/stavrophora/src/stavrophora/_sync/journals.py
23 24 25 | |
works(issn)
Return a works client bound to journals/{issn}/works.
Accepts print or electronic ISSNs; hyphens and case are normalized.
Source code in packages/stavrophora/src/stavrophora/_sync/journals.py
38 39 40 41 42 43 44 | |
stavrophora._sync.funders
Funders resource: /funders and the /funders/{id}/works scope.
SyncFunderWorksResource
Bases: SyncScopedWorksResource
Works client that ORs a funder id plus its descendants into the
funder filter of every request.
The id set is fetched from the funder record on first use and cached.
Requests that carry their own funder filter are rejected, since the
two would silently AND together.
Source code in packages/stavrophora/src/stavrophora/_sync/funders.py
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 | |
SyncFundersResource
Bases: CrossrefResourceSyncClient[Funder]
Typed client for the Crossref /funders routes.
Accepts plain query plus the location filter.
Source code in packages/stavrophora/src/stavrophora/_sync/funders.py
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | |
descendants(funder_id)
Return the funder's descendant registry ids from its record.
Funder ids come back in Crossref's bare form ("100000025").
Returns an empty list for funders without a hierarchy; list items
from search() carry no hierarchy data at all.
Source code in packages/stavrophora/src/stavrophora/_sync/funders.py
35 36 37 38 39 40 41 42 43 | |
normalize_id(value)
Return the bare lowercase funder DOI.
Source code in packages/stavrophora/src/stavrophora/_sync/funders.py
31 32 33 | |
works(funder_id, *, include_descendants=False)
Return a works client bound to funders/{id}/works.
funder_id is the funder's Funder Registry DOI. The scoped route
already includes descendants' works; with include_descendants=True
the funder's own id plus its descendant ids are additionally ORed
into every request's funder filter, pinning the result set to
the listed ids.
Source code in packages/stavrophora/src/stavrophora/_sync/funders.py
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | |
stavrophora._sync.members
Members resource: /members and the /members/{id}/works scope.
SyncMembersResource
Bases: CrossrefResourceSyncClient[Member]
Typed client for the Crossref /members routes.
Accepts plain query plus the member-specific filters (prefix,
backfile-doi-count, current-doi-count).
Source code in packages/stavrophora/src/stavrophora/_sync/members.py
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | |
works(member_id)
Return a works client bound to members/{id}/works.
Source code in packages/stavrophora/src/stavrophora/_sync/members.py
24 25 26 27 | |
stavrophora._sync.types
Types resource: /types and the /types/{id}/works scope.
SyncTypesResource
Bases: CrossrefResourceSyncClient[CrossRefType]
Typed client for the Crossref /types routes.
The type list serves no query, filter, sort, or select;
any of those parameters is rejected client-side. Crossref ignores
rows and offset on /types and always returns the complete
list in one response, so dialect is :data:CrossrefUnpagedDialect
and count() and iterate() issue a single unpaged fetch.
Source code in packages/stavrophora/src/stavrophora/_sync/types.py
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | |
count(filters=None, *, query=None, params=None)
Return the total number of Crossref work types (single unpaged fetch).
Source code in packages/stavrophora/src/stavrophora/_sync/types.py
35 36 37 38 39 40 41 42 43 44 45 46 47 48 | |
works(type_id)
Return a works client bound to types/{id}/works.
Source code in packages/stavrophora/src/stavrophora/_sync/types.py
30 31 32 33 | |
stavrophora._sync.prefixes
Prefixes resource: /prefixes/{prefix} and its works scope.
Crossref serves no /prefixes list route (verified live: 404); prefixes
are only addressable individually.
SyncPrefixesResource
Bases: CrossrefResourceSyncClient[Prefix]
Typed client for the Crossref /prefixes/{prefix} route.
Source code in packages/stavrophora/src/stavrophora/_sync/prefixes.py
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | |
count(*_args, **_kwargs)
Not supported: Crossref serves no /prefixes list route.
Source code in packages/stavrophora/src/stavrophora/_sync/prefixes.py
35 36 37 38 39 | |
iterate(*_args, **_kwargs)
Not supported: Crossref serves no /prefixes list route.
Source code in packages/stavrophora/src/stavrophora/_sync/prefixes.py
41 42 43 44 45 | |
search(*_args, **_kwargs)
Not supported: Crossref serves no /prefixes list route.
Source code in packages/stavrophora/src/stavrophora/_sync/prefixes.py
29 30 31 32 33 | |
works(prefix)
Return a works client bound to prefixes/{prefix}/works.
Source code in packages/stavrophora/src/stavrophora/_sync/prefixes.py
24 25 26 27 | |
stavrophora._sync.licenses
Licenses resource: the /licenses list route.
Crossref has no single-license route (verified live: /licenses/{id}
returns 404); only the list endpoint exists.
SyncLicensesResource
Bases: CrossrefResourceSyncClient[License]
Typed client for the Crossref /licenses route (list/iterate only).
Source code in packages/stavrophora/src/stavrophora/_sync/licenses.py
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | |
exists(id)
Not supported: Crossref has no /licenses/{id} route.
Source code in packages/stavrophora/src/stavrophora/_sync/licenses.py
35 36 37 38 39 | |
get(id, *, select=None, params=None)
Not supported: Crossref has no /licenses/{id} route.
Source code in packages/stavrophora/src/stavrophora/_sync/licenses.py
23 24 25 26 27 28 29 30 31 32 33 | |
stavrophora._sync.datacitations
Data citations resource: the beta /beta/datacitations route.
The route lives beside the /v1 API (https://api.crossref.org/beta/
datacitations), runs in its own datacitations pool (3 requests per
second, 3 concurrent on 2026-11-28), and pages by a 0-based page number:
message.next-page holds the next page number, or null after the last
page. Crossref marks the route as beta, so its contents and output format
may change.
SyncDataCitationsResource
Typed client for the Crossref Data Citations API (beta).
Every filter is optional and the filters combine with AND:
subject_id (DOI of the citing work), object_id (DOI of the cited
dataset or software), member_id (Crossref member of the citing
work), relation (for example references), and
from_created_date / until_created_date (when Crossref added the
relationship; 2025, 2025-01, 2025-01-01, or
2025-01-01T12:00).
Source code in packages/stavrophora/src/stavrophora/_sync/datacitations.py
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 | |
count(*, subject_id=None, object_id=None, member_id=None, relation=None, from_created_date=None, until_created_date=None)
Return the number of matching data citations (one 1-row request).
Source code in packages/stavrophora/src/stavrophora/_sync/datacitations.py
134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 | |
iterate(*, subject_id=None, object_id=None, member_id=None, relation=None, from_created_date=None, until_created_date=None, rows=DATACITATIONS_MAX_ROWS)
Yield every matching data citation, following next-page.
Source code in packages/stavrophora/src/stavrophora/_sync/datacitations.py
91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 | |
search(*, subject_id=None, object_id=None, member_id=None, relation=None, from_created_date=None, until_created_date=None, rows=None, page=None)
Return one page of data citations.
page is 0-based. page.next_cursor holds the next page number
as a string, or None after the last page; page.total is the
number of matching relationships.
Source code in packages/stavrophora/src/stavrophora/_sync/datacitations.py
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 | |
Filters
stavrophora.filters
Pydantic filter models for the Crossref API.
Crossref filter syntax: filter=field:value,field:value — repeated keys
act as OR (filter=doi:a,doi:b), different keys as AND. The field lists
mirror the live API's advertised filters (verified 2026-11); unknown filters
are accepted through extra="allow" and serialized with their literal
name.
FunderFilters
Bases: _CrossrefFilters
Filter model for /funders; location is a case-sensitive country name.
Source code in packages/stavrophora/src/stavrophora/filters.py
155 156 157 158 | |
MemberFilters
Bases: _CrossrefFilters
Filter model for /members (probe-verified 2026-11).
Source code in packages/stavrophora/src/stavrophora/filters.py
147 148 149 150 151 152 | |
WorksFilters
Bases: _CrossrefFilters
Filter model for the works routes (top-level and scoped).
Source code in packages/stavrophora/src/stavrophora/filters.py
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 | |
Models
stavrophora.models.base
Base Pydantic models for the Crossref API response envelope and shared nested types.
Affiliation
Bases: EntityModel
Contributor affiliation ({name, id: [...], place: [...]}).
Source code in packages/stavrophora/src/stavrophora/models/base.py
81 82 83 84 85 86 87 | |
Assertion
Bases: EntityModel
Publisher assertion on a work (history, license info, ...).
Source code in packages/stavrophora/src/stavrophora/models/base.py
172 173 174 175 176 177 178 179 180 | |
AssertionGroup
Bases: EntityModel
Named grouping of assertions on a work.
Source code in packages/stavrophora/src/stavrophora/models/base.py
165 166 167 168 169 | |
AwardInfo
Bases: EntityModel
Award number grouping inside a funder entry.
Source code in packages/stavrophora/src/stavrophora/models/base.py
113 114 115 116 | |
Breakdowns
Bases: EntityModel
DOI counts by issued year ([[year, count], ...]).
Source code in packages/stavrophora/src/stavrophora/models/base.py
57 58 59 60 61 62 | |
ClinicalTrialNumber
Bases: EntityModel
Clinical trial registration attached to a work.
Source code in packages/stavrophora/src/stavrophora/models/base.py
183 184 185 186 187 | |
ContentDomain
Bases: EntityModel
Crossmark content domain of a work.
Source code in packages/stavrophora/src/stavrophora/models/base.py
241 242 243 244 245 | |
Contributor
Bases: EntityModel
Author/editor/contributor/chair on a work.
Source code in packages/stavrophora/src/stavrophora/models/base.py
90 91 92 93 94 95 96 97 98 99 100 101 | |
ContributorRole
Bases: EntityModel
Controlled-vocabulary role of a contributor ({role, vocabulary}).
Source code in packages/stavrophora/src/stavrophora/models/base.py
74 75 76 77 78 | |
Counts
Bases: EntityModel
DOI totals shared by journal and member records.
Source code in packages/stavrophora/src/stavrophora/models/base.py
49 50 51 52 53 54 | |
CrossRefDate
Bases: EntityModel
Crossref date object (issued, published, created, ...).
Shape: {"date-parts": [[2021, 6, 11]], "timestamp": ..., "source": ...}
Source code in packages/stavrophora/src/stavrophora/models/base.py
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | |
year
property
First year of the first date part, if present.
EntityModel
Bases: BaseModel
Shared base for Crossref entity and nested models.
Every field is optional with a default so results requested with
select (sparse fieldsets) still validate; extra="allow" keeps
fields the API returns that the spec does not document.
Source code in packages/stavrophora/src/stavrophora/models/base.py
8 9 10 11 12 13 14 15 16 | |
Event
Bases: EntityModel
Event (conference) associated with a proceedings work.
Source code in packages/stavrophora/src/stavrophora/models/base.py
206 207 208 209 210 211 212 213 214 215 216 217 | |
FunderRef
Bases: EntityModel
Funder entry on a work (Funder Registry DOI + award numbers).
Source code in packages/stavrophora/src/stavrophora/models/base.py
119 120 121 122 123 124 125 126 127 | |
Identifier
Bases: EntityModel
External id ({id, id-type, asserted-by}) used for ROR ids,
funder ids, and relation objects.
Source code in packages/stavrophora/src/stavrophora/models/base.py
65 66 67 68 69 70 71 | |
Institution
Bases: EntityModel
Institution associated with a work (e.g. posted-content affiliations).
Source code in packages/stavrophora/src/stavrophora/models/base.py
190 191 192 193 194 195 196 | |
IssnType
Bases: EntityModel
ISSN with its type (print/electronic).
Source code in packages/stavrophora/src/stavrophora/models/base.py
42 43 44 45 46 | |
JournalIssue
Bases: EntityModel
Issue details nested on a work (journal-issue).
Source code in packages/stavrophora/src/stavrophora/models/base.py
248 249 250 251 252 253 254 | |
LicenseRef
Bases: EntityModel
License entry on a work.
Source code in packages/stavrophora/src/stavrophora/models/base.py
104 105 106 107 108 109 110 | |
Link
Bases: EntityModel
Full-text link on a work.
Source code in packages/stavrophora/src/stavrophora/models/base.py
156 157 158 159 160 161 162 | |
Reference
Bases: EntityModel
Bibliographic reference on a work.
Which keys are present varies by publisher; all are optional.
Source code in packages/stavrophora/src/stavrophora/models/base.py
130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 | |
RelationObject
Bases: EntityModel
One end of a relation: {id, id-type, asserted-by}.
Source code in packages/stavrophora/src/stavrophora/models/base.py
220 221 222 223 224 225 | |
Resource
Bases: EntityModel
Landing-page resources of a work.
Source code in packages/stavrophora/src/stavrophora/models/base.py
234 235 236 237 238 | |
ResourceUrl
Bases: EntityModel
URL entry inside a work resource.
Source code in packages/stavrophora/src/stavrophora/models/base.py
228 229 230 231 | |
StandardsBody
Bases: EntityModel
Standards body of a standard work ({name, acronym}).
Source code in packages/stavrophora/src/stavrophora/models/base.py
199 200 201 202 203 | |
UpdateTo
Bases: EntityModel
Entry in a work's update-to or updated-by list.
type names the update (retraction, correction,
new_version, ...) and source who asserted it: publisher or
retraction-watch. Entries from Retraction Watch carry the Retraction
Watch database id in record_id.
Source code in packages/stavrophora/src/stavrophora/models/base.py
257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 | |
stavrophora.models.work
Pydantic models for the Work entity and its nested types.
Work
Bases: EntityModel
A Crossref work record.
Field names are snake_case with kebab-case aliases matching the live
API keys (DOI, container-title, is-referenced-by-count,
...). The Crossref spec is incomplete — extra="allow" keeps any
field the API returns but the model does not declare.
Source code in packages/stavrophora/src/stavrophora/models/work.py
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 | |
is_retracted
property
Whether a publisher or Retraction Watch reports a retraction.
primary_title
property
First title string, or "" when absent (SafeStr-style access).
retractions
property
The updated-by entries of type retraction.
Each entry names the DOI of a retraction notice. Crossref lists the
publisher's notice and the Retraction Watch record separately, so one
retraction can appear twice with different source values.
stavrophora.models.entities
Pydantic models for Crossref journal, funder, member, type, prefix and license entities.
CrossRefType
Bases: EntityModel
A Crossref work type (e.g. journal-article).
Source code in packages/stavrophora/src/stavrophora/models/entities.py
89 90 91 92 93 | |
Funder
Bases: EntityModel
A Crossref funder (Funder Registry record).
hierarchy fields only appear on /funders/{id} records, not
on funder list items.
Source code in packages/stavrophora/src/stavrophora/models/entities.py
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | |
Journal
Bases: EntityModel
A Crossref journal (list item and /journals/{issn} record).
Source code in packages/stavrophora/src/stavrophora/models/entities.py
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | |
primary_title
property
First title string, or "" when absent.
License
Bases: EntityModel
A Crossref license (list item on /licenses).
Source code in packages/stavrophora/src/stavrophora/models/entities.py
109 110 111 112 113 | |
Member
Bases: EntityModel
A Crossref member (publisher account).
Source code in packages/stavrophora/src/stavrophora/models/entities.py
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 | |
MemberPrefix
Bases: EntityModel
Prefix entry on a member record ({name, value}).
Source code in packages/stavrophora/src/stavrophora/models/entities.py
11 12 13 14 15 | |
Prefix
Bases: EntityModel
A Crossref DOI prefix owned by a member.
/prefixes/{prefix} returns member/prefix as full
https://id.crossref.org/... URIs (live 2026-09); IdSafeStr
normalizes both URI and bare forms to the bare value.
Source code in packages/stavrophora/src/stavrophora/models/entities.py
96 97 98 99 100 101 102 103 104 105 106 | |
stavrophora.models.agency
Pydantic model for the DOI registration agency lookup.
Agency
Bases: EntityModel
Registration agency for a DOI.
Source code in packages/stavrophora/src/stavrophora/models/agency.py
9 10 11 12 13 | |
WorkAgency
Bases: EntityModel
Response of GET /works/{doi}/agency.
Source code in packages/stavrophora/src/stavrophora/models/agency.py
16 17 18 19 20 | |
stavrophora.models.datacitation
Pydantic models for the Crossref Data Citations API (beta).
DataCitation
Bases: EntityModel
One data citation relationship from /beta/datacitations.
subject cites object with the relation type relation
(for example references). timestamp is the ISO 8601 time at which
Crossref added the relationship to its database.
Source code in packages/stavrophora/src/stavrophora/models/datacitation.py
22 23 24 25 26 27 28 29 30 31 32 33 | |
DataCitationEnd
Bases: EntityModel
One end of a data citation: the citing work or the cited object.
member is set on the subject only: the Crossref member that
registered the citing work.
Source code in packages/stavrophora/src/stavrophora/models/datacitation.py
9 10 11 12 13 14 15 16 17 18 19 | |
Exceptions
Exceptions are re-exported from bibliofabric; see its documentation for details. stavrophora exports APIError, AuthError, BibliofabricError, ConfigurationError, NetworkError, NotFoundError, RateLimitError, TimeoutError, and ValidationError, plus Page.