Data citations (beta)
client.data_citations covers the Crossref Data Citations API at https://api.crossref.org/beta/datacitations. Each record links a citing work (subject) to a cited dataset, software, or other work (object) with a relation type such as references. Crossref marks the route as beta, so its contents and output format may change. This resource has no single-record methods: it offers search, iterate, collect, first, and count.
Search data citations
import asyncio
from bibliofabric.crossref import CrossrefClient
client = CrossrefClient()
async def main() -> None:
async with client:
page = await client.data_citations.search(
object_id="10.3886/ICPSR01132.v1", page_size=5
)
print("total:", page.total)
c = page.results[0]
print("subject:", c.subject.id)
print("relation:", c.relation)
print("object:", c.object.id, c.object.type)
print("timestamp:", c.timestamp)
asyncio.run(main())
total: 58
subject: 10.1016/s0261-3794(01)00019-1
relation: references
object: 10.3886/icpsr01132.v1 dataset
timestamp: 2002-07-25T03:52:51Z
The DOI filters accept a bare DOI or a https://doi.org/ URL and send the DOI in lower case.
Filter the relationships
Every filter is optional, and the filters combine with AND.
| Argument | Query parameter | Matches |
|---|---|---|
subject_id |
subject-id |
DOI of the citing work |
object_id |
object-id |
DOI of the cited object |
member_id |
member-id |
Crossref member ID of the citing work |
relation |
relation |
Relation type, for example references |
from_created_date |
from-created-date |
Added on or after this date or time |
until_created_date |
until-created-date |
Added on or before this date or time |
The date filters take 2025, 2025-01, 2025-01-01, 2025-01-01T12, or 2025-01-01T12:00.
Page and count
The route pages by a 0-based page number. search() takes page_size= (1 to 1000, default 20 on the route) and page=, and page.next_cursor holds the next page number as a string, or None after the last page. count() reads the total with one 1-row request and returns 0 when the envelope carries no total.
total = await client.data_citations.count(relation="references")
print("count:", total)
n = 0
async for c in client.data_citations.iterate(
object_id="10.3886/ICPSR01132.v1", limit=3
):
n += 1
print("iter", n, c.subject.id)
count: 753904
iter 1 10.1016/s0261-3794(01)00019-1
iter 2 10.1017/s0003055404001005
iter 3 10.1017/s000305540400108x
iterate() follows the pages with 1000 rows each and repeats every filter on each page. It checks its arguments before the first request (page_size within the route cap, non-negative limit, on_error in {"raise", "skip"}), accepts limit= to bound the yield count, and takes cursor= to resume at a page number (page.next_cursor holds it as a string, an int works too). on_page(page_number, next_page) runs after every fetched page and may be an async function. Iteration stops on an empty page and when next-page is missing or fails to advance past the current page, which guards against a beta-route paging loop. collect() gathers the same output into a list.
Records that fail validation raise ValidationError by default, or are skipped and recorded in failures with on_error="skip".
Malformed beta envelopes
Crossref marks the route as beta, so its envelope can be malformed. A response without a message object, or a total-results / next-page value that is neither an integer nor a digit string, raises APIError with the request and response attached instead of silently coercing the value. Records that fail model validation raise ValidationError with the same context.
Rate limits
The route runs in its own Crossref pool and answers x-api-pool: datacitations, x-rate-limit: 3, and x-concurrency-limit: 3 with and without mailto. The client sends these requests in the datacitations rate class at 3 requests per second for every credential type; change it through CROSSREF_RATE_LIMITS. The singular x-rate-limit header is captured into client.last_rate_limit_headers like the other pool headers.