Crawl: the most reliable web crawler APISee what’s new
Zenrows
Talk to sales Start free

Court records API

A court records API retrieves the case information courts publish online: docket entries, parties, case status, hearing dates and attorney details. Zenrows runs each court portal's search form in a Browser session or a Fetch request, gets through Imperva, DataDome and Cloudflare, and returns every docket as JSON to store and refresh.

Updated

Sample output: one civil docket
{
  "court": "Superior Court of Example County",
  "state": "CA",
  "case_number": "26-CV-004812",
  "case_type": "Civil, breach of contract",
  "filed_date": "2026-03-02",
  "status": "active",
  "department": "Dept. 14",
  "parties": [
    { "role": "plaintiff", "name": "Example Supply LLC" },
    { "role": "defendant", "name": "Sample Builders Inc." }
  ],
  "attorneys": [
    { "for": "plaintiff", "bar_number": "000000", "firm": "Example Law Group" }
  ],
  "docket_entries": [
    { "date": "2026-03-02", "entry": "Complaint filed" },
    { "date": "2026-05-18", "entry": "Answer filed" },
    { "date": "2026-10-09", "entry": "Case management conference set" }
  ],
  "next_hearing": { "date": "2026-11-17", "type": "Case management conference" },
  "source_url": "https://courts.example.gov/case/26-CV-004812",
  "fetched_at": "2026-10-17T07:15:44Z"
}
Illustrative. The case number is the key you refresh against.

What legal data teams collect from courts

Two shapes of work: find new cases by party name or filing date, and follow tracked ones until they close.

JobData you collectTypical sources
Docket monitoring New entries, rulings, hearing dates, status State trial court portals, county clerk case search
Litigation checks for due diligence Cases by party, type, filing date, disposition State court name search, county civil and small claims indexes
Attorney and bar data Bar number, admission date, license status, firm, public discipline State bar directories: California, Texas, Florida, New York
Judgment and lien checks Amount, creditor, filing date, satisfaction status County clerk and recorder indexes
Legal analytics Motion types, time to ruling, department, outcomes Docket histories on the same cases over months
Published opinions Text, citation, court, decision date State appellate opinion pages, Justia

Why court records scraping breaks

Portals offer a search box, not a case list, often behind bot protection.

Each query must look like a member of the public's.

What it looks like

No case URL until you submit a name or number

How Zenrows handles it

Browser submits the form in Playwright or Puppeteer; Fetch runs short flows with page actions (fill, click)

How to build a court records API

  1. Map each court's search: fields, result cap, pagination style, stable case URLs or not.
  2. Run searches in Browser with Puppeteer or Playwright, paging through results and saving each case URL with its number.
  3. Fetch case pages directly with Adaptive Stealth Mode, pulling the docket with CSS selectors or Extract.
  4. Refresh open cases with Batch daily: diff docket entries with the last run, close out final dispositions.
// npm install puppeteer-core
const puppeteer = require("puppeteer-core");

(async () => {
  const browser = await puppeteer.connect({
    browserWSEndpoint: "wss://browser.zenrows.com?apikey=YOUR_ZENROWS_API_KEY",
  });
  const page = await browser.newPage();
  await page.goto(CASE_SEARCH_URL, { waitUntil: "networkidle2" });
  // example selectors: replace with the court portal's own
  await page.type("#partyName", "Sample Builders");
  await page.click("#searchButton");

  const cases = [];
  while (true) {
    await page.waitForSelector("table#caseResults");
    cases.push(...(await page.$$eval("table#caseResults tbody tr", (rows) =>
      rows.map((r) => ({
        caseNumber: r.cells[0].innerText.trim(),
        filed: r.cells[2].innerText.trim(),
        link: r.querySelector("a") ? r.querySelector("a").href : null,
      }))
    )));
    const next = await page.$("a.next-page");
    if (!next) break;
    await Promise.all([page.waitForNavigation(), next.click()]);
  }
  console.log(cases.length, cases[0]);
  await browser.close();
})();

What success looks like

MeasureWhat good looks likeHow to check it
Docket lag New entries stored within one refresh cycle Filing date against first-stored time
Search completeness Every prefix search stays under the result cap Flag queries that hit the cap; split further
Docket completeness Entry count per case matches the court's page Weekly sample against the live docket
Match precision Name matches confirmed by a second identifier Matches without a case number or address
Court coverage Parsed dockets from every court on your roadmap Parsed cases per court against plan

Court records API FAQ

  • A few. CourtListener, from the Free Law Project, covers opinions and the federal dockets in its RECAP archive; some state judiciaries publish bulk data. Most state and county courts offer only a search page, which a Zenrows-built API reads directly, for the courts and fields you choose.

  • PACER needs your own account and charges per page. A Browser session can run your logged-in workflow, with your credentials and fees. A common split: PACER for federal dockets, Zenrows for state and county portals, where most civil and criminal cases are filed.

  • Courts cap name searches, so split each into two-letter prefixes that stay under the cap. Run them in parallel Browser sessions, save case URLs with their numbers, and dedupe before fetching dockets.

  • Court records are public by default in most US jurisdictions, and collecting them is routine in legal analytics, due diligence and journalism. Some are later sealed or expunged, and dockets name private individuals, so privacy and consumer reporting rules may apply. Respect each court's terms and ask your legal team.

  • Case number, court, type, filing date, status, parties and roles, attorneys with bar numbers, judge, and docket entries with date, description and document link where published, usually with hearings and dispositions. Normalize party names and case types: each system labels them differently.

  • Resubmit open case URLs to Batch daily, diff entries and hearings with the last run, and drop cases with a final disposition to a monthly check for appeals or post-judgment activity.

  • Yes. Bar directories publish name, bar number, admission date, status, firm and address, often with public discipline. Key on bar number, refresh monthly, and join to cases through the bar numbers on dockets.

Turn the live web into usable data.