courts-db
Database of Courts
What it is and what it does
Courts-DB is a curated open-source database of courts—current and historical—built by the Free Law Project from metadata across millions of case records. It provides two main functions: `find_court()` to look up court identifiers by name string, and `find_court_by_id()` to retrieve full court metadata. The database includes regex patterns for matching court name variations, historical date ranges, jurisdiction levels, case types, and citation strings.
You feed it a court name or identifier and get back structured data: the court's ID, full name, abbreviation, location, system (state/federal/tribal), level (trial/appellate/etc.), bankruptcy status, and URL. Filtering by date and bankruptcy flag lets you disambiguate when multiple courts share similar names—for example, distinguishing the Federal District Court of Massachusetts from its Bankruptcy Court. It has no external runtime dependencies and supports Python 3.9+.
Use it for:
- Resolve ambiguous court names in legal documents or case filings to their canonical CourtListener identifiers
- Filter court results by historical date range to find the correct court for cases from specific time periods
- Identify whether a court reference is a bankruptcy court versus a general district court
- Build legal research tools that need to normalize and validate court names from user input
- Populate court metadata (URLs, abbreviations, citation strings) in case management systems
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides a searchable database of current and historical courts with string matching, date filtering, and bankruptcy court identification for legal research and case management applications.
Yes. This is a stable, actively maintained package with zero dependencies, permissive licensing, and a clear use case for legal tech and research. Install it if you need reliable court name resolution or court metadata lookup. No known vulnerabilities and low friction make it a safe choice.
Install
courts-db on PyPI
pip
pip install courts-dbuv
uv add courts-dbpoetry
poetry add courts-dbInstalling courts-db
Before you install
Low friction installation with no runtime dependencies. Actively maintained with recent releases and a stable codebase.
License in practice
BSD-2-Clause is a permissive license; you can use this package freely in commercial and private projects with minimal restrictions.
Quickstart
pip install courts_db
from courts_db import find_court, find_court_by_id
# Look up by ID
result = find_court_by_id("mass")
# Look up by name with filtering
from datetime import datetime as dt
result = find_court(
"District of Massachusetts",
bankruptcy=True,
date_found=dt.strptime("10/02/1975", "%m/%d/%Y")
)
Verify before relying
- Whether the court data is updated regularly and how currency is maintained
- Performance characteristics when searching against the full dataset
- Geographic coverage beyond US courts (if any)
Package facts
| License | BSD-2-Clause (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 142 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 395,270/month — #6,982 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: courts_db-0.10.27-py3-none-any.whl
Keywords: courts, legal
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
reporters-dbProvides a comprehensive database of U.S. court…
permissive · top 15,000 on PyPI
eyeciteExtracts legal citations from text, recognizing…
permissive · top 15,000 on PyPI
followthemoneyProvides a pragmatic data model and validation…
permissive · top 15,000 on PyPI
fingerprintsGenerates simplified entity identifiers…
permissive · top 15,000 on PyPI
commonregexExtracts dates, times, emails, phone numbers,…
permissive · top 15,000 on PyPI
cleancoCleanco strips legal suffixes (Ltd, Corp, LLC,…
permissive · top 5,000 on PyPI
nr-dateA pure-Python date parser using regex patterns…
permissive · top 15,000 on PyPI
mkdocs-excludeA mkdocs plugin that excludes files and…
permissive · top 15,000 on PyPI
multiregexMatches multiple regex patterns against a…
permissive · top 15,000 on PyPI
datefinderDatefinder extracts date and time expressions…
permissive · top 5,000 on PyPI