Stream: troubleshooting

Topic: ✔ Search API Date Range Filter


view this post on Zulip Stefan Ollinger (Nov 22 2023 at 13:12):

Hey, I try to fetch datasets via the search api in a given date range. For example https://darus.uni-stuttgart.de/api/search?q=*&fq=publicationStatus:Published&type=dataset&per_page=2&sort=date&order=asc&dateSort=[2021-01-01T00:00Z+TO+2022-01-01T00:00Z]&start=0&show_entity_ids=true should return datasets in [2021-01-01, 2022-01-01]. However in the results there are datasets with published_at in 2019. Am I doing something wrong?

view this post on Zulip Stefan Ollinger (Nov 22 2023 at 13:12):

I followed this part of the documentation: https://guides.dataverse.org/en/latest/api/search.html#date-range-search-example

view this post on Zulip Stefan Ollinger (Nov 22 2023 at 13:13):

dateSort is not documented in the list of parameters as well: https://guides.dataverse.org/en/latest/api/search.html#parameters

view this post on Zulip Stefan Ollinger (Nov 22 2023 at 13:26):

ah, my fault, the correct url would be: https://darus.uni-stuttgart.de/api/search?q=*&fq=publicationStatus:Published&type=dataset&per_page=2&sort=date&order=asc&fq=dateSort:[2021-01-01T00:00:00Z+TO+2022-01-01T00:00:00Z]&start=0&show_entity_ids=true :)

view this post on Zulip Notification Bot (Nov 22 2023 at 13:26):

Stefan Ollinger has marked this topic as resolved.


Last updated: Oct 30 2025 at 06:21 UTC