-
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi, um, Mike! The Nature of Suit code can be queried in two ways. First, via search. To identify a query using search, start on the front end, with a query like: https://www.courtlistener.com/?type=r&q=&type=r&order_by=score%20desc&nature_of_suit=120 That'll give you all the items with NoS of "120", but note that these are not normalized and sometimes courts just give the NoS as a string, so you'd want to be a bit more clever with something like But the next step I'd take is to convert that to an API request by tweaking the URL: Now you get back JSON. Great! Now, the NoS code is a field on the docket object, so you might also be thinking, "Hey, can I get dockets instead of search results?" I didn't know if this was possible, so I checked by sending an HTTP OPTIONS request to the docket endpoint, and then using
That tells you that, yes, you can do look-ups on the NoS. field of the docket. Therefore, I tried this:
That was very slow, but it did eventually work. We have database index on that field, but the table still has 60M records, so this kind of thing is hard.
Doing an Does this help? |
Beta Was this translation helpful? Give feedback.
Hi, um, Mike! The Nature of Suit code can be queried in two ways. First, via search. To identify a query using search, start on the front end, with a query like:
https://www.courtlistener.com/?type=r&q=&type=r&order_by=score%20desc&nature_of_suit=120
That'll give you all the items with NoS of "120", but note that these are not normalized and sometimes courts just give the NoS as a string, so you'd want to be a bit more clever with something like
120 OR Marine OR...
But the next step I'd take is to convert that to an API request by tweaking the URL:
https://www.courtlistener.com/api/rest/v3/search/?type=r&q=&type=r&order_by=score%20desc&nature_of_suit=120
Now you get back JSON.
Great!
Now,…