Warnings, Caveats and Weasel Words

Most of the experiments linked to here are running on R&D equipment in a non-production environment. They may disappear without warning and/or perform erratically. If one of them isn’t working for some reason, come back later and try again.

Citation Formatting Service

 2 minute read.

Note: This experiment has graduated. This description has been kept for reference, but many of the links and/or services that appear below no longer work.

Its functionality is now a standard feature of DOI content negotiation.

Crossref labs has added two new content types to dx.doi.org resolution for Crossref DOIs. These allow anyone to retrieve DOI bibliographic metadata as formatted bibliographic entries. To perform the formatting we’re using the citation style language processor, citeproc-js which supports a shed load of citation styles and locales. In fact, all the styles and locales found in the CSL repositories, including many common styles such as bibtex, apa, ieee, harvard, vancouver and chicago are supported.

First off, if you’d like to try citation formatting without using content negotiation, there’s a simple web UI that allows input of a DOI, style and locale selection.

If you’re more into accessing the web via your favorite programming language, have a look at these content negotiation curl examples. To make a request for the new “text/bibliography” content type:

$ curl -LH "Accept: text/bibliography; style=bibtex" http://0-dx-doi-org.library.alliant.edu/10.1038/nrd842

And get:

@article{Atkins_Gershell_2002, title={From the analyst's couch: Selective anticancer drugs}, volume={1}, DOI={10.1038/nrd842}, number={7}, journal={Nature Reviews Drug Discovery}, author={Atkins, Joshua H. and Gershell, Leland J.}, year={2002}, month={Jul}, pages={491-492}}

A locale can be specified with the “locale” content type parameter, like this:

$ curl -LH "Accept: text/bibliography; style=mla; locale=fr-FR" http://0-dx-doi-org.library.alliant.edu/10.1038/nrd842

Which gets you:

Atkins, Joshua H., et Leland J. Gershell. « From the analyst's couch: Selective anticancer drugs ». Nature Reviews Drug Discovery 1.7 (2002): 491-492.

You may want to process metadata through CSL yourself. For this use case, there’s another new content type, “application/citeproc+json” that returns metadata in a citeproc-friendly JSON form:

$ curl -LH "Accept: application/citeproc+json" http://0-dx-doi-org.library.alliant.edu/10.1038/nrd842

Returns the following

	"title":"From the analyst's couch: Selective anticancer drugs",
	"container-title":"Nature Reviews Drug Discovery",
	"author":[{"family":"Atkins","given":"Joshua H."},{"family":"Gershell","given":"Leland J."}],

Finally, to retrieve lists of supported styles and locales, either hit these URLs:

or check out the CSL style and locale repositories.

There’s one big caveat to all this. The CSL processor will do its best with Crossref metadata which can unfortunately be quite patchy at times. There may be pieces of metadata missing, inaccurate metadata or even metadata items stored under the wrong field, all resulting in odd-looking formatted citations. Most of the time, though, it works.

If you have any comments, suggestions or bug reports please fee free to send them to us here at:


Page owner: Crossref   |   Last updated 2013-January-22