# Request Header required to retrieve items in BibTeX format

**URL:** <https://community.crossref.org/t/request-header-required-to-retrieve-items-in-bibtex-format/11988>\
**Category:** Technical Support\
**Tags:** bibtex, rest-api, metadata-retrieval\
**Created:** [19 August 2024 19:58 UTC](https://community.crossref.org/t/request-header-required-to-retrieve-items-in-bibtex-format/11988 "2024-08-19T19:58:29Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![MartinJOsborne](https://avatars.discourse-cdn.com/v4/letter/m/67e7ee/32.png) [@MartinJOsborne](https://community.crossref.org/u/MartinJOsborne)\
**Post date:** [19 August 2024 19:58 UTC](https://community.crossref.org/t/request-header-required-to-retrieve-items-in-bibtex-format/11988/1 "2024-08-19T19:58:29Z")

</div>

I would like to retrieve items from [crossref.org](http://crossref.org/) in BibTeX format. I cannot find any instructions in the documentation, but a post on this forum by @ [coelias](https://community.crossref.org/u/coelias) on the thread  
[CrossRef bibtex export & improving it - #5 by mrittman](https://community.crossref.org/t/crossref-bibtex-export-improving-it/3306/5)  
says that one can do so by setting the Accept header to “application/x-bibtex”. However, when I do that I get a “Not acceptable” response. The full headers I am setting, as reported in the response I get, are:  
headers: array:3 [▼  
“Host” =\> array:1 [▼  
0 =\> “[api.crossref.org](http://api.crossref.org/)”  
]  
“User-Agent” =\> array:1 [▼  
0 =\> “text2bib ([https://text2bib.org](https://text2bib.org/)); [mailto:martin.j.osborne@gmail.com](mailto:martin.j.osborne@gmail.com)”  
]  
“Accept” =\> array:1 [▼  
0 =\> “application/x-bibtex”  
]  
]

Has something changed since the post by @coelias?

---

<div class="post-metadata">

**Author:** ![mrittman](https://sea2.discourse-cdn.com/flex020/user_avatar/community.crossref.org/mrittman/32/2600_2.png) [@mrittman](https://community.crossref.org/u/mrittman)\
**Post date:** [20 August 2024 07:55 UTC](https://community.crossref.org/t/request-header-required-to-retrieve-items-in-bibtex-format/11988/3 "2024-08-20T07:55:52Z")

</div>

Hello. Thanks for the question, I’ll take a look at the documentation and make sure this is clearer.

You need to add ‘transform’ to the end of the query URL, so it will look something like:

[http://api.crossref.org/works/10.1142/S0217984919300011/transform](http://api.crossref.org/works/10.1142/S0217984919300011/transform)

Using the headers you have above, this should work.

---

<div class="post-metadata">

**Author:** ![mrittman](https://sea2.discourse-cdn.com/flex020/user_avatar/community.crossref.org/mrittman/32/2600_2.png) [@mrittman](https://community.crossref.org/u/mrittman)\
**Post date:** [20 August 2024 14:10 UTC](https://community.crossref.org/t/request-header-required-to-retrieve-items-in-bibtex-format/11988/4 "2024-08-20T14:10:25Z")

</div>

Another option using curl:

```auto
curl -D - -L -H "Accept: text/x-bibtex" "https://doi.org/10.1126/science.1157784"

```

---

<div class="post-metadata">

**Author:** ![MartinJOsborne](https://avatars.discourse-cdn.com/v4/letter/m/67e7ee/32.png) [@MartinJOsborne](https://community.crossref.org/u/MartinJOsborne)\
**Post date:** [20 August 2024 15:21 UTC](https://community.crossref.org/t/request-header-required-to-retrieve-items-in-bibtex-format/11988/5 "2024-08-20T15:21:01Z")

</div>

That works — thank you. I can’t find any mention in the documentation at all about generating output in BibTeX format. If there is none, it would definitely be good to add some!

---

<div class="post-metadata">

**Author:** ![mrittman](https://sea2.discourse-cdn.com/flex020/user_avatar/community.crossref.org/mrittman/32/2600_2.png) [@mrittman](https://community.crossref.org/u/mrittman)\
**Post date:** [20 August 2024 15:37 UTC](https://community.crossref.org/t/request-header-required-to-retrieve-items-in-bibtex-format/11988/6 "2024-08-20T15:37:17Z")

</div>

Yes, we’ll be adding a bibtex example soon. Thanks again for reporting this.

---

<div class="post-metadata">

**Author:** ![tobiasschweizer](https://avatars.discourse-cdn.com/v4/letter/t/e99b99/32.png) [@tobiasschweizer](https://community.crossref.org/u/tobiasschweizer)\
**Post date:** [27 August 2024 05:33 UTC](https://community.crossref.org/t/request-header-required-to-retrieve-items-in-bibtex-format/11988/7 "2024-08-27T05:33:06Z")

</div>

There are some accept headers (content negotiation) that work for Crossref, DataCite and mEDRA: [DOI Content Negotiation](https://citation.crosscite.org/docs.html#sec-4)

---

<div class="post-metadata">

**Author:** ![MartinJOsborne](https://avatars.discourse-cdn.com/v4/letter/m/67e7ee/32.png) [@MartinJOsborne](https://community.crossref.org/u/MartinJOsborne)\
**Post date:** [30 October 2024 02:47 UTC](https://community.crossref.org/t/request-header-required-to-retrieve-items-in-bibtex-format/11988/8 "2024-10-30T02:47:52Z")

</div>

Is it possible to obtain BibTeX output from a title/author query? Something like  
`https://api.crossref.org/works/transform?query.bibliographic="Toward a Unified Theory of High-Energy Metaphysics, Josiah Carberry 2008-08-13"`  
(with an accept header for application/x-bibtex). Or it is possible to retrieve BibTeX only from a doi? (I cannot find an answer in the documentation.)

---

<div class="post-metadata">

**Author:** ![mrittman](https://sea2.discourse-cdn.com/flex020/user_avatar/community.crossref.org/mrittman/32/2600_2.png) [@mrittman](https://community.crossref.org/u/mrittman)\
**Post date:** [30 October 2024 09:58 UTC](https://community.crossref.org/t/request-header-required-to-retrieve-items-in-bibtex-format/11988/9 "2024-10-30T09:58:20Z")

</div>

Sorry for the long response time for this. You need to do the query.bibliographic query first then use content negotiation to get the bibtex format. These services are run on different databases so can’t be combined into one.

---

<div class="post-metadata">

**Author:** ![MartinJOsborne](https://avatars.discourse-cdn.com/v4/letter/m/67e7ee/32.png) [@MartinJOsborne](https://community.crossref.org/u/MartinJOsborne)\
**Post date:** [30 October 2024 14:06 UTC](https://community.crossref.org/t/request-header-required-to-retrieve-items-in-bibtex-format/11988/10 "2024-10-30T14:06:52Z")

</div>

Thanks for your response. To clarify what you mean: Suppose that I want to get the record that matches the title “Toward a Unified Theory of High-Energy Metaphysics” and author “Josiah Carberry” in BibTeX format. Are you saying that first I do  
[https://api.crossref.org/works?query.bibliographic=](https://api.crossref.org/works?query.bibliographic=)“Toward a Unified Theory of High-Energy Metaphysics, Josiah Carberry”  
and then I extract the doi from the json that is returned and do a second query  
[https://api.crossref.org/works/](https://api.crossref.org/works/)/transform  
where is the doi from the first query?

---

<div class="post-metadata">

**Author:** ![mrittman](https://sea2.discourse-cdn.com/flex020/user_avatar/community.crossref.org/mrittman/32/2600_2.png) [@mrittman](https://community.crossref.org/u/mrittman)\
**Post date:** [31 October 2024 09:01 UTC](https://community.crossref.org/t/request-header-required-to-retrieve-items-in-bibtex-format/11988/11 "2024-10-31T09:01:42Z")

</div>

Yes, that’s correct - you’ll need to make two different calls to the API.
