---
title: "Court records API"
description: "A court records API for dockets, parties, hearing dates and attorney records from state court portals, county clerk searches and state bar directories."
canonical: https://www.zenrows.com/use-cases/court-records-api
updated: 2026-10-26
---

# 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.

## Sample output: one civil docket

```json
{
  "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.

| Job | Data you collect | Typical 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 breaks | What it looks like | How Zenrows handles it |
|---|---|---|
| Search-only access | No case URL until you submit a name or number | Browser submits the form in Playwright or Puppeteer; Fetch runs short flows with page actions (fill, click) |
| Imperva, DataDome and Cloudflare | A blank page or challenge loop after a few searches | Zenrows' stealth gets through all three; each search reads as a visitor |
| Capped result lists | Name searches stop at a fixed count; common names hide cases | Split into prefixes (Aa, Ab, Ac) run in parallel sessions |
| Postback pagination | Next-page posts hidden form state; a copied URL returns nothing | Browser pages through in one session, keeping cookies and form state |
| Moving hearing dates | New entries and continued hearings outdate last week's copy | Batch re-fetches every open case on your schedule |

## 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.

```javascript Node.js
// 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();
})();
```

```bash cURL
curl -X POST "https://async.api.zenrows.com/v1/jobs" \
  -H "X-API-Key: YOUR_ZENROWS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "regular",
    "status": "closed",
    "zenrows_params": { "mode": "auto", "extract": "auto" },
    "tasks": [
      { "url": "CASE_URL_1", "external_id": "26-CV-004812" },
      { "url": "CASE_URL_2", "external_id": "26-CV-005107" }
    ]
  }'
```

```bash CLI
npx -y @zenrows/cli init
# Check how one case page extracts, then refresh every open case as one job
zenrows extract CASE_URL --autoparse
zenrows batch create open-cases.jsonl --wait
zenrows batch results <job-id> --out dockets.jsonl
```

```text Claude Code (MCP)
# Connect once
claude mcp add zenrows -e ZENROWS_API_KEY=YOUR_ZENROWS_API_KEY -- npx -y @zenrows/mcp

# Then ask:
Use Zenrows to open the county court case search at CASE_SEARCH_URL, search
the party name "Sample Builders", page through every result, and return each
case number, filing date, case type and case page URL.
```

## Which Zenrows product fits

| If you need to | Use | Why |
|---|---|---|
| Search by party name and paginate | [Browser](/products/browser) | Playwright or Puppeteer keeps session, cookies and form state across pages |
| Look up a case by number | [Fetch](/products/fetch) | Page actions fill, search and wait for the docket in one request |
| Read dockets across different court systems | [Extract](/products/extract) | The docket as JSON, no parser per court |
| Refresh every open case each morning | [Batch](/products/batch) | Thousands of case URLs in one job, tagged by case number |

## What success looks like

| Measure | What good looks like | How 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

### Is there a free court records API?

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.

### Can Zenrows collect PACER data?

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.

### How do I search court records by name at scale?

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.

### Is it legal to scrape court records?

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.

### What data does a court records API return?

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.

### How do I keep dockets up to date?

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.

### Can I collect attorney and state bar records?

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.

## Related use cases

- [Public records API](https://www.zenrows.com/use-cases/public-records-api.md): Permits, violations, licenses and registry filings from public record portals, returned as JSON on demand.
- [Adverse media screening](https://www.zenrows.com/use-cases/adverse-media-screening.md): Negative news on customers, directors and suppliers from global and local sources, with text and screenshots as evidence.
- [Regulatory compliance monitoring](https://www.zenrows.com/use-cases/compliance-monitoring.md): Rule changes, enforcement actions and sanctions updates from regulator sites, diffed daily and archived with dates.
- [Fraud detection web scraping](https://www.zenrows.com/use-cases/fraud-detection-web-scraping.md): Merchant site checks, fake shop signals and marketplace seller data for payment and marketplace risk teams.
- [Automated form filling](https://www.zenrows.com/use-cases/automated-form-filling.md): Quote requests, applications and portal data entry submitted from your CSV, with every confirmation captured.
- [Browser automation](https://www.zenrows.com/use-cases/browser-automation.md): Logins, portal lookups and report downloads run in a cloud browser your Playwright or Puppeteer code drives.

Start free: https://app.zenrows.com/register. Docs: https://docs.zenrows.com

## Structured data



<script type="application/ld+json">
{"@context":"https://schema.org","@graph":[{"@type":"WebPage","@id":"https://www.zenrows.com/use-cases/court-records-api#webpage","url":"https://www.zenrows.com/use-cases/court-records-api","name":"Court records API","description":"A court records API for dockets, parties, hearing dates and attorney records from state court portals, county clerk searches and state bar directories.","isPartOf":{"@id":"https://www.zenrows.com/#website"},"inLanguage":"en","datePublished":"2026-10-26","dateModified":"2026-10-26","about":{"@type":"Thing","name":"court records api"},"keywords":"court records api, court records scraping, court data api, court records scraper, docket data, docket monitoring, attorney data, state bar records","publisher":{"@type":"Organization","name":"Zenrows","url":"https://www.zenrows.com/"}},{"@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://www.zenrows.com/"},{"@type":"ListItem","position":2,"name":"Use cases","item":"https://www.zenrows.com/use-cases"},{"@type":"ListItem","position":3,"name":"Court records API","item":"https://www.zenrows.com/use-cases/court-records-api"}]},{"@type":"FAQPage","@id":"https://www.zenrows.com/use-cases/court-records-api#faq","mainEntity":[{"@type":"Question","name":"Is there a free court records API?","acceptedAnswer":{"@type":"Answer","text":"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."}},{"@type":"Question","name":"Can Zenrows collect PACER data?","acceptedAnswer":{"@type":"Answer","text":"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."}},{"@type":"Question","name":"How do I search court records by name at scale?","acceptedAnswer":{"@type":"Answer","text":"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."}},{"@type":"Question","name":"Is it legal to scrape court records?","acceptedAnswer":{"@type":"Answer","text":"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."}},{"@type":"Question","name":"What data does a court records API return?","acceptedAnswer":{"@type":"Answer","text":"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."}},{"@type":"Question","name":"How do I keep dockets up to date?","acceptedAnswer":{"@type":"Answer","text":"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."}},{"@type":"Question","name":"Can I collect attorney and state bar records?","acceptedAnswer":{"@type":"Answer","text":"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."}}]}]}
</script>
