CrossRef / rest-api-doc

Documentation for Crossref's REST API. For questions or suggestions, see https://community.crossref.org/
Other
721 stars 270 forks source link

Help needed : How to filter is-referenced-by-count based on year #550

Closed nandankita closed 3 years ago

nandankita commented 3 years ago

Is there a way to retrieve number of citations (is-referenced-by-count) of a given doi and filter the citation count with year?

for example something like this, should return count of citation from 2019 onwards https://api.crossref.org/works/10.1038/nmeth.3317?filter=is-referenced-by-count:(from-pub-date:2019-01-01)

Please let me know what will be the query for that?

pdavis8 commented 3 years ago

Hello,

So you could use this query to return the DOI and citation count, also sorted by most citations first against the prefix 10.1038.

https://api.crossref.org/prefixes/10.1038/works?filter=from-online-pub-date:2019&select=DOI,is-referenced-by-count&rows=1000&sort=is-referenced-by-count

That would only return DOIs published (with online pub date) after 2019. You could also try print publication date like:

https://api.crossref.org/prefixes/10.1038/works?filter=from-print-pub-date:2019&select=DOI,is-referenced-by-count&rows=1000&sort=is-referenced-by-count

If you want the results to be based on the creation date of the DOI and not the publication date then just swap out the publication date section of the query and replace with from-created-date:2019.

nandankita commented 3 years ago

Thanks a lot for your reply! This is very helpful! One more question please:

Is there a way to filter citation count year wise.

e.g. One paper has 200 citation in 2021,
                   100 citation in 2020,
                   400 citation in 2019,
                   300 citation in 2018  and so on..
 so for this paper total citation count from year 2019 till 2021 is 700 (200+100+400)

Is there a way to query the above?

pdavis8 commented 3 years ago

Hello,

So do you mean you want to find out when the citations were made or matched? If so we do not have that information available via the API, and unfortunately we don't totals based on each year normally.

Those totals would have needed to have been queried each year and a note made for comparison. So each year you could query the total citations against a new work to find out how many were made in that year but we don't have that information for past years.

nandankita commented 3 years ago

I understand this now. Yes as you said I wanted to query citations based on each year.

This is very helpful of you to let me know the answers. Thanks a lot! I am closing this issue now but if you have this added to the API available to query, please reopen this issue and let me know.