Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Documents DOI content negotiation for retrieving structured metadata, citations, and BibTeX or CSL-JSON records from DOIs.
86% 95%+9 ptsof test cases passed
Passed 21 of 22 test cases with the skill, and 19 of 22 without it.
When inspecting work metadata returned from the CrossRef API message object, where is the license URL located in the JSON structure?
Extracts the URL from the first object inside the license array list
3 of 3 safety checks passed
Master DOI content negotiation to programmatically retrieve structured metadata, citation data, and formatted references from any Digital Object Identifier.
Every DOI (e.g., 10.1038/s41586-021-03819-2) resolves to a landing page by default. However, the DOI system supports HTTP content negotiation: by sending different Accept headers, you can retrieve structured metadata in various formats instead of an HTML page.
The DOI resolver endpoint is https://doi.org/{doi} or equivalently https://dx.doi.org/{doi}.
| Accept Header | Format | Use Case |
|---|---|---|
application/vnd.citationstyles.csl+json | CSL-JSON | Programmatic metadata extraction |
text/x-bibliography; style=apa | Formatted citation | Ready-to-paste APA reference |
text/x-bibliography; style=bibtex | BibTeX | LaTeX bibliography import |
application/x-bibtex | BibTeX (alt) | LaTeX bibliography import |
application/rdf+xml | RDF/XML | Linked data applications |
text/turtle | Turtle RDF | Linked data applications |
application/vnd.crossref.unixref+xml | CrossRef Unixref | Full CrossRef metadata |
curl -LH "Accept: application/vnd.citationstyles.csl+json" \
https://doi.org/10.1038/s41586-021-03819-2
import requests
doi = "10.1038/s41586-021-03819-2"
headers = {"Accept": "application/vnd.citationstyles.csl+json"}
response = requests.get(f"https://doi.org/{doi}", headers=headers, allow_redirects=True)
metadata = response.json()
print(f"Title: {metadata['title']}")
Skills that do similar work, with their benchmark result.
Next to this one in the catalogue, plus more from the same author.