Product Launch5 min read

We Built the eCourts API That the Government Never Did — And We Open-Sourced It

It is 8:47 AM. You are a litigation lawyer in Delhi. You have four hearings today. Before you leave for court, you need to check the status of six matters — two in Delhi HC, one in Bombay, three in the Patna district court where your client's property dispute has been dragging on for two years.

So you open eCourts. You select the state. You select the court. You fill in the case type from a dropdown with 200 options. You type the case number. You squint at a CAPTCHA that looks like it was generated by a printer running out of ink. You get it wrong. You try again. You get it right. The page loads. You copy the next hearing date into your notebook.

One down. Five to go.

For the district court matters, you open a different portal — services.ecourts.gov.in — because district courts and high courts run on separate systems. You navigate a four-level dropdown: state, then district, then court complex, then establishment. You are looking for "Civil Court, Patna Sadar" but there are six options for Patna and none of them are labeled clearly. You pick one. Wrong court complex. Start over.

By 9:30, you have checked four of the six matters. You are running late. You will check the other two from the court parking lot on your phone, where the portal barely loads because it was not designed for mobile screens. Or you will not check them at all.

This is not a bad morning. This is every morning.


5 Crore Cases, Zero APIs

India has done something genuinely impressive — it has digitized court records across every level of the judiciary. The eCourts mission has brought millions of case records online across 25 High Courts, 700+ district court complexes, and the Supreme Court.

But it built portals, not infrastructure.

There is no API. There is no way for any software — your case management tool, your legal tech app, your AI assistant — to access this data programmatically. Every single query requires a human being clicking through dropdowns and solving CAPTCHAs.

This means:

A solo practitioner with 50 active matters spends their first hour every morning on administrative busywork that software should handle.

A corporate legal team tracking hundreds of matters across courts assigns a junior associate to manually check eCourts every day — an expensive, error-prone, soul-crushing task.

A legal aid organization trying to monitor thousands of bail applications for underserved communities simply cannot scale. When every case lookup requires a human clicking through a portal, tracking 5,000 cases is not 100x harder than tracking 50 — it is impossible.

And legal tech builders who want to create better tools on top of this data? They have to reverse-engineer government portals, deal with session cookies, PHP tokens, and CAPTCHAs — before they can even start building their actual product.

This is a solvable problem. Nobody solved it. So we did.


Introducing bharat-courts

bharat-courts is an open-source Python SDK that gives you — and your AI assistant — programmatic access to Indian court data.

What it covers:

  • 25 High Courts — case status, court orders, cause lists, all benches
  • 700+ District Courts — across all 36 states and union territories
  • Supreme Court of India — judgment search by party, year, keyword
  • Judgment search portal — full-text search with bulk PDF downloads

What it handles so you do not have to:

  • CAPTCHAs — built-in solvers that work automatically. You never see a CAPTCHA again.
  • Session management — the portals use PHP sessions with rotating tokens. bharat-courts handles all of it.
  • Four different portals — High Courts, District Courts, Judgment Search, and the Supreme Court each work differently. One SDK covers all of them.
  • Rate limiting — built-in, configurable, respectful of server resources.

It is MIT licensed. It is free. It is on GitHub. You can install it right now:

pip install bharat-courts

But Here Is the Part That Actually Matters

If you are a lawyer reading this, you probably skimmed past that pip install command. Fair enough. You did not go to law school to write Python.

Here is what you actually need to know: bharat-courts works with AI assistants.

If you use Claude, ChatGPT, Gemini, GitHub Copilot, Cursor — any AI tool that can run code — you can now ask it to look up Indian court data in plain English. No code. No portals. No CAPTCHAs.

You just... ask.

"What cases does Reliance Industries have pending in Delhi High Court?"

"Download all orders passed in my writ petition WP(C) 4520/2023 in Bombay High Court."

"What is on the cause list for Karnataka High Court tomorrow?"

"Find all cases filed by State of Bihar in Patna district court in 2024."

The AI writes the code, runs it, solves the CAPTCHAs, and gives you the answer.

We will show you exactly how to set this up — with copy-pasteable prompts — in our next post. It takes two minutes.


Who This Is Really For

We built this for practicing lawyers who are tired of the portal. But it turns out "programmatic access to court data" unlocks things that were simply not possible before:

Morning docket reports that write themselves. Instead of checking 30 matters one by one, a script checks all of them and emails you a summary before you wake up. Sorted by next hearing date. Every morning. Automatically.

Due diligence that does not take a week. Need to know how litigious a company is before an acquisition? Search their name across five High Courts and three years in one go. What used to take a paralegal two days now takes 30 seconds.

Legal aid at scale. An NGO tracking bail applications for underserved communities can now monitor thousands of cases programmatically. They can flag when a hearing is coming up, when an order has been passed, when a case has been disposed.

Research with real data. Law students and academics can study actual patterns — disposal rates, adjournment trends, bench composition — across courts, instead of relying on secondhand reports.


Open Source Because Court Data Should Be Open

We could have built this as a paid SaaS product. We chose not to.

Court data is public data. The eCourts portals are funded by taxpayers. The information in them belongs to the people of India. The only reason this data is hard to access is that nobody built the infrastructure layer to make it easy.

Now someone has. And it is free.

The code is at github.com/iamshouvikmitra/bharat-courts. If you are a developer, contributions are welcome — the CAPTCHA solving can be improved, the District Court client needs more search types, and the Supreme Court client needs hardening against frequent website changes.

If you are a lawyer, the only command you need is:

pip install bharat-courts

And then read our next post for the prompts that make it work with your AI assistant. No programming required.

The eCourts portal was built for a world where a human would look up one case at a time. That world ended a while ago. Court data in India is finally catching up.

Don't sign what you don't understand

Upload your document and get a plain English breakdown in minutes.

Analyze Your Document