Code Yarns ‍👨‍💻
Tech BlogPersonal Blog

How to get BibTeX from DOI

📅 2015-May-06 ⬩ ✍️ Ashwin Nanjappa ⬩ 🏷️ bibtex, doi ⬩ 📚 Archive

The most common way to use a DOI is to append it to the URL. The web server at that URL redirects you to the URL where the actual content of that DOI is hosted. These destination URLs are typically on the web server of some journal, publisher or conference website.

However, the DOI server also provides other services besides redirection. You can get the BibTeX entry for a DOI if you query with a HTTP header where the Content type is x-bibtex:

Here is a tiny Bash script that takes a DOI as input and returns the BibTeX from the DOI server using Curl:


curl -LH 'Accept: application/x-bibtex' $url

Tried with: Curl 7.35 and Ubuntu 14.04

© 2022 Ashwin Nanjappa • All writing under CC BY-SA license • 🐘📧