Skip to content

Instantly share code, notes, and snippets.

@lizkrznarich
Last active September 19, 2022 21:10
Show Gist options
  • Save lizkrznarich/6555c6619569d2406fa4fbb7de2db2af to your computer and use it in GitHub Desktop.
Save lizkrznarich/6555c6619569d2406fa4fbb7de2db2af to your computer and use it in GitHub Desktop.
ROR in DOI metadata queries

DATACITE

All DataCite DOIs

All time

curl "https://api.datacite.org/dois?query="

Schema 4.3 release to present

curl "https://api.datacite.org/dois?query=created:%5B2019-08-16+TO+[CURRENT DATE]%5D"

All DOIs with affiliation metadata of any kind

All time

curl "https://api.datacite.org/dois?query=creators.affiliation:*+OR+contributors.affiliation:*&affiliation=true"

Schema 4.3 release to present

curl "https://api.datacite.org/dois?query=%28creators.affiliation:*+OR+contributors.affiliation:*%29+AND+created:%5B2019-08-16+TO+[CURRENT DATE]%5D&affiliation=true"

DOIs with affiliation ID (any ID type)

All time

curl "https://api.datacite.org/dois?query=creators.affiliation.affiliationIdentifierScheme:*+OR+contributors.affiliation.affiliationIdentifierScheme:*&affiliation=true"s

Schema 4.3 release to present

curl "https://api.datacite.org/dois?query=%28creators.affiliation.affiliationIdentifierScheme:*+OR+contributors.affiliation.affiliationIdentifierScheme:*%29+AND+created:%5B2019-08-16+TO+[CURRENT DATE]%5D&affiliation=true"

DOIs with affiliation ROR ID

All time

curl "https://api.datacite.org/dois?query=%28creators.affiliation.affiliationIdentifierScheme:ROR+OR+contributors.affiliation.affiliationIdentifierScheme:ROR%29&affiliation=true"

Schema 4.3 release to present

curl "https://api.datacite.org/dois?query=%28creators.affiliation.affiliationIdentifierScheme:ROR+OR+contributors.affiliation.affiliationIdentifierType:ROR%29+AND+registered:%5B2019-08-01+TO+[CURRENT DATE]%5D&affiliation=true"

Notes:

  • There are DataCite DOIs with ROR IDs with a registered date prior to v4.3 schema release bc a few members have updated older DOIs (mostly Dryad).
  • &affiliation=true only causes affiliation info (if it exists) to be included in the records returned in the query response. It does not affect the number of results returned or which records included in a given result set. See DataCite docs for more info

Crossref

curl 'http://api.crossref.org/works?filter=has-ror-id:t&facet=type-name:*'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment