| name | doi-content-negotiation |
| description | Retrieve structured metadata from any DOI via HTTP content negotiation |
| metadata | {"openclaw":{"emoji":"🔗","category":"literature","subcategory":"metadata","keywords":["DOI","content negotiation","metadata retrieval","BibTeX","citation metadata","linked data"],"source":"https://citation.crosscite.org/"}} |
DOI Content Negotiation
Overview
Any DOI can return structured metadata in multiple formats through HTTP content negotiation — simply set the Accept header when requesting https://doi.org/{doi}. This is the most universal way to get citation metadata, BibTeX entries, JSON-LD, and RDF from any publisher without needing a specific API. Works for all 300M+ registered DOIs. Free, no authentication.
Usage
Basic Content Negotiation
curl -LH "Accept: application/vnd.citationstyles.csl+json" \
"https://doi.org/10.1038/nature14539"
curl -LH "Accept: application/x-bibtex" \
"https://doi.org/10.1038/nature14539"
curl -LH "Accept: application/x-research-info-systems" \
"https://doi.org/10.1038/nature14539"
curl -LH "Accept: text/x-bibliography; style=apa" \
"https://doi.org/10.1038/nature14539"
curl -LH "Accept: text/x-bibliography; style=chicago-author-date" \
"https://doi.org/10.1038/nature14539"
Available Formats
| Accept Header | Format | Use Case |
|---|
application/vnd.citationstyles.csl+json | Citeproc JSON | Programmatic metadata |
application/x-bibtex | BibTeX | LaTeX bibliography |
application/x-research-info-systems | RIS | Reference managers |
text/x-bibliography; style=apa | Formatted text | Direct citation |
application/rdf+xml | RDF/XML | Linked data |
text/turtle | Turtle RDF | Linked data |
application/vnd.schemaorg.ld+json | Schema.org JSON-LD | Web metadata |
application/json | DataCite JSON | DataCite DOIs |
application/vnd.crossref.unixref+xml | Crossref XML | Full Crossref metadata |
Citation Styles
Over 9,000 CSL styles available:
style=apa
style=chicago-author-date
style=ieee
style=modern-language-association
style=harvard-cite-them-right
style=vancouver
style=nature
Citeproc JSON Response
{
"DOI": "10.1038/nature14539",
"type": "article-journal",
"title": "Deep learning",
"author": [
{"given": "Yann", "family": "LeCun"},
{"given": "Yoshua", "family": "Bengio"},
{"given": "Geoffrey", "family": "Hinton"}
],
"container-title": "Nature",
"volume": "521",
"issue": "7553",
Python Usage
import requests
def get_metadata(doi: str) -> dict:
"""Get structured metadata for a DOI."""
resp = requests.get(
f"https://doi.org/{doi}",
headers={"Accept": "application/vnd.citationstyles.csl+json"},
allow_redirects=True,
)
resp.raise_for_status()
return resp.json()
def get_bibtex(doi: str) -> str:
"""Get BibTeX entry for a DOI."""
resp = requests.get(
f"https://doi.org/{doi}",
headers={"Accept": "application/x-bibtex"},
allow_redirects=True,
)
resp.raise_for_status()
return resp.text
def get_formatted_citation(doi: str,
style: str = "apa") -> str:
"""Get a formatted citation string."""
resp = requests.get(
f"https://doi.org/{doi}",
headers={
"Accept": f"text/x-bibliography; style={style}",
},
allow_redirects=True,
)
resp.raise_for_status()
return resp.text.strip()
def batch_bibtex(dois: list) -> str:
entries = []
doi dois:
:
bib = get_bibtex(doi)
entries.append(bib)
requests.HTTPError:
entries.append()
.join(entries)
meta = get_metadata()
authors = .join(
a meta.get(, [])
)
()
()
()
bibtex = get_bibtex()
()
apa = get_formatted_citation(, )
()
bibliography = batch_bibtex([
,
,
])
(, ) f:
f.write(bibliography)
Use Cases
- Bibliography generation: Export BibTeX/RIS for any DOI list
- Citation formatting: Generate properly formatted citations
- Metadata extraction: Get structured metadata for data pipelines
- Linked data: Retrieve RDF for knowledge graph construction
- Verification: Confirm publication details from authoritative source
References
See Also
- doi-resolution-guide -- Conceptual overview of DOI resolution, validation, normalization, and CrossRef API usage.