Introduction

Access millions of U.S. court opinions, statutes, and regulations through SQL, MCP, or API.

Midpage provides access to a broad legal database for the United States, including court opinions, federal and state statutes, and regulations. Our data is collected from official court and government sources through a network of custom-built scrapers.

Use the API dashboard at app.midpage.ai/developers to create API keys and review usage.

Data Access Interfaces

There are three ways to access the data:

Interface Description
SQL Read Replica Direct PostgreSQL access for raw queries and data exploration
MCP Agent Model Context Protocol integration for AI assistants
REST API HTTP endpoints for application integration

Database Overview

The public read replica exposes two schemas:

opinions Schema — Court Opinions

Table Description
courts Court definitions
cases Case metadata and docket information
docket_entries Individual opinion entries
citations Reporter citations for opinions
content Full text content in HTML format
opinion_relations Citation relationships between opinions

laws Schema — Statutes & Regulations

Table Description
collections Content collections (U.S. Code, CFR, state codes and registers)
documents All hierarchical law content — statutes, regulations, constitutions, guidance (titles, chapters, sections as an ltree)
version_relations Version-history edges between documents (amendments, supersessions)

Coverage

See the live coverage overview at app.midpage.ai/coverage/us.

Data Sources

  • 300+ Home-Built Scrapers — Our custom scrapers visit court websites 6 times per day to capture new opinions, orders, and filings.
  • Official Government Sources — Statutes and regulations sourced from GovInfo and official state repositories.
  • Enhanced Metadata — Structured extraction of judges, citations, docket numbers, case types, and party information.