Discover/BAILII API
live

BAILII APIbailii.org

Search and retrieve court judgments from BAILII across UK and Irish jurisdictions. Access full judgment text, citations, metadata, and case details via 3 endpoints.

Endpoint health
verified 5d ago
search_cases
get_case_detail
search_cases_rss
3/3 passing latest checkself-healing
Endpoints
3
Updated
22d ago

What is the BAILII API?

The BAILII API provides 3 endpoints to search and retrieve court judgments from the British and Irish Legal Information Institute database, covering jurisdictions across Ireland, England & Wales, Scotland, and Northern Ireland. Use search_cases to run paginated searches with boolean query syntax, search_cases_rss to pull a complete unpaginated result set, or get_case_detail to fetch structured metadata and the full judgment text for any individual case.

Try it
Page number (1-based)
Sort order for results.
Direct search query string (advanced boolean syntax). Use this OR phrase/all_words/any_words.
Exact phrase to search for (e.g., 'negligence')
Filter results up to this date (DD/MM/YYYY format)
Results per page
All of these words must appear (space-separated)
Any of these words may appear (space-separated)
Filter results from this date (DD/MM/YYYY format)
Jurisdiction filter. Accepted values: ie (all Ireland), ie_sc (Supreme Court), ie_ca (Court of Appeal), ie_hc (High Court), uk (all UK), ew (England & Wales), nie (Northern Ireland), scot (Scotland). Or a direct mask_path like 'ie/cases/IESC'.
api.parse.bot/scraper/6cc717d3-f3c8-4638-9679-54b268171b75/<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/6cc717d3-f3c8-4638-9679-54b268171b75/search_cases?page=1&sort=relevance&query=negligence&phrase=contract&date_to=31%2F12%2F2025&per_page=5&all_words=damages+breach&any_words=tort+negligence&date_from=01%2F01%2F2020&jurisdiction=ie' \
  -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 bailii-org-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.

"""Walkthrough: BAILII Legal Database API — search cases, drill into details."""
from parse_apis.bailii_legal_database_api import Bailii, Sort, Jurisdiction, CaseNotFound

client = Bailii()

# Search for negligence cases in Irish courts, sorted by date
for case in client.cases.search(phrase="negligence", jurisdiction=Jurisdiction.IE, sort=Sort.DATE, limit=5):
    print(case.title, case.citation, case.court)

# Drill into a single case's full judgment via .first() + sub-resource
case = client.cases.search(query="contract", jurisdiction=Jurisdiction.IE_SC, limit=1).first()
if case:
    detail = case.detail.get()
    print(detail.title, detail.neutral_citation, detail.judgment_by)

# Use the RSS endpoint for a complete (non-paginated) list of matching cases
for rss_case in client.cases.search_rss(phrase="damages", jurisdiction=Jurisdiction.EW, sort=Sort.RELEVANCE, limit=3):
    print(rss_case.title, rss_case.date, rss_case.case_path)

# Typed error handling: catch CaseNotFound for a missing case
try:
    missing = client.case("ie/cases/IESC/9999/DOESNOTEXIST.html").detail.get()
    print(missing.title)
except CaseNotFound as exc:
    print(f"Case not found: {exc.case_path}")

print("exercised: cases.search / case.detail.get / cases.search_rss / CaseNotFound error")
All endpoints · 3 totalmissing one? ·

Search BAILII case law databases with various filters. Returns paginated results with case titles, citations, courts, dates, and relevance scores. Requires at least one search parameter (query, phrase, all_words, or any_words). Pagination via page parameter; default 10 results per page. Sort by relevance, date, title, or jurisdiction.

Input
ParamTypeDescription
pageintegerPage number (1-based)
sortstringSort order for results.
querystringDirect search query string (advanced boolean syntax). Use this OR phrase/all_words/any_words.
phrasestringExact phrase to search for (e.g., 'negligence')
date_tostringFilter results up to this date (DD/MM/YYYY format)
per_pageintegerResults per page
all_wordsstringAll of these words must appear (space-separated)
any_wordsstringAny of these words may appear (space-separated)
date_fromstringFilter results from this date (DD/MM/YYYY format)
jurisdictionstringJurisdiction filter. Accepted values: ie (all Ireland), ie_sc (Supreme Court), ie_ca (Court of Appeal), ie_hc (High Court), uk (all UK), ew (England & Wales), nie (Northern Ireland), scot (Scotland). Or a direct mask_path like 'ie/cases/IESC'.
Response
{
  "type": "object",
  "fields": {
    "page": "integer current page number",
    "total": "integer total number of matching documents",
    "results": "array of case result objects with title, citation, court, date, relevance_pct, file_size, case_url, case_path, highlighted_url",
    "per_page": "integer results per page",
    "total_pages": "integer total number of pages"
  },
  "sample": {
    "data": {
      "page": 1,
      "total": 4066,
      "results": [
        {
          "date": "30 July 2015",
          "court": "High Court of Ireland Decisions",
          "title": "Nugent -v- Fogarty [2015] IEHC 523 (30 July 2015)",
          "case_url": "https://www.bailii.org/ie/cases/IEHC/2015/H523.html",
          "citation": "[2015] IEHC 523",
          "case_path": "ie/cases/IEHC/2015/H523.html",
          "file_size": "35 KB",
          "relevance_pct": 4,
          "highlighted_url": "https://www.bailii.org/cgi-bin/format.cgi?doc=/ie/cases/IEHC/2015/H523.html&query=(\"negligence\")"
        }
      ],
      "per_page": 3,
      "total_pages": 1356
    },
    "status": "success"
  }
}

About the BAILII API

Search Endpoints

The search_cases endpoint accepts flexible query inputs: you can supply a raw boolean query string via the query parameter, or use the phrase, all_words, and any_words parameters for structured keyword matching. Results are paginated and each item in the results array carries a title, citation, court, date, relevance_pct, file_size, and both a case_url and case_path for downstream lookups. You can sort by relevance, date, date_oldest, title, or jurisdiction, and narrow results using date_to for a cutoff date.

RSS-Style Full Result Retrieval

search_cases_rss accepts the same query parameters as search_cases and additionally supports a jurisdiction filter (e.g., ie_hc for the Irish High Court, ie_sc for the Supreme Court). Rather than paginating, it returns all matching results in a single response, each with title, citation, court, date, case_url, and case_path. This is suited for bulk collection or complete coverage of a search query without managing pagination state.

Case Detail

The get_case_detail endpoint accepts either a case_url (full URL) or a case_path (relative path obtained from a prior search). It returns structured fields including title, court, date_of_delivery, judgment_by, status (Approved/Unapproved), result, and judgment_text — the complete text of the judgment. An extra_metadata object captures additional fields that vary by case and court. The status and result fields may be null depending on how the source document is structured.

Coverage and Limitations

BAILII's database spans courts across the UK and Republic of Ireland, but not all historical judgments are digitised or available in full text. The judgment_text field may be null for some older cases. Jurisdiction filtering is only available on the search_cases_rss endpoint, not on search_cases. Date filtering via date_to accepts DD/MM/YYYY format; there is no date_from parameter in the current spec.

Reliability & maintenanceVerified

The BAILII API is a managed, monitored endpoint for bailii.org — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when bailii.org 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 bailii.org 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
5d ago
Latest check
3/3 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
  • Retrieving the full judgment text of Irish High Court decisions by querying get_case_detail with a case_path
  • Building a case law alert system by polling search_cases_rss with keyword filters and sorting by date
  • Extracting citation and court metadata for a batch of cases returned by search_cases for citation network analysis
  • Filtering Supreme Court of Ireland judgments by jurisdiction code ie_sc via search_cases_rss
  • Checking the approval status (Approved/Unapproved) of judgments for legal research quality filtering
  • Aggregating cases by judge using the judgment_by field returned from get_case_detail
  • Searching for exact legal phrases like 'duty of care' across all jurisdictions using the phrase parameter
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 BAILII have an official developer API?+
BAILII does not publish a documented public developer API. The organisation provides open access to its legal database through its website at bailii.org, but there is no official REST API with keys, versioning, or developer documentation.
What does `get_case_detail` return and how do I identify which case to fetch?+
It returns title, court, date_of_delivery, judgment_by, status, result, judgment_text, and an extra_metadata object for additional court-specific fields. To identify a case, pass either the case_url (e.g., https://www.bailii.org/ie/cases/IEHC/2016/H187.html) or the case_path obtained from a prior search_cases or search_cases_rss call.
Can I filter `search_cases` results by jurisdiction?+
The search_cases endpoint does not currently support a jurisdiction filter parameter. Jurisdiction filtering (e.g., ie_sc, ie_hc, ie_ca) is available on search_cases_rss only. You can fork the API on Parse and revise it to add jurisdiction filtering to the paginated search endpoint.
Is there a `date_from` filter to search cases from a specific start date?+
Not currently. The search_cases endpoint supports a date_to parameter for an upper date cutoff in DD/MM/YYYY format, but no date_from for a lower bound. You can fork the API on Parse and revise it to add a start-date filter.
Are there cases where `judgment_text` will be null?+
Yes. The judgment_text field in get_case_detail can be null when the source document does not include extractable full text — this is more common with older or scanned judgments in the BAILII database. The structured metadata fields (title, court, date_of_delivery, status) are more consistently populated.
Page content last updated . Spec covers 3 endpoints from bailii.org.
Related APIs in Government PublicSee all →
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.
austlii.edu.au API
Search and access Australian legal cases from AustLII's comprehensive database, browsing by year and downloading decisions in multiple formats including RTF, PDF, and print-friendly versions. Discover available case databases and retrieve specific court rulings with prioritized download options to suit your preferred format.
judgments.ecourts.gov.in API
Search for Indian court judgments and orders across multiple courts to access legal rulings, case decisions, and judicial orders. Find relevant court cases by searching through a comprehensive database of Indian judicial decisions.
canlii.org API
Access Canadian legal information from CanLII.org. Discover jurisdictions and databases, search case law and legislation across all provinces and territories, and retrieve full document text and metadata.
judyrecords.com API
Search and retrieve detailed court records including case information and statistics from a comprehensive legal database. Access specific case details and view aggregated court record stats to research legal proceedings and case outcomes.
ecourtsindia.com API
Search and retrieve detailed information about court cases across India's Supreme Court, High Courts, and District Courts from a database of over 239 million cases. Find case details, track legal proceedings, and access comprehensive court records to stay informed about judicial matters across the Indian court system.
livelaw.in API
Access Supreme Court and High Court judgments, legal news, articles, and digests from LiveLaw.in, with the ability to filter by year, category, and author. Stay updated on the latest legal developments, court decisions, and expert legal analysis across Indian courts.
scholar.google.com API
Search and retrieve case law from Google Scholar by keyword, with optional filtering by date range and court type. Fetch full case details including citations, court, and opinion text for any case returned by search.
BAILII Case Law API – Search UK & Irish Courts · Parse