Legal data APIs compared: CourtListener, PACER and more

Hiba FathimaHiba Fathima
Nov 03, 2026

TL;DR

  • A legal data API returns court opinions, dockets, bills and statutes as structured data with a source link, so AI agents can quote the record itself.
  • Free tiers are small and paid access varies widely. A free CourtListener account gets 125 requests a day and LegiScan's free tier 10,000 queries a month. PACER bills $0.10 per page, rising to $0.12 on January 1, 2027, and Westlaw and Lexis sell API access through sales.
  • Firecrawl puts legal data for AI agents behind one API key. The free Firecrawl Government & Legal Index searches 30 million US government pages. Firecrawl Alexandria adds CourtListener opinions and dockets, state and UK legislation, Canadian court decisions and USPTO records.

AI agents that answer legal questions need the source text. Damien Charlotin's public AI Hallucination Cases database lists more than 2,200 court decisions involving AI-generated fake citations or arguments.

A legal data API gives an agent the opinion, docket or statute itself, with a link a person can check. Below, the main options are compared on coverage, price, access and how well an AI agent can work with them. Prices are from each vendor's own page as of November 2026.

What is a legal data API?

A legal data API is an interface that returns legal records, such as court opinions, docket entries, bills, statutes and regulations, as structured fields. Each record carries its court or legislature, dates and a source link. Developers and AI agents call it instead of searching court and legislature websites by hand.

Legal data APIs fall into four groups:

  1. Case law APIs return published opinions with citations, judges and filing dates.
  2. Court records APIs return dockets, parties and filings from active and closed cases.
  3. Legislation APIs return bills, status, sponsors and roll call votes.
  4. Commercial research APIs expose a paid research platform's content and editorial tools.

How do the main legal data APIs compare?

Firecrawl, CourtListener, PACER, LegiScan, Westlaw and Lexis differ most on price and access. Firecrawl and CourtListener work with AI agents out of the box, PACER bills per page, LegiScan focuses on legislation, and Westlaw and Lexis sell API access through their sales teams.

APIWhat it coversPriceAccessAgent setup
Firecrawl (Firecrawl Alexandria and the Firecrawl Government & Legal Index)US statutes, regulations, local codes, court opinions, bills and agency guidance in one index; CourtListener opinions and federal dockets, state and UK legislation, Canadian court decisions and USPTO records as Firecrawl Alexandria providersIndex searches free; Firecrawl Alexandria calls at each tool's listed price (5 Firecrawl credits for CourtListener); free plan includes 1,000 Firecrawl credits a monthOne Firecrawl API key; the index works without a key to startMCP server, CLI, SDKs, REST API, ChatGPT plugin, Claude connector
CourtListener APIOver nine million decisions from 2,000+ courts, the RECAP archive of PACER data, oral arguments, judgesFree account: 5 requests a minute, 125 a day; memberships from $10 a month for eligible small organizations; commercial agreements for othersCourtListener account and API tokenREST API, webhooks, bulk data, an MCP server
PACER Case Locator APIFederal court case and party search$0.10 per page, $3 cap per document, search results uncapped; $0.12 per page from January 1, 2027PACER account; token from username and passwordREST API with XML or JSON
LegiScan APIBills in all 50 states and Congress: status, sponsors, full text, roll callsPublic tier free for 10,000 queries a month; Flex from $1,000 a yearFree LegiScan account and API keyJSON pull API; Push API for full replication
Thomson Reuters (Westlaw)Thomson Reuters legal content through its Developer PortalNot listed; non-customers contact salesThomson Reuters account and app keysREST APIs
Lexis APIsStatutes, case law, regulatory updates, news, CourtLink dockets, State Net legislationNot listed; talk to an API specialistOAuth 2.0REST and Cognitive APIs, Protégé API

How does Firecrawl Alexandria cover legal data?

Firecrawl Alexandria gives AI agents structured data from data providers and Firecrawl's own indexes through the same Firecrawl API key, MCP server and CLI they use for search and scraping. For legal work it holds the Firecrawl Government & Legal Index and providers for court opinions, dockets, legislation and trademarks.

An agent finds a tool for free, reads its inputs and listed price in Firecrawl credits, then calls it. Some providers ask a team admin to accept their terms once before the first call.

These legal use cases run through Firecrawl Alexandria:

Use caseFirecrawl Alexandria provider and capability
Find statutes, regulations, local codes and agency guidanceFirecrawl Government & Legal Index search
Search US court opinions by text, court and filing dateCourtListener opinions/search_opinions
Find federal PACER dockets by party or case nameCourtListener dockets/search_dockets
Find California bills on a topicCalifornia Legislative Information legislation/bill_search
Find UK Acts and statutory instrumentslegislation.gov.uk legislation/search_legislation
Search Supreme Court of Canada judgmentsSupreme Court of Canada decisions court-cases/search_decisions
Search US trademarks by mark textUSPTO intellectual-property/trademark_search
List US House roll call votesOffice of the Clerk, US House legislative-votes/votes

What is the Firecrawl Government & Legal Index?

The Firecrawl Government & Legal Index is a search index of 30 million pages from US federal, state, county and city government sites. It covers statutes, regulations, court opinions, bills, municipal and zoning codes, permits, tax forms and agency guidance, and every result links to its source.

Searches use no Firecrawl credits and work without an API key to start. The free plan allows 1,000 index calls a day, Growth 2,000, and Scale and Enterprise plans are unlimited. Filters narrow results by jurisdiction, court, court type, cited law and site, and through Firecrawl Alexandria each result lists the statutes and cases it cites. The launch post walks through an example.

What do CourtListener, PACER, LegiScan, Westlaw and Lexis offer?

CourtListener, PACER, LegiScan, Westlaw and Lexis each serve one part of legal data through their own API and account. CourtListener focuses on case law and federal dockets, PACER on federal court records, LegiScan on legislation, and Westlaw and Lexis on their research platforms.

What does the CourtListener API offer?

The CourtListener API, run by the non-profit Free Law Project, serves case law, PACER dockets from its RECAP archive, oral arguments and judge data. Since May 7, 2026, any account can call every API, including the PACER APIs that used to need special permission.

The same change lowered the default rate limit from 5,000 requests an hour to 5 a minute, 50 an hour and 125 a day. Paid memberships raise it to 1,400 a day at the top individual tier. Free Law Project limits membership API use to small firms, academics, small media outlets and pre-revenue organizations, and offers commercial agreements to everyone else.

How does PACER charge for API access?

The PACER Case Locator API searches federal cases and parties, and its searches bill against a PACER account. Searches cost $0.10 per page even when nothing matches, with no cap, while documents cap at $3 each.

The federal judiciary announced on June 26, 2026 that the rate rises to $0.12 per page on January 1, 2027, for five years. The quarterly fee exemption rises from $30 to $40 at the same time. Programmatic access means logging in with a PACER username and password to get a token, according to the August 2026 PCL API guide.

What does the LegiScan API cover?

The LegiScan API returns legislation from all 50 states and Congress as JSON, including bill status, sponsors, full texts and roll call records. Its data is licensed under CC BY 4.0.

The free Public tier allows 10,000 queries a month. Flex starts at $1,000 a year for 30,000 queries a month, and Pull raises the allowance to 100,000 queries a month. The Push tier replicates the full national database to your endpoint every four hours.

How do Westlaw and Lexis offer API access?

Both do, through sales. The Thomson Reuters Developer Portal lists the company's APIs and tells non-customers to contact sales for access. LexisNexis offers REST APIs, the Protégé API for its generative AI features, the CourtLink docket API and the State Net legislation API, with OAuth 2.0 authentication. Neither page lists a price.

How do you use Firecrawl legal data in ChatGPT, Claude or your own agent?

The simplest way to use Firecrawl legal data is a chat assistant. Add the official Firecrawl plugin in ChatGPT or the Firecrawl connector in Claude, then paste one of the prompts below. The assistant calls the Firecrawl Government & Legal Index or Firecrawl Alexandria for you.

The same prompts work in Cursor, Claude Code, Codex and other MCP clients once the Firecrawl MCP server is connected. Our list of Claude connectors covers the Claude setup.

Use Firecrawl to search the Firecrawl Government & Legal Index for the California statute that caps residential rent increases. Quote the controlling text, link the source and name the jurisdiction.

Use Firecrawl Alexandria to search CourtListener for California appellate opinions about the Tenant Protection Act rent cap. List each case name, court, filing date and link.

Use Firecrawl Alexandria to find California bills from the 2025-2026 session about artificial intelligence, then give me each bill's status and author.

Developers can run the same calls from code. This Python example searches the index, then pulls matching court opinions through Firecrawl Alexandria:

import os
from firecrawl import Firecrawl
 
firecrawl = Firecrawl(api_key=os.environ["FIRECRAWL_API_KEY"])
 
# Statutes, regulations and local codes: Firecrawl Government & Legal Index (free)
laws = firecrawl.gov_search("California cap on residential rent increases", k=3)
for item in laws.data.web or []:
    print(item.title, item.url)
 
# Court opinions: CourtListener through Firecrawl Alexandria
opinions = firecrawl.scrape(
    alexandria={
        "provider": "courtlistener-com",
        "capability": "opinions/search_opinions",
        "options": {"query": "Tenant Protection Act rent cap", "court": ["cal", "calctapp"]},
    },
)
for case in opinions.alexandria[0].data["results"][:3]:
    print(case["case_name"], case["date_filed"], case["source_url"])

The same calls are available in the Node SDK, the REST API (/v2/search/gov), the Firecrawl CLI (firecrawl gov) and the MCP server (firecrawl_gov_search), and Firecrawl also works in no-code tools such as n8n and Zapier. To try the index with no account, call Firecrawl /search/gov or run firecrawl gov without an API key. Firecrawl Alexandria providers don't run keyless. They need a free Firecrawl API key, and some ask a team admin to accept their terms first.

Court opinions often arrive as PDFs. Firecrawl /scrape and Firecrawl /parse turn an opinion PDF or a court page into Markdown for the agent, and our PDF parser comparison covers that step in more depth. Firecrawl /monitor sends an alert when a docket page or bill page changes.

Which legal data API fits which job?

The right legal data API depends on the records you need and how your agent reaches them. Match the job to the source that covers it:

  • AI agents that need statutes, codes, opinions and dockets through one key: Firecrawl, with the Firecrawl Government & Legal Index and Firecrawl Alexandria.
  • Case law research and citation graphs for a small or academic team: the CourtListener API, directly or through Firecrawl Alexandria.
  • Federal dockets straight from the courts: PACER, billed per page.
  • Bill tracking across all 50 states: the LegiScan API.
  • Teams that already license Westlaw or Lexis: those vendors' APIs, through sales.

Teams across regulated industries build on Firecrawl. Athena Intelligence, an AI analytics platform for finance, law, defense, audit and consulting firms, uses it to bring web content into its models:

The ability to quickly capture website content in a format that our language models can readily consume is invaluable to us.

Patrick Ben-Reilly, Founding Platform Engineer, Athena Intelligence (read the story)

Firecrawl is used by 67% of Fortune 100 companies; the enterprise page and trust center cover security and deployment.

Firecrawl is the context API for AI agents. To try it, call Firecrawl /search/gov keyless, with no API key, or follow the keyless MCP setup, then add a free API key for Firecrawl Alexandria and higher limits. For other verticals, see our best search API by use case guide and how agents reduce hallucinations with real-time search.

What other data is in Firecrawl Alexandria?

Legal data is one part of the catalog. Firecrawl Alexandria groups its providers into categories:

CategoryExample providers
GovernmentFirecrawl Government & Legal Index, CourtListener, SEC EDGAR
CompaniesApollo, Fiscal.ai, People Data Labs
PeopleApollo, FullEnrich, Data Legion
FinanceFiscal.ai, Benzinga, B3 listed companies and indices
NewsBenzinga, GlobeNewswire, CBC News
JobsGreenhouse, Ashby, Built In
ResearchFirecrawl Research Index
DeveloperFirecrawl Developer Index
SoftwareGitHub, Docker Hub, CVE.org
AppsApple App Store, npm, PyPI
AI modelsHugging Face, Artificial Analysis, ElevenLabs
HealthCDC PLACES, CMS data, AlphaFold
HealthcareNPI Registry, CMS Open Payments, NIH grants
Life sciencesClinicalTrials.gov, ChEMBL, AlphaFold
KnowledgeWikipedia
EducationHarvard Gazette, Cornell Chronicle, Sefaria
Political scienceHarvard Dataverse, Legislative Assembly of Alberta
MarketingSimilarweb, Trends, Upspring
Digital intelligenceSimilarweb
PodcastsParticle
ShoppingAllbirds, Alibaba, Action
RestaurantsDomino's US, Pizza Hut US, DoorDash
TravelAgoda, Amtrak, Campspot
PlacesBing Maps, Better Business Bureau
Real estateAnalyze Boston, ArcGIS, Auction.com
AutomotiveCars & Bids, AuctionTime
SportsESPN, NFL.com, MLB Baseball Savant
EntertainmentTMDB, JustWatch, BFI Collections Search
EnergyCanada Energy Regulator, Alberta Utilities Commission
AgricultureCanadian Nutrient File, Australian Food Composition Database
SkillsWayback Machine, DOI.org

For the wider picture, see Firecrawl Alexandria's launch post and our guide to data connectors for AI agents.

Use Firecrawl in your agent

Add Firecrawl to ChatGPT, Claude, Cursor and more in one click.

Frequently Asked Questions

What is a legal data API?

It is an interface that returns legal records, such as court opinions, docket entries, bills, statutes and regulations, as structured fields with a link to the source. Software and AI agents call it instead of reading court and legislature websites page by page.

Is there a free legal data API?

Several have free tiers. A free CourtListener account gets 125 API requests a day, the LegiScan Public API allows 10,000 queries a month, and searches of the Firecrawl Government & Legal Index use no Firecrawl credits, with 1,000 calls a day on the Firecrawl free plan.

How much does the PACER API cost?

The PACER Case Locator API bills against a PACER account at 10 cents per page, capped at 3 dollars per document, while search results have no cap. On January 1, 2027 the rate becomes 12 cents per page, and the quarterly fee waiver rises from 30 to 40 dollars.

Do Westlaw and LexisNexis have APIs?

Yes. Thomson Reuters offers its APIs through a developer portal and asks non-customers to contact sales, and LexisNexis sells REST, Protégé, CourtLink and State Net APIs through API specialists. Neither publishes an API price on those pages.

Can ChatGPT or Claude search court opinions and statutes?

Yes, once Firecrawl is connected through the official plugin in ChatGPT or the connector in Claude. The assistant can then search the Firecrawl Government & Legal Index for statutes and codes and call CourtListener through Firecrawl Alexandria for court opinions and federal dockets.

Which legal data API covers state legislation?

LegiScan covers bills in all 50 states and Congress. Through Firecrawl Alexandria, AI agents can read California bills, status and votes from California Legislative Information and UK Acts from legislation.gov.uk, and the Firecrawl Government & Legal Index also returns state codes and bill text.

//
Get started
//
Ready to build?
Start getting web context for free and scale seamlessly as your project expands. No credit card needed.
Are you an AI agent? See setup options