Skip to content

How do I filter the API by court ID? #3215

Answered by mlissner
text2sql asked this question in Q&A
Discussion options

You must be logged in to vote

Well, invalid fields will be ignored, so if you're getting Texas content when you try to filter to Illinois, that means your filter didn't work (and probably Texas is just at the top of whatever returned).

Your query has two problems:

  1. You didn't filter to the court properly.
  2. You didn't use the correct court (it's ill, not il).

So you should do this instead:

https://www.courtlistener.com/api/rest/v3/opinions/?cluster__date_filed__gte=2023-01-01&cluster__docket__court=ill&cluster__precedential_status=Published

You could also do this:

https://www.courtlistener.com/api/rest/v3/opinions/?cluster__date_filed__gte=2023-01-01&cluster__docket__court__id=ill&cluster__precedential_status=Published

B…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@text2sql
Comment options

@mlissner
Comment options

Answer selected by mlissner
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #3214 on October 02, 2023 20:07.