POST /lawsuits — searching with search_type: "lawsuit_cnj". The difference is two new parameters, search.on_demand and search.cache_ttl_in_days, which decide whether it’s worth going to the court before responding.
🤖 Endpoint: POST https://lawsuits.production.judit.io/lawsuits. The response is still synchronous (HTTP 200 with the full JSON) — but when a court extraction is triggered, the timeout increases to up to 3 minutes. In testing, the average update time was 13 seconds, but during peak hours or court instability that time can grow.
How it works
Court trigger rules
on_demand: true, no cache_ttl_in_days
We only go to the court if the lawsuit number is not found in our database.
on_demand: true, with cache_ttl_in_days
If the lawsuit’s last update is less than the given number of days old, we respond straight from the datalake (no court call). If it’s older — or the lawsuit doesn’t exist in the base — we trigger a real-time extraction.
Request example
On-demand query by CNJ
9999999-99.9999.9.99.9999 was updated in our base less than 1 day ago, the response comes from the datalake. Otherwise, we trigger a court extraction before responding.
Request example (POST)
Reading the response
Full response example
See response example
See response example
Full structure of each item in the lawsuits array: see Lawsuit Schema. Note that the same CNJ can return more than one item (one per instance), and instances under judicial secrecy come with most fields empty.
When to use
Common errors
Next steps
- To discover lawsuits linked to a person or company (without a CNJ in hand): Synchronous Datalake Query.
- For full extraction with attachments, AI and continuous monitoring: Asynchronous Query.
- Full response structure: Lawsuit Schema.