CrossRef / rest-api-doc

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

Filter on created-date #555

Open priyam-maheshwari opened 3 years ago

priyam-maheshwari commented 3 years ago

I want to use Crossref API to get any new content added for a journal the day before. I have a script which runs once daily and checks for any content added the day before for this journal. I am thinking of using created-date timestamp filter for this https://api.crossref.org/journals/2572-1054/works?filter=from-created-date:2021-04-23,until-created-date:2021-04-23

I am not using published-online because it seems it's possible when the content is submitted to Crossref the published-online date is in past and therefore it might happen when I look for particular date range, that paper hasn't been added and then it might be added 2 days later but then the published-online date I am filtering on is only yesterday's timestamp.

ppolischuk commented 3 years ago

Hello. It sounds like from-created-date and until-created-date are the right date filters to use in your case.

It's possible that processing delays might prevent content appearing in the Crossref REST API on the created-date timestamp, so if you're looking for everything with a created date of 2021-04-23 on 2021-04-24, you might not retrieve everything.

The incident you mentioned in your third bullet point is an example of the above. We've since resolved the issue, and I wouldn't have expected 2021-04-23 to be impacted by this incident. It doesn't look like more than one record has been deposited in that journal since the beginning of the year. https://api.crossref.org/journals/2572-1054/works?filter=from-created-date:2021-01-01,until-created-date:2021-04-23