CrossRef/rest-api-doc

api query with DOI not working

corrad82-4s opened this issue · 4 comments

When a query is performed against api platform, with a given DOI, response contains a lot of items, most of them not related to the query.

For example, following query
https://api.crossref.org/works?query=%2C10.1111%2Fjfbc.13557

should return a single result, while about 400K items are returned.
If a lookup with same DOI is performed on crossref web site, only the item with searched DOI is correctly returned.

hi @danielopitz
thanks for taking time to look to our request.
The issue is that we don't know in advance that the input will be a DOI. We are implementing an integration that allow a researcher to just enter a query to search for (her) publications to import in an Institutional Repository to save time in metadata input. We can of course try to detect on our side when an input is a DOI but we were wondering if it will be not better if such automatic detection occur on your side (as I guess this is a need shared by many API clients).
If the query parameter could support some syntax such as specifying the index to use or boolean operator we can provide hints for the researchers to write better query.

To clarify: I'm not affiliated with Crossref.

I tried out some things and none of them worked. It is rather easy to detect a DOI, so that would be the solution I would implement. There is a possibility to query on a field, but not on the DOI field: https://github.com/CrossRef/rest-api-doc#queries I don't think it would make much sense, you can just http://api.crossref.org/works/, if it is a valid DOI you get a result, if not - you don't.

I am closing this ticket here as it looks like it has been resolved. If there are more issues can you log them here please: https://gitlab.com/crossref/issues/-/issues

Thanks you