Discover/Cornell API
live

Cornell APIlaw.cornell.edu

Access thousands of legal definitions, categories, and related terms from Cornell Law's Wex encyclopedia via 4 structured endpoints.

Endpoint health
verified 6d ago
list_entries
get_category_entries
search_entries
get_entry
4/4 passing latest checkself-healing
Endpoints
4
Updated
21d ago

What is the Cornell API?

The Cornell Law Wex API provides structured access to thousands of legal encyclopedia entries across 4 endpoints, covering definitions, legal area categories, alphabetical browsing, and keyword search. The get_entry endpoint returns the full text definition, a list of legal areas, and cross-referenced related terms for any Wex entry by slug. Developers can browse entries with list_entries, search by keyword with search_entries, or page through category-scoped results with get_category_entries.

Try it
Maximum number of entries to return. 0 returns all entries.
Letter to browse (a-z, or numbers 1, 3, 4, 7, 9). Use 'all' to get entries for all letters.
api.parse.bot/scraper/6bd7af01-4baf-49a4-ac73-de7eb8734ea7/<endpoint>
Ready to send
Fill in the parameters and hit sign in to send to see live response data here.
Call it over HTTPgrab a free API key at signup
curl -X GET 'https://api.parse.bot/scraper/6bd7af01-4baf-49a4-ac73-de7eb8734ea7/list_entries?limit=5&letter=a' \
  -H 'X-API-Key: $PARSE_API_KEY'
Python SDK · recommended

Typed, relational, agent-ready

A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.

  • Fully typed · autocompletes
  • Objects link to objects
  • Typed errors & pagination

Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:

uv add parse-sdk
uv run parse init
uv run parse add --marketplace law-cornell-edu-api

uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.

from parse_apis.cornell_law_wex_legal_encyclopedia_api import Wex, Entry, EntrySummary, CategoryEntry, Letter

wex = Wex()

# List entries for a specific letter using the Letter enum
for summary in wex.entrysummaries.list(letter=Letter.C, limit=5):
    print(summary.term, summary.slug, summary.url)

# Search for entries matching a keyword
for result in wex.entrysummaries.search(query="tort", letter=Letter.T, limit=3):
    print(result.term, result.slug)

# Navigate from summary to full entry detail
for summary in wex.entrysummaries.list(letter=Letter.A, limit=2):
    entry = summary.details()
    print(entry.term, entry.definition[:80], entry.legal_areas)

# Get a specific entry by slug
entry = wex.entries.get(slug="contract")
print(entry.term, entry.url, entry.see_also[:3])

# Browse a category with auto-pagination
contracts = wex.category(slug="contracts")
for cat_entry in contracts.list_entries(limit=5):
    print(cat_entry.term, cat_entry.snippet[:60], cat_entry.url)
All endpoints · 4 totalmissing one? ·

List Wex legal encyclopedia entries for a specific letter or all letters. Returns term names, slugs, and URLs. Each letter page contains all entries starting with that letter. Use 'all' to fetch every letter sequentially. No server-side pagination; use limit to cap the result count client-side.

Input
ParamTypeDescription
limitintegerMaximum number of entries to return. 0 returns all entries.
letterstringLetter to browse (a-z, or numbers 1, 3, 4, 7, 9). Use 'all' to get entries for all letters.
Response
{
  "type": "object",
  "fields": {
    "total": "integer, number of entries returned",
    "letter": "string, the letter queried (uppercased, or 'ALL')",
    "entries": "array of objects with keys: term, url, slug, letter"
  },
  "sample": {
    "data": {
      "total": 5,
      "letter": "A",
      "entries": [
        {
          "url": "https://www.law.cornell.edu/wex/a_fortiori",
          "slug": "a_fortiori",
          "term": "a fortiori",
          "letter": "A"
        }
      ]
    },
    "status": "success"
  }
}

About the Cornell API

What the API covers

Cornell Law's Wex is a free legal encyclopedia maintained by LII (Legal Information Institute). This API exposes its content as structured JSON: term names, slugs, full definitions, legal area classifications, and cross-references. Entries cover foundational legal concepts — from habeas_corpus and first_amendment to consideration and negligence — organized both alphabetically and by practice area.

Browsing and searching entries

The list_entries endpoint accepts a letter parameter (a–z, or numeric entries like 1, 3, 4, 7, 9) and returns an array of objects each containing term, url, slug, and letter. Passing letter=all retrieves the full alphabetical index sequentially. The search_entries endpoint performs a case-insensitive substring match against term names; by default it narrows to the letter matching the first character of the query, but you can override this with the letter parameter. Both endpoints accept a limit parameter to cap result counts.

Fetching full definitions and categories

The get_entry endpoint takes a slug (e.g., contract, habeas_corpus) and returns the complete definition text, a legal_areas array classifying the entry by practice area, and a see_also array of related term names. The get_category_entries endpoint accepts a category slug (e.g., contracts, criminal_law_and_procedure, constitutional_law) and returns paginated results with term, slug, url, and a short snippet per entry. Pagination is 0-indexed and the response includes total_pages and count fields.

Data shape and behavior notes

Slugs use underscores in place of spaces — the API normalizes spaces to underscores automatically. The legal_areas field on get_entry responses directly mirrors the category taxonomy used by get_category_entries, so you can chain the two endpoints: retrieve an entry's categories, then fetch other entries in those same categories. The list_entries endpoint does not paginate server-side; use the limit parameter client-side to cap results.

Reliability & maintenanceVerified

The Cornell API is a managed, monitored endpoint for law.cornell.edu — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when law.cornell.edu changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.

This isn't an official law.cornell.edu API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.

Last verified
6d ago
Latest check
4/4 endpoints passing
Maintenance
Monitored & self-healing
Will this API break when the source site changes?+
It's built not to. Every endpoint is health-checked on a schedule with automated test probes. When the source site changes and a check fails, the API is automatically queued for repair and re-verified — that's the self-healing layer. Each API page shows when its endpoints were last verified. And because marketplace APIs are shared, any fix reaches everyone using it.
Is this an official API from the source site?+
No — Parse APIs are independent, managed REST wrappers over publicly available data. That is the point: where a site has no official API (or only a limited one), Parse gives you a maintained, monitored endpoint for that data and keeps it working as the site changes — so you get a stable contract over a source that never promised one.
Can I fix or extend this API myself if I need a new endpoint or field?+
Yes — and you don't have to wait on us. This API was generated by the Parse agent, which stays attached. Describe the change in plain English ("add an endpoint that returns reviews", "fix the price field") in the revise box on the API page or via the revise_api MCP tool, and the agent rebuilds it against the live site in minutes. Contributing the change back to the public API is free.
What happens if I call an endpoint that has an issue?+
Errors are machine-readable: a bad call returns a clean status with the list of available endpoints and a repair hint, so an agent (or you) can recover or trigger a fix instead of failing silently. Confirmed failures feed the automatic repair queue.
Common use cases
  • Build a legal glossary widget that resolves term slugs to full definitions using get_entry
  • Populate a practice-area content hub by pulling all entries under constitutional_law or criminal_law_and_procedure via get_category_entries
  • Auto-link legal terms in contract documents by matching keywords against the Wex index with search_entries
  • Generate a structured legal term graph by following see_also cross-references returned by get_entry
  • Build an offline legal reference dataset by iterating all letters with list_entries and fetching each slug with get_entry
  • Tag or classify legal documents by matching terms against the legal_areas taxonomy returned per entry
Pricing & limitsSee full pricing →
TierPriceCredits/monthRate limit
Free$0/mo1005 req/min
Hobby$30/mo1,00020 req/min
Developer$100/mo5,000100 req/min

One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.

Frequently asked questions
Does Cornell Law offer an official developer API for Wex?+
LII does not publish a documented REST API for Wex. Cornell Law does offer some services via law.cornell.edu, but there is no official public API specifically for Wex encyclopedia content.
What does `get_category_entries` return, and how do I paginate through it?+
It returns an array of entries, each with term, slug, url, and snippet (a short excerpt). The response also includes count, total_pages, page, category, and category_slug. Pagination is 0-indexed — set page=0 for the first page, page=1 for the second, and so on. Setting limit=0 returns all entries on a given page without a cap.
Does `search_entries` search the full definition text, or only term names?+
It performs a substring match against term names only, not against definition bodies. If you need to search within definition text, the get_entry endpoint returns the full definition field, but there is no full-text search endpoint currently. You can fork this API on Parse and revise it to add a definition-body search endpoint.
Does the API expose citation data, case references, or external links within definitions?+
Not currently. The definition field returns plain text content of the entry, and see_also returns related Wex term names. Case citations, statute references, or hyperlinks embedded in definitions are not separately structured. You can fork this API on Parse and revise it to add structured citation extraction from the definition text.
Are all letters of the alphabet available in `list_entries`?+
The letter parameter supports a–z and a handful of numeric buckets (1, 3, 4, 7, 9) for entries that begin with numbers. Not every letter has the same entry count. Passing letter=all fetches entries across every available letter sequentially.
Page content last updated . Spec covers 4 endpoints from law.cornell.edu.
Related APIs in Government PublicSee all →
nolo.com API
Access legal articles, state-specific law guides, dictionary definitions, and DIY legal products from Nolo.com. Search across the full Nolo library, browse trending and recent content, and look up legal topics by keyword or category.
examplecourt.gov API
Search and retrieve court judgments, case details, and legal metadata from a national court reporting portal, with support for advanced filtering by court and case category. Access complete case information including full text and browse paginated results to find relevant legal precedents.
lawyers.com API
Search and discover lawyers and law firms with detailed profiles, client reviews, and practice area information. Find legal articles and featured firms by specialty to help you locate the right legal representation for your needs.
justia.com API
Access Justia's legal database: search the lawyer directory by practice area and location, retrieve attorney profiles, browse state statutes and case law, explore legal guides, and look up law schools — all in one API.
Wikipedia API
Search Wikipedia and instantly access full article content on any topic, then explore related articles by browsing through Wikipedia categories. Retrieve article metadata, extracts, and navigate curated category trees to discover connected subjects.
eur-lex.europa.eu API
Access and explore the complete collection of European Union laws, regulations, and Official Journal publications through a comprehensive database that lets you search documents, retrieve full texts, summaries, and metadata, and track legislative procedures and national implementations. Find exactly what you need with detailed search capabilities and get detailed information about how EU laws are transposed into national legislation.
planetmath.org API
Search and browse mathematical definitions, theorems, and concepts across PlanetMath's encyclopedia by subject classification or keyword, then explore how topics relate to and depend on each other. Access detailed entry information organized through the Mathematical Subject Classification hierarchy to understand foundational concepts and build your mathematical knowledge.
indiankanoon.org API
indiankanoon.org API