DataCite REST API upstream quirks
Facts below were verified against the live API at https://api.datacite.org
with curl in November 2026, one to two requests per second, roughly sixty
requests during the study and a small live test run. They shape choices in
this client and the upstream documentation does not always state them.
Paging
- The default is numbered paging with
page[number]andpage[size].page[size]accepts 1 to 1000; 1001 clamps down to 1000. - Numbered paging can only reach the first 10,000 records of a query. Beyond that, DataCite returns 400 and tells you to switch to cursor paging.
- Cursor paging starts at
page[cursor]=1.links.nextin the response carries the encoded next cursor; following it walks the whole result set. - A cursor walk always sorts by
createdascending, whateversortsays. count()and single-record requests work over either mode; the client uses numbered paging forsearch()and cursor paging foriterate()andcollect().
Query syntax
- Full-text search uses
query=and matches indexed metadata. Filters are one query parameter per criterion, not onefilterobject:client-id=,provider-id=,consortium-id=,prefix=,schema-version=,state=,affiliation-id=,affiliation-country=,funded-by=,resource-type-id=,created=,registered=,published=, andhas-views=among others. - Unknown query parameters are silently ignored. A typo in a filter yields an unfiltered result, not an error.
- List values join with commas and mean OR; different keys mean AND.
sortacceptsrelevance,name,created,updated,published,view-count,download-count,citation-count, andtitle, each reversible with a leading-. Sorting bypublicationYearis silently ignored.- Sparse fieldsets use
fields[dois]=doi,titles(route-named).include=acceptsclientandmediaon DOI routes. fields[dois]honors some attribute names (doi,titles,publicationYear,publisher,schemaVersion) but silently drops others, among themresourceTypeGeneral: evenfields[dois]=resourceTypeGeneralreturns empty attributes. Do not rely on sparse fieldsets for the general resource type.
Attributes DataCite trims or varies
- Older records carry affiliations as bare strings; the models wrap those
as
{"name": ...}. publishercan be a string or an object withname,publisherIdentifier, and scheme fields.metadataVersionis a number on current records and a string on old ones.- Affiliation identifiers, publisher identifiers, and registration-agency
details are omitted unless the request passes
affiliation=true,publisher=true, ordetail=true.detail=trueadditionally addsxml,viewsOverTime,citationsOverTime, and relationship counts. - The JSON:API
typeof a DOI record isdois, and relationship names useclient,provider,media, andrepository.
Routes that behave differently than documented
GET /dois/{id}/views,/downloads, and/urlreturn 404. They belong to the login-only MDS and Usage Reports APIs, not the REST API. The client does not wrap them; use the DOI attributes oreventsinstead.GET /dois/{id}/mediareturns 404 anonymously, and anAccept: application/vnd.api+jsonrequest answers with an emptydata: [], so it is useless without a login and is not wrapped.GET /prefixes/totalsanswers204 No Contentwithout aclient-idparameter and a JSON array with one entry per prefix with it (verified 2026-11-28).prefixes.totals()therefore requires a client id./clients/totalsand/providers/totalsare public but are bare JSON arrays of{id, title, count, temporal, states}entries, not JSON:API envelopes, and they are unpaged (about 1.5 MB and 0.6 MB)./client-prefixesand/provider-prefixesrecords carry onlycreatedAtandupdatedAt; prefix, client, and provider are relationships./eventsrecords use hyphenated attribute names (subj-id,relation-type-id,citation-type,occurred-at); the spec text spellsoccured-atwithout the first r, and older fixtures use that form.- The unfiltered
/eventsroute stalls for tens of seconds; filter it (for exampledoi=) and it answers in seconds. HEAD /dois/{id}works and returns 200, so the framework defaultexists()needs no override.- Unknown DOI ids return 404 with a JSON:API errors body.
GraphQL API
POST /graphqlanswers without a login, with theAccept: application/vnd.api+jsonheader that the client sends on every request (verified 2026-11-27).- A rejected query (an unknown field, a wrong argument type) answers 400
with an
errorslist. A field that fails (a record that does not exist) answers 200 with anerrorslist anddata: null. The client raisesAPIErrorfor both and attaches the body. - Introspection is open:
__schemalists 69 fields of theQuerytype on 2026-11-27. Theidargument ofworkhas the typeID!. - The support portal had no page for the GraphQL API on 2026-11-27. The endpoint and its schema are the reference.
Traffic limits
- No rate-limit headers are sent. DataCite documents 500 requests per 5 minutes for anonymous callers; this client paces itself at 1.5 requests per second.
api.datacite.orgserves neither the swagger UI nor an OpenAPI document; the machine-readable reference lives in the DataCite support portal.