skills/43-wentorai-research-plugins/skills/domains/law/caselaw-access-api/SKILL.md
Query 360+ years of US case law via the Harvard Caselaw Access Project
npx skillsauth add brycewang-stanford/Awesome-Agent-Skills-for-Empirical-Research caselaw-access-apiInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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/
# 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 |
# 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/"
import 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:
# 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_TOKEN
Free accounts get full text for pre-1923 cases. Post-1923 full text requires an API token (still free).
development
Conduct rigorous thematic analysis (TA) of qualitative data following Braun and Clarke's (2006) six-phase framework. Use whenever the user mentions 'thematic analysis', 'TA', 'Braun and Clarke', 'qualitative coding', 'identifying themes', or asks for help analysing interviews, focus groups, open-ended survey responses, or transcripts to identify patterns. Also trigger for questions about inductive vs theoretical coding, semantic vs latent themes, essentialist vs constructionist epistemology, building a thematic map, or writing up a qualitative findings section. Covers all six phases, the four upfront analytic decisions, the 15-point quality checklist, and the five common pitfalls. Produces a Word document write-up and an annotated thematic map. Does NOT cover IPA, grounded theory, discourse analysis, conversation analysis, or narrative analysis — use a different method for those.
development
Guide users through writing a systematic literature review (SLR) following the PRISMA 2020 framework. Use this skill whenever the user mentions 'systematic review', 'systematic literature review', 'SLR', 'PRISMA', 'PRISMA 2020', 'PRISMA flow diagram', 'PRISMA checklist', or asks for help writing, structuring, or auditing a literature review that follows reporting guidelines. Also trigger when the user asks about inclusion/exclusion criteria for a review, search strategies for databases like Scopus/WoS/PubMed, study selection processes, risk of bias assessment, or narrative synthesis for a review paper. This skill covers the full PRISMA 2020 checklist (27 items), produces a Word document manuscript in strict journal article format, generates an annotated PRISMA flow diagram, and enforces APA 7th Edition referencing throughout. It does NOT cover meta-analysis or statistical pooling. By Chuah Kee Man.
testing
Performs placebo-in-time sensitivity analysis with hierarchical null model and optional Bayesian assurance. Use when checking model robustness, verifying lack of pre-intervention effects, or estimating study power.
data-ai
Fit, summarize, plot, and interpret a chosen CausalPy experiment. Use after the causal method has been selected, including when configuring PyMC/sklearn models and scale-aware custom priors.