ParseForge Scrapers

UK BAILII Judgments Scraper

parseforge/uk-bailii-judgments-scraper

News & mediaOther

Scrapes UK court judgments from the British and Irish Legal Information Institute (BAILII) by keyword or case name search. Returns each judgment as a flat row with full text, neutral citation, court name, and judgment date.

Run this scraper See the API call
Total users
3
Monthly active
1
Total runs
112
Bookmarked
0
Rating
Not rated yet
Last modified
9 days ago

Overview

ParseForge

UK BAILII Judgments Scraper

Scrape UK court judgments from BAILII by keyword or case name, up to a million per run. Every judgment returns with its full text, neutral citation, court, and date. No API key or registration. Export to CSV, JSON, Excel, or XML.

BAILII publishes British and Irish case law for free, but reading judgments one by one takes hours. This Actor searches the public BAILII database by keyword or case name and downloads every matching judgment in one batch. You get the full text, citation, court, and date in a fixed schema, ready for analysis.

Who uses it What they scrape BAILII for
Legal researchers Gather all judgments that mention a specific point of law for a literature review.
Barristers and solicitors Find precedent cases by keyword to support an argument or opinion.
Academic researchers Build a corpus of judgments for empirical legal studies or NLP training.
Law librarians Populate an internal knowledge base with recent decisions on a topic.

What it does

This Actor searches UK court judgments on BAILII by keyword or case name and returns each one as a flat row with full text and metadata.

  • ๐Ÿ” Keyword search: enter any legal term, statute name, or phrase and collect every judgment BAILII returns.
  • ๐Ÿ“‹ Case name search: search by party names or a known case title to pull the full decision.
  • ๐Ÿ“„ Full text output: each row contains the complete judgment body, not a snippet or summary.
  • ๐Ÿ›๏ธ Court metadata: neutral citation, court name, and judgment date are parsed into separate columns.

Results export to CSV, JSON, Excel, or XML, or straight from the API.

What you can do with BAILII data

โš–๏ธ Build a precedent bank.

A barrister searches for "duty of care negligence" and downloads 200 judgments to identify the leading cases and how lower courts have applied them.

๐Ÿ“Š Analyse judicial language.

A computational linguist scrapes 5,000 judgments containing "reasonable person" to study how the standard is articulated across different courts.

๐Ÿ“š Feed a legal research tool.

A legal-tech startup runs weekly searches on emerging topics and pipes the full-text judgments into their summarisation pipeline.

๐Ÿ›๏ธ Monitor a court's output.

A law librarian searches for all Supreme Court decisions from the past month and archives them in the firm's document management system.

Why choose this scraper

What you get
Full judgment text The complete body of each decision, not a truncated preview
Neutral citation Standard citation format parsed into its own field for easy reference
Court and date Which court heard the case and when it was decided
Flat row output One row per judgment, ready for CSV, JSON, Excel, or XML export

How it compares

No other Store actor targets BAILII the same way, so the honest comparison is with the alternatives teams actually weigh.

UK BAILII Judgments Scraper Build it in-house By hand
Setup Run it now, zero config Days of engineering None, but hours per pull
When BAILII changes Maintained for you You fix it You re-learn the page
Proxies, retries, anti-bot Built in Your problem Browser only
Output Fixed JSON schema, CSV/Excel export Whatever you build Copy-paste
Cost Pay per result Engineering time Analyst hours

Configure the run

Drive the Actor from a keyword or case name search query, and set a maximum number of judgments to collect per run. The Input tab lists every parameter.

A first run with the defaults:

{
 "maxItems": 10
}

A larger pull:

{
 "maxItems": 200
}

Pricing

Pay-per-result: $0.021 per result collected. You pay only for the results written to your dataset.

Results collected Approximate cost
100 results $2.10
1,000 results $21.00
10,000 results $210.00

New Apify accounts start with $5 in free credit.

Free users

Free-plan runs return up to 10 results as a preview. Upgrade your Apify plan to collect up to 1,000,000 results per run.

Run it

  1. Create a free Apify account with $5 in credit.
  2. Open the UK BAILII Judgments Scraper.
  3. Set your inputs and any filters, then click Start.
  4. Export the results as CSV, Excel, JSON, or XML from the Dataset tab.

Run it programmatically through the Apify API (run-sync-get-dataset-items) or the ApifyClient for JavaScript and Python.

Use with AI agents (MCP)

Give an AI agent live access to BAILII through the Model Context Protocol. Add the Actor to Claude, Cursor, or any MCP client:

claude mcp add --transport http apify "https://mcp.apify.com?tools=parseforge/uk-bailii-judgments-scraper"

Then prompt it in plain language to run the scraper and read back the results.

Troubleshooting

Why am I getting no results?

BAILII's search is literal. Try a broader keyword, check your spelling, or remove quotation marks. If the term is very specific, BAILII may genuinely have no matching judgments.

The run stopped before reaching my maxItems limit.

The Actor stops when BAILII has no more results for your query. Your search term may match fewer judgments than the limit you set. Try a broader query.

Some judgment texts are truncated or missing.

BAILII occasionally hosts judgments as PDFs rather than HTML. The Actor scrapes the HTML version. If only a PDF is available, the text field may be empty. Check the source URL in the output.

The run is taking a long time.

Large searches with thousands of results take time because the Actor respects BAILII's server by pacing requests. Reduce maxItems or narrow your search query for faster runs.

I got an error or timeout.

BAILII may be temporarily slow or unavailable. The Actor retries automatically. If the problem persists, wait a few minutes and try again, or reduce maxItems to shorten the run.

FAQ

Question Answer
Does this scrape the full judgment text or a summary? It scrapes the full body text of each judgment as published on BAILII, not a headnote or summary. The text appears in the output dataset exactly as it is on the page.
Which courts does this cover? It covers all courts and tribunals available on BAILII, including the UK Supreme Court, Court of Appeal, High Court, and various specialist tribunals. The court name is included in the output.
Do I need a BAILII account or API key? No. BAILII is a free public database. This Actor reads the publicly available pages directly, so no registration, login, or API key is required.
Can I search by neutral citation? Yes. Enter the neutral citation, such as [2023] UKSC 5, into the search query field and the Actor will find that specific judgment.
How many judgments can I scrape in one run? You set the maximum in the input. The Actor can collect up to 1,000,000 judgments per run, limited only by what BAILII returns for your search query.
What format is the output? The default dataset is a flat table with one judgment per row. You can export it as CSV, JSON, Excel, or XML from the Apify platform.
Does it handle multi-page search results? Yes. The Actor paginates through all search result pages automatically until it reaches your maxItems limit or there are no more results.
Can I filter by date or court? BAILII's search does not expose date or court filters in the URL. The Actor collects everything matching your keyword, and you can filter the output dataset by the date and court fields afterwards.
Is this legal to scrape? BAILII judgments are public legal documents published under open access. You should still review BAILII's terms of use and ensure your use complies with them.
Can I run this on a schedule? Yes. Use Apify's scheduler to run the Actor daily, weekly, or monthly and collect new judgments as they are published.

Related actors

Browse the full ParseForge collection for more scrapers.

๐Ÿ†˜ Need help? Email parseforge@protonmail.com with your run ID, your input, and what you expected.

โš ๏ธ Disclaimer. This Actor is unofficial and is not affiliated with, endorsed by, or sponsored by British and Irish Legal Information Institute. It collects only publicly available data. You are responsible for using the collected data in compliance with the source's terms of service and applicable data-protection laws, including GDPR, CCPA, and PIPL. Do not use it to collect personal data unlawfully.

Input

FieldTypeWhat it doesDefault
maxItems integer How many judgments to collect per run. 10
searchQuery string Keywords to search judgments. contract

Pricing

from $19.00 per 1,000 results

Charged forWhat it isPrice each
result Single result in the default dataset. $0.019 to $0.021

Tiered: the lower figure is the price on a higher Apify plan. Billing and the free credit live on Apify.

API

One POST returns the dataset directly. Same shape for every scraper in the library, so swapping the slug is the only change.

POST ยท run and get results
curl -X POST "https://api.apify.com/v2/acts/parseforge~uk-bailii-judgments-scraper/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "helloWorld": 123
  }'

Examples

Input that runs as-is.

input.json
{
  "helloWorld": 123
}

Reviews

No reviews yet. Be the first.

Issues

We build and maintain this scraper, so a problem with it comes to us. Report it on the Apify listing and the thread stays attached to the scraper where the next person can find it: open an issue.

Broken and urgent, or you would rather not post in public? Write to parseforge@protonmail.com and it reaches the people who wrote it.

Related scrapers

Run UK BAILII Judgments Scraper on Apify All scrapers