--- id: courts-db version: "0.10.27" license: BSD-2-Clause license_treatment: permissive maintenance: active --- # courts-db — Database of Courts License: permissive · Maintenance: active · Downloads: 395.3K/mo ## 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 above — 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 pip install courts-db uv add courts-db poetry add courts-db ## Installing 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_current - Install friction: low - Maintenance: active - Downloads: 395.3K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags court lookup by name, legal court database, court identifier resolver, bankruptcy court finder, court string matching, legal-tech, court-data [View on SkillFed](https://skillfed.io/packages/courts-db) · [View on PyPI](https://pypi.org/project/courts-db/)