Visit the main Crossref website

Ticket of the month - December 2021 - retrieving a list of all DOIs I registered this year

Hello again,

Our technical support team frequently gets questions about DOIs registered during a specific time period. Some of those queries are related to quarterly invoices, while others are related to annual record keeping. The example query below will address that last point - annual record keeping - but with a tweak here or there to your REST API query (I’ll include a note below on how to do that), you can easily get quarterly or annual registration information.

Member questions about retrieving lists of DOIs registered often look like this example:

Please provide me with a user guide on how to obtain/retrieve/fetch the number of DOI submissions by prefix: 10.5555 for the year of 2021.

We need to have information on article title, journal title, doi number of the article, and when it was submitted, if possible.

Our REST API is an excellent resource for retrieving this kind of information. I know at least one of you is now thinking, “No! I don’t want to deal with a REST API!” Or, maybe: “Hold on! A REST what?!”

I understand. Some of you may have tinkered with our REST API only to see a result like this:

Not the easiest read, right? Let’s fix that!

A JSON formatter saves the day
You may wish to download a JSON formatter for your browser in order to best view this information. I use this extension for Google Chrome, but there are other extensions and other browsers, so I encourage you to find one that is right for you: JSON Formatter - Chrome Web Store

For instance, here’s the add-on that my colleague @kluschek uses for Mozilla Firefox: Basic JSON Formatter – Get this Extension for 🦊 Firefox (en-US)

If I view that same REST API query - https://0-api-crossref-org.lib.rivier.edu/prefixes/10.5555/works?filter=from-created-date:2021,until-created-date:2021&select=DOI,title,container-title,created&rows=1000 - with my new JSON formatter, well, life just got easier.

Now that we’re equipped with a formatter that makes the results readable, let’s break down the query itself:
https://0-api-crossref-org.lib.rivier.edu/prefixes/10.5555/works?filter=from-created-date:2021,until-created-date:2021&select=DOI,title,container-title,created&rows=1000

  1. The https://0-api-crossref-org.lib.rivier.edu/prefixes/10.5555/works portion of the query is going to return all works (DOIs) registered against my Crossref internal-use prefix 10.5555.

  2. The ?filter=from-created-date:2021,until-created-date:2021 portion of the query is going to restrict my query to only DOIs created (or, registered) in 2021.

  3. The &select=DOI,title,container-title,created portion of the query is going to remove some of the noisy metadata that isn’t relevant to the member’s question. Remember, in the request, the member wanted only “information on article title, journal title, doi number of the article, and when it was submitted.” My select parameter is going to limit the metadata returned to only include DOI, title, container-title (journal title in this case), and created date.

  4. The &rows=1000 portion of the query is going to give me 1000 works (or, DOIs) at a time. The default rows parameter total is 20, so I want the maximum number of works to be returned. It’s much easier to page through 1000 results at a time than 20 at a time. 1000 is the maximum number of rows that can be returned for each query. If you’ve registered more than 1000 works (or, DOIs), then you’ll want to review the pagination with offsets section of the REST API documentation.

Note: a tweak to the filter used in your query can give you quarterly results: https://0-api-crossref-org.lib.rivier.edu/prefixes/10.5555/works?filter=from-created-date:2021-01-01,until-created-date:2021-03-31&select=DOI,title,container-title,created&rows=1000 (first quarter of 2021)

Or, monthly results:
https://0-api-crossref-org.lib.rivier.edu/prefixes/10.5555/works?filter=from-created-date:2021-11-01,until-created-date:2021-11-30&select=DOI,title,container-title,created&rows=1000 (November 2021)

If you’d like to learn more about using our REST API, here’s a great starting point: Swagger UI

Thanks for reading,
Isaac

3 Likes