v4 API - filtering by date #4709
-
Hi-- I'm a new dev for anylaw. Trying to backfill some specific years and jurisdictions. I'm trying to use the filters, specifically date_created_lte. For example, if I make a GET request like this: "https://www.courtlistener.com/api/rest/v4/dockets?court=nysupct&date_created__lte=2014-10-31&order_by=date_created" - I'd expect results from before that date, but I get null. If change to date_created__lte=2016-10-31, it returns results. If I check via the Courtlistener search page, there are results from before 2014-10-31. Is there some sort of cutoff with the filter or am I not understanding this correctly? Appreciate it!! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
I think you've got it, but what's a bit confusing is that the search engine has a trick that it does behind the scenes when you search for The fix for this, I think, is to find the child courts for |
Beta Was this translation helpful? Give feedback.
I think you've got it, but what's a bit confusing is that the search engine has a trick that it does behind the scenes when you search for
nysupct
. We have a system of parent-child courts that allows us to tag cases with the greatest-possible granularity. So when you search fornysupct
on the search engine, it expands your query to also include the child courts fornysupct
, but when you're on the API, we don't do that. The idea is that search is fuzzy and can do nice things for users, but the API is more like a database and should do exactly what you tell it to.The fix for this, I think, is to find the child courts for
nysupct
, and then filter by those in the API as well.