@midpage-ai/scrapersDocumentationAPI Reference

Introduction

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

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

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 (2000+ courts)
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)
statutes Hierarchical statute content (titles, chapters, sections)
regulations Hierarchical regulation content (CFR, state admin codes)
citation_relations Cross-references between document types

Coverage

Court Opinions:

  • 13M+ court opinions
  • 2000+ federal and state courts
  • Historical coverage back to founding-era cases

Statutes & Regulations:

  • U.S. Code — All titles of federal statutes
  • Code of Federal Regulations (CFR) — All federal regulations
  • State codes — Expanding state statute coverage

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.
  • Citation Graph — Cross-references between opinions, statutes, and regulations enabling relationship discovery.