bailii.org 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.
curl -X GET 'https://api.parse.bot/scraper/6cc717d3-f3c8-4638-9679-54b268171b75/search_cases?page=1&phrase=negligence&per_page=5&jurisdiction=ew' \ -H 'X-API-Key: $PARSE_API_KEY'
Search BAILII case law databases with various filters. Returns paginated results with case titles, citations, courts, dates, and relevance scores.
| Param | Type | Description |
|---|---|---|
| page | integer | Page number (1-based) |
| sort | string | Sort order. Accepted values: relevance, date, date_oldest, title, jurisdiction |
| query | string | Direct search query string (advanced boolean syntax). Use this OR phrase/all_words/any_words. |
| phrase | string | Exact phrase to search for (e.g., 'negligence') |
| date_to | string | Filter results up to this date (DD/MM/YYYY format) |
| per_page | integer | Results per page |
| all_words | string | All of these words must appear (space-separated) |
| any_words | string | Any of these words may appear (space-separated) |
| date_from | string | Filter results from this date (DD/MM/YYYY format) |
| jurisdiction | string | 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'. |
{
"type": "object",
"fields": {
"page": "integer current page number",
"total": "integer total number of matching documents",
"results": "array of objects with keys: 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": 82,
"results": [
{
"date": "20 April 2016",
"court": "High Court of Ireland Decisions",
"title": "Persona Digital Telephony Ltd & anor -v- The Minister for Public Enterprise & ors [2016] IEHC 187 (20 April 2016)",
"case_url": "https://www.bailii.org/ie/cases/IEHC/2016/H187.html",
"citation": "[2016] IEHC 187",
"case_path": "ie/cases/IEHC/2016/H187.html",
"file_size": "103 KB",
"relevance_pct": 17,
"highlighted_url": "https://www.bailii.org/cgi-bin/format.cgi?doc=/ie/cases/IEHC/2016/H187.html&query=(\"champerty\")"
}
],
"per_page": 5,
"total_pages": 17
},
"status": "success"
}
}About the bailii.org 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.
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.
- Retrieving the full judgment text of Irish High Court decisions by querying
get_case_detailwith acase_path - Building a case law alert system by polling
search_cases_rsswith keyword filters and sorting bydate - Extracting citation and court metadata for a batch of cases returned by
search_casesfor citation network analysis - Filtering Supreme Court of Ireland judgments by jurisdiction code
ie_scviasearch_cases_rss - Checking the approval status (
Approved/Unapproved) of judgments for legal research quality filtering - Aggregating cases by judge using the
judgment_byfield returned fromget_case_detail - Searching for exact legal phrases like 'duty of care' across all jurisdictions using the
phraseparameter
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 250 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.
Does BAILII have an official developer API?+
What does `get_case_detail` return and how do I identify which case to fetch?+
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?+
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?+
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?+
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.