Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Query 360+ years of US case law via the Harvard Caselaw Access Project
.claude/skills/brycewang-stanford-caselaw-access-api/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 19% | 0% |
| case-05 | ✗→✓ | ▲ Improved | 26% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 46% | 0% |
| case-10 | ✗→✓ | ▲ Improved | -33% | 0% |
| case-18 | ✗→✓ | ▲ Improved | 86% | 0% |
The Caselaw Access Project (CAP) by Harvard Law School provides free access to 6.9 million US court opinions spanning 360+ years. The REST API enables searching, filtering, and downloading full-text case opinions from all federal and state courts. No authentication required for metadata; API key (free registration) required for full text of post-1923 cases.
https://api.case.law/v1/bash# Search cases by keyword curl "https://api.case.law/v1/cases/?search=free+speech&decision_date_min=2020-01-01" # Get a specific case by ID curl "https://api.case.law/v1/cases/12345678/" # Filter by jurisdiction and court curl "https://api.case.law/v1/cases/?jurisdiction=us&court=us-sup-ct&search=miranda+rights" # Filter by date range curl "https://api.case.law/v1/cases/?decision_date_min=2015-01-01&decision_date_max=2025-12-31" # Get full text (requires API key for post-1923) curl -H "Authorization: Token YOUR_API_KEY" \ "https://api.case.law/v1/cases/12345678/?full_case=true"
| Parameter | Description | Example | |-----------|-------------|---------| | search | Full-text search | search=due+process | | jurisdiction | Filter by jurisdiction slug | jurisdiction=cal (California) | | court | Filter by court slug | court=us-sup-ct | | decision_date_min | Earliest date | decision_date_min=2020-01-01 | | decision_date_max | Latest date | decision_date_max=2025-12-31 | | cite | Search by citation | cite=410+U.S.+113 | | name_abbreviation | Case name | name_abbreviation=Roe+v.+Wade | | ordering | Sort results | ordering=-decision_date | | page_size | Results per page (max 100) | page_size=50 | | full_case | Include full text | full_case=true |
bash# List all courts curl "https://api.case.law/v1/courts/" # List all jurisdictions curl "https://api.case.law/v1/jurisdictions/" # List all reporters (case report series) curl "https://api.case.law/v1/reporters/"
pythonimport requests BASE_URL = "https://api.case.law/v1" def search_cases(query: str, jurisdiction: str = None, court: str = None, max_results: int = 20) -> list: """Search US case law.""" params = {"search": query, "page_size": min(max_results, 100)} if jurisdiction: params["jurisdiction"] = jurisdiction if court: params["court"] = court resp = requests.get(f"{BASE_URL}/cases/", params=params) resp.raise_for_status() data = resp.json() cases = [] for case in data.get("results", []): cases.append({ "id": case["id"], "name": case["name_abbreviation"], "citation": case["citations"][0]["cite"] if case.get("citations") else None, "court": case["court"]["name"], "date": case["decision_date"], "url": case["frontend_url"] }) return cases # Search Supreme Court cases results = search_cases("fourth amendment", court="us-sup-ct") for case in results: print(f"{case['citation']}: {case['name']} ({case['date']})")
For large-scale research, download bulk datasets instead of querying the API:
bash# Bulk data available at: # https://case.law/bulk/download/ # Formats: JSON (full case data) or text-only # Organized by jurisdiction and reporter
| Slug | Jurisdiction | Cases | |------|-------------|-------| | us | Federal (all) | ~1.5M | | us-sup-ct | US Supreme Court | ~65K | | cal | California | ~500K | | ny | New York | ~600K | | tex | Texas | ~300K | | ill | Illinois | ~250K |
1. Register at https://case.law/user/register/
2. Get API token from your account page
3. Include in requests: Authorization: Token YOUR_TOKENFree accounts get full text for pre-1923 cases. Post-1923 full text requires an API token (still free).
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 11,744 | 21,633 | +84% | 1 | 1 | 0% | 2,005 | 2,386 | +19% | 0 | 0 | — |
case-02 | pass→pass | 6,967 | 2,585 | -63% | 1 | 1 | 0% | 1,277 | 1,797 | +41% | 0 | 0 | — |
case-03 | pass→pass | 7,500 | 2,475 | -67% | 1 | 1 | 0% | 1,330 | 1,775 | +33% | 0 | 0 | — |
case-04 | pass→pass | 8,087 | 3,908 | -52% | 1 | 1 | 0% | 1,427 | 2,029 | +42% | 0 | 0 | — |
case-05 | fail→pass | 9,698 | 3,378 | -65% | 1 | 1 | 0% | 1,574 | 1,978 | +26% | 0 | 0 | — |
case-06 | pass→pass | 6,127 | 2,739 | -55% | 1 | 1 | 0% | 958 | 1,823 | +90% | 0 | 0 | — |
case-07 | pass→pass | 8,392 | 3,821 | -54% | 1 | 1 | 0% | 1,292 | 2,012 | +56% | 0 | 0 | — |
case-08 | pass→pass | 3,986 | 2,668 | -33% | 1 | 1 | 0% | 676 | 1,764 | +161% | 0 | 0 | — |
case-09 | fail→pass | 9,496 | 4,422 | -53% | 1 | 1 | 0% | 1,513 | 2,205 | +46% | 0 | 0 | — |
case-10 | fail→pass | 13,927 | 2,028 | -85% | 1 | 1 | 0% | 2,602 | 1,747 | -33% | 0 | 0 | — |
case-20 | pass→pass | 14,806 | 15,020 | +1% | 1 | 1 | 0% | 2,600 | 3,994 | +54% | 0 | 0 | — |
case-11 | pass→pass | 9,817 | 4,756 | -52% | 1 | 1 | 0% | 1,595 | 2,175 | +36% | 0 | 0 | — |
case-12 | pass→pass | 3,772 | 3,369 | -11% | 1 | 1 | 0% | 653 | 1,908 | +192% | 0 | 0 | — |
case-13 | pass→pass | 8,349 | 4,441 | -47% | 1 | 1 | 0% | 1,303 | 2,206 | +69% | 0 | 0 | — |
case-14 | pass→pass | 4,259 | 3,129 | -27% | 1 | 1 | 0% | 798 | 1,849 | +132% | 0 | 0 | — |
case-15 | pass→pass | 4,618 | 1,707 | -63% | 1 | 1 | 0% | 802 | 1,628 | +103% | 0 | 0 | — |
case-16 | pass→pass | 3,541 | 2,244 | -37% | 1 | 1 | 0% | 543 | 1,714 | +216% | 0 | 0 | — |
case-17 | pass→pass | 7,507 | 2,969 | -60% | 1 | 1 | 0% | 1,272 | 1,799 | +41% | 0 | 0 | — |
case-18 | fail→pass | 13,868 | 16,696 | +20% | 1 | 1 | 0% | 2,110 | 3,915 | +86% | 0 | 0 | — |
case-19 | pass→pass | 12,648 | 4,664 | -63% | 1 | 1 | 0% | 1,891 | 2,154 | +14% | 0 | 0 | — |
case-21 | pass→pass | 19,447 | 19,083 | -2% | 1 | 1 | 0% | 3,711 | 4,885 | +32% | 0 | 0 | — |
case-22 | pass→pass | 18,622 | 18,811 | +1% | 1 | 1 | 0% | 3,181 | 4,603 | +45% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +23 percentage points is the difference between those two pass rates over the 22 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.