# UK Case Law Scraper (No API Key) + Citation Lookup (`nomad-agent/uk-case-law-scraper`) Actor

$0.2/1K judgments | Search UK court and tribunal judgments from Find Case Law by keyword, court, party or judge. Get citation, court and PDF/XML links, or look up one neutral citation. No login or API key. Not affiliated with The National Archives.

- **URL**: https://apify.com/nomad-agent/uk-case-law-scraper.md
- **Developed by:** [Nomad.Devs](https://apify.com/nomad-agent) (community)
- **Categories:** AI, Automation, Developer tools
- **Stats:** 2 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.20 / 1,000 judgment results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## UK Case Law Scraper (No API Key) + Citation Lookup

$0.2/1K judgments | Search UK court and tribunal judgments from Find Case Law by keyword, court, party or judge. Get citation, court and PDF/XML links, or look up one neutral citation. No login or API key. Not affiliated with The National Archives.

### UK Case Law Judgments Search Scraper

Our scraper searches the Find Case Law service of The National Archives and lets you filter by keyword, court or tribunal, party name, judge, judgment date or exact neutral citation. Every row carries the citation, case title, court, judgment date and links to the judgment page, the official PDF and the XML. It is ideal for legal research alerts, litigation monitoring and feeding primary law into your own tools.

- Looking at other official-registry data? [PTAB Trials Scraper](https://apify.com/nomad-agent/ptab-trials-scraper) covers USPTO patent trials, [SPAC Redemptions Scraper](https://apify.com/nomad-agent/spac-redemptions-scraper) covers SEC EDGAR SPAC filings and [NHS ODS Providers Scraper](https://apify.com/nomad-agent/uk-nhs-ods-providers-scraper) covers the NHS registry.
- Browse all our scrapers: https://apify.com/nomad-agent

#### Key Benefits

- No login or API key: the Find Case Law public API is unauthenticated, so there is nothing to set up.
- Low pricing: **$0.20 per 1,000 judgments**.
- Exact citation lookup: set a neutral citation such as `[2024] UKSC 1` and get exactly that judgment. A mistyped citation falls back to at most 25 search hits, so it can never run up a large bill.
- Court filters across all 37 collections on Find Case Law, from the Supreme Court to individual tribunal chambers.
- Fresh data: every run reads the live API, so new judgments appear as The National Archives publishes them.

### How It Works

1. Provide your search:
   - (optional) Search query (e.g., `negligence`, `data protection`). Leave empty to browse the latest judgments matching the other filters.
   - (optional) Courts and tribunals (e.g., `uksc`, `ewca/civ`, `eat`). Empty means all courts.
   - (optional) Party name, Judge name, Judgment date window (e.g., `7d`) or a From / To date.
   - (optional) Citation (e.g., `[2024] UKSC 1`) to look up one judgment; this overrides every other filter.
2. (optional) Turn on Include full text to add parties, judges, the judgment text and cited legislation. This is slower and heavier.
3. Run the Actor and export the dataset.

More settings:

- `maxItems` - Maximum number of judgments to return. Default is `50`. `0` means no cap, which is risky on broad queries.
- `concurrency` - Parallel detail fetches when full text is on. Default is `4`.

**Licence note: Find Case Law judgments are Crown copyright under the Open Justice Licence. It requires attribution and does not cover computational analysis; that needs a free licence application to The National Archives.**

Dates are calendar days, so a window such as `24h` includes the whole cutoff day. Parties, judges, full text and legislation references only appear when Include full text is on.

#### Data You'll Receive

- Judgment: neutral citation, case title, court name, judgment date and slug.
- Links: judgment page, official PDF and Akoma Ntoso XML.
- Revision tracking: a content hash and an updated-at timestamp, so you can tell when a judgment changed.
- With Include full text: party names, judges where marked up, the plain-text judgment and the statutes it cites with legislation.gov.uk links.

#### Sample output data

Here is an example judgment from this Actor:

```json
{
  "source": "find-case-law",
  "title": "Nigel Bottomley v Information Commissioner",
  "citation": "[2026] UKFTT 1404 (GRC)",
  "court": "First-tier Tribunal (General Regulatory Chamber) – Information Rights",
  "date": "2026-10-13",
  "url": "https://caselaw.nationalarchives.gov.uk/ukftt/grc/2026/1404",
  "xmlUrl": "https://caselaw.nationalarchives.gov.uk/ukftt/grc/2026/1404/data.xml",
  "pdfUrl": "https://assets.caselaw.nationalarchives.gov.uk/d-6bff9b2a-e248-4c1b-a4d0-a3ef27cc6384/d-6bff9b2a-e248-4c1b-a4d0-a3ef27cc6384.pdf",
  "slug": "ukftt/grc/2026/1404",
  "fclId": "wbxy6dbh",
  "documentUri": "d-6bff9b2a-e248-4c1b-a4d0-a3ef27cc6384",
  "contentHash": "946d00ad28d29a74dea71f7a67f660869ba3d553bddb111af65e6b53f2e3b734",
  "updatedAt": "2026-10-13T14:04:26+00:00"
}
```

### UK Case Law API

Results are stored in a dataset that you can export as CSV, JSON or Excel, or read on demand through the Apify API. Schedule the same query and compare snapshots downstream to spot new judgments. You can also wire the Actor into Make, Zapier and n8n, or call it from AI agents through the Apify MCP server.

#### Support and Feedback

We improve these scrapers from your feedback. If something breaks or you need a filter:

- Open an issue on the Actor's [Issues tab](https://apify.com/nomad-agent/uk-case-law-scraper/issues)
- If this Actor saved you time, a short review on the Store helps other users find it.

### Run evidence

#### Start with one input and output

An Apify account is required. Use your Apify API token when calling the API; Console runs do not need that token pasted into the input. No user API-key field is required by this input schema.

Free-tier event rates checked 2026-10-04: `result` $0.0002; `actor-start` $0.00005.

**Cost:** Total = Actor event charges + platform usage if separately billed + any BYO-provider charges. See “Current costs” for your event rates, plan tiers and a calculation. A sample does not promise future billable volume.

Input and output below were read from the same successful run `ykHf5emltqPfbT2QL` (2026-10-04, immutable build `z9BXVIXO74PkPBDMs`). This is an observed example, not a guarantee that repeating it returns this row. It used the selected build at capture time.

**Input JSON**

```json
{
  "includeFullText": false,
  "maxItems": 50,
  "concurrency": 4
}
```

**Matching output excerpt**

Long strings and arrays are shortened for display; this is not a complete dataset fixture.

```json
{
  "source": "find-case-law",
  "title": "Sarah Douglas v Ronald Channon",
  "citation": "[2026] EWHC 2475 (KB)",
  "court": "High Court (King's Bench Division)",
  "date": "2026-10-02",
  "url": "https://caselaw.nationalarchives.gov.uk/ewhc/kb/2026/2475",
  "xmlUrl": "https://caselaw.nationalarchives.gov.uk/ewhc/kb/2026/2475/data.xml",
  "pdfUrl": "https://assets.caselaw.nationalarchives.gov.uk/d-31654798-dd10-4a9c-8170-97785f6ddb6b/d-31654798-dd10-4a9c-8170-97785f6ddb6b.pdf",
  "slug": "ewhc/kb/2026/2475",
  "fclId": "vp7np8np",
  "documentUri": "d-31654798-dd10-4a9c-8170-97785f6ddb6b",
  "contentHash": "5d15acf3ec5469f8ca83f390a71b7627a0b73c7a903eb6fba8c8e44396e0560b",
  "updatedAt": "2026-10-02T09:45:53+00:00"
}
```

> **Claude / Codex skill to describe and setup this actor: [SKILL.md](https://github.com/Exdenta/OinkAIJobSearch/blob/main/.agents/skills/public-apify-actors/SKILL.md)**

Search UK court judgments and tribunal decisions from The National Archives' **Find Case Law** service (caselaw.nationalarchives.gov.uk) through its public API. Filter by court, party, judge, date or exact neutral citation. Export structured records with optional full judgment text and legislation references. No login, no proxies, no HTML parsing.

Covers the UK Supreme Court, Privy Council, Court of Appeal, High Court, Family Court, Upper and First-tier Tribunals, Employment Appeal Tribunal and more — judgments from 2001 onwards (older for some courts), updated as courts publish.

##### Why this Actor

- **Structured filters.** Target a specific court or tribunal (Supreme Court, Court of Appeal, a named chamber), a named **party**, a named **judge**, a date range, or one judgment by **exact neutral citation**.
- **Citation lookup** with graceful fallback — set a neutral citation and get exactly that judgment (`citationExactMatch`).
- **Legislation references** parsed straight from the official judgment XML — statutes cited, with `legislation.gov.uk` links.
- **`contentHash`** to detect when a previously-seen judgment has been revised.

#### Input

Use `fromDate` and `toDate` for an absolute judgment date range, or `postedWithin` to compute a lower date bound from a relative duration. Find Case Law supplies judgment dates by calendar day: the UTC cutoff's whole calendar day is included, so hour durations do not give hour-level precision. A supplied nonempty `postedWithin` value takes precedence over both date bounds; omit it or leave it empty to preserve a saved absolute range. Citation lookup ignores all date filters.

| Field | Type | Default | Description |
|---|---|---|---|
| `query` | string | `"negligence"` | Free-text search across judgments. Leave empty to browse latest judgments matching the other filters. Ignored when `citation` is set. |
| `citation` | string | *(empty)* | Look up one judgment by its exact neutral citation, e.g. `"[2024] UKSC 1"`. When set, this takes over the search: `query`, `courts`, `party`, `judge` and `postedWithin` are all ignored. Returns the exact citation match(es); falls back to raw (unfiltered) search hits if nothing matches exactly. See [Citation lookup](#citation-lookup) below. |
| `courts` | array (multi-select) | *(empty = all)* | Court/tribunal codes to filter by — all 37 collections on Find Case Law, see [Court codes](#court-codes). Ignored when `citation` is set. |
| `party` | string | *(empty)* | Filter on a party's name (claimant, defendant, appellant, respondent...). Ignored when `citation` is set. |
| `judge` | string | *(empty)* | Filter on the judge's name. Ignored when `citation` is set. |
| `postedWithin` | string | *(omitted; form prefill `"any"`)* | Relative duration converted to an inclusive UTC calendar-date lower bound: `24h`, `3d`, `2w`, `6m`, or `any` to clear date filtering. The whole cutoff day is included, even for hour durations. Explicit values override both absolute bounds. Ignored when `citation` is set. |
| `fromDate` / `toDate` | string | *(empty)* | Inclusive lower / upper judgment date in `YYYY-MM-DD`. Preserved for saved configurations and API clients; ignored when `postedWithin` is nonempty or `citation` is set. |
| `includeFullText` | boolean | `false` | Fetch each judgment's XML and include parties, judges, the full judgment text and structured legislation references. Slower and heavier output. |
| `maxItems` | integer | `50` | Hard cap on judgments considered per run. `0` = no cap (use with care). |
| `concurrency` *(Advanced)* | integer | `4` | Parallel detail fetches when `includeFullText` is on. Keep low — this is a public government service. |

#### What UK case-law data does this scraper extract?

One flat JSON record per judgment:

| Field | Meaning |
|---|---|
| `citation` | Neutral citation, e.g. `[2024] UKSC 1` |
| `title` | Case name (parties as titled by the court) |
| `court` | Court / chamber name, e.g. `Court of Appeal (Civil Division)` |
| `date` | Judgment date (`YYYY-MM-DD`) |
| `url` | Judgment page on Find Case Law |
| `pdfUrl` | Official PDF |
| `xmlUrl` | Akoma Ntoso (LegalDocML) XML |
| `slug` | Court/year/number path, e.g. `uksc/2024/1` |
| `fclId` | Find Case Law document ID |
| `contentHash` | Content hash — detect judgment revisions |
| `parties` | Party names (with **Include full text**) |
| `judges` | Judge names where marked up (with **Include full text**) |
| `fullText` | Plain-text judgment body (with **Include full text**) |
| `legislationRefs` | Statutes cited in the judgment — array of `{text, uri, canonical}`, e.g. `{"text": "Data Protection Act 1998", "uri": "http://www.legislation.gov.uk/id/ukpga/1998/29", "canonical": "1998 c. 29"}` (with **Include full text**) |
| `citationExactMatch` | `true`/`false` — only present when **Citation** is set; see [Citation lookup](#citation-lookup) |

#### How to scrape UK judgments with this Actor

1. Enter a **search query** (`negligence`, `data protection`, a party name...) — or leave it empty and filter by court/date only. Or set **Citation** to look up one specific judgment (see below).
2. Optionally restrict by **courts** (`uksc`, `ewca/civ`, `ewhc/kb`, `eat`, ...), **party**, **judge**, **postedWithin**.
3. Turn on **Include full text** if you need parties, judges and the judgment body.
4. Schedule the Actor and compare snapshots downstream when polling the same query for new judgments.
5. Run and export JSON, CSV or Excel — or call it over the API:

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("nomad-agent/uk-case-law-scraper").call(build="latest", run_input={
    "query": "negligence",
    "courts": ["uksc", "ewca/civ"],
    "maxItems": 100,
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["citation"], "|", item["title"], item["url"])
```

```bash
curl -X POST \
  "https://api.apify.com/v2/acts/nomad-agent~uk-case-law-scraper/run-sync-get-dataset-items?token=<YOUR_APIFY_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"query": "negligence", "courts": ["uksc"], "maxItems": 50}'
```

#### Output example

```json
{
  "source": "find-case-law",
  "citation": "[2024] UKSC 1",
  "title": "Paul and another v Royal Wolverhampton NHS Trust",
  "court": "United Kingdom Supreme Court",
  "date": "2024-01-11",
  "url": "https://caselaw.nationalarchives.gov.uk/uksc/2024/1",
  "pdfUrl": "https://assets.caselaw.nationalarchives.gov.uk/uksc/2024/1/uksc_2024_1.pdf",
  "xmlUrl": "https://caselaw.nationalarchives.gov.uk/uksc/2024/1/data.xml",
  "slug": "uksc/2024/1",
  "fclId": "gxdrmpqf",
  "parties": ["Paul and another", "Royal Wolverhampton NHS Trust"],
  "judges": ["Lord Leggatt", "Lady Rose"],
  "legislationRefs": [
    {"text": "Fatal Accidents Act 1976", "uri": "http://www.legislation.gov.uk/id/ukpga/1976/30", "canonical": "1976 c. 30"}
  ],
  "fullText": "Hilary Term [2024] UKSC 1 On appeal from..."
}
```

`citationExactMatch` is added on top of this shape when **Citation** is set — see [Citation lookup](#citation-lookup).

#### Court codes

All **37** collections published on Find Case Law — every court and tribunal the service carries, with the years each one covers. The **Courts & tribunals** input is a multi-select of exactly these codes: pick as many as you need, or leave empty for all.

| Code | Court | Coverage |
|---|---|---|
| `uksc` | Supreme Court | 2009– |
| `ukpc` | Privy Council | 2009– |
| `ewca/civ` | Court of Appeal, Civil Division | 2001– |
| `ewca/crim` | Court of Appeal, Criminal Division | 2003– |
| `ewhc/admin` | High Court, Administrative Court | 2003– |
| `ewhc/admlty` | High Court, Admiralty Court | 2003– |
| `ewhc/ch` | High Court, Chancery Division | 2003– |
| `ewhc/comm` | High Court, Commercial Court | 2003– |
| `ewhc/fam` | High Court, Family Division | 2003– |
| `ewhc/ipec` | High Court, Intellectual Property Enterprise Court | 2013– |
| `ewhc/kb` | High Court, King's / Queen's Bench Division | 2003– |
| `ewhc/mercantile` | High Court, Mercantile Court | 2008–2014 |
| `ewhc/pat` | High Court, Patents Court | 2003– |
| `ewhc/scco` | High Court, Senior Courts Costs Office | 2003– |
| `ewhc/tcc` | High Court, Technology and Construction Court | 2003– |
| `ewcr` | Crown Court | 2020– |
| `ewcc` | County Court | 2019– |
| `ewfc` | Family Court | 2014– |
| `ewcop` | Court of Protection | 2009– |
| `eat` | Employment Appeal Tribunal | 2021– |
| `ukut/aac` | Upper Tribunal, Administrative Appeals Chamber | 2011– |
| `ukut/iac` | Upper Tribunal, Immigration and Asylum Chamber | 2007– |
| `ukut/lc` | Upper Tribunal, Lands Chamber | 2014– |
| `ukut/tcc` | Upper Tribunal, Tax and Chancery Chamber | 2016– |
| `ukftt/tc` | First-tier Tribunal, Tax Chamber | 2019– |
| `ukftt/grc` | First-tier Tribunal, General Regulatory Chamber | 2009– |
| `ukftt/hesc` | First-tier Tribunal, Care Standards | 1985– |
| `ftt/pc` | First-tier Tribunal, Land Registration Division | 2024– |
| `ftt/phl` | First-tier Tribunal, Primary Health Lists | 2025– |
| `ukiptrib` | Investigatory Powers Tribunal | 2023–2024 |
| `siac` | Special Immigration Appeals Commission | 2003– |
| `ftt/claims` | Claims Management Services Tribunal | 2010–2011 |
| `ukftt/credit` | Consumer Credit Appeals Tribunal | 2008–2013 |
| `ukftt/estate` | Estate Agents Tribunal | 2010 |
| `ukit` | Information Tribunal | 1990–2010 |
| `ukist` | Immigration Services Tribunal | 2001–2009 |
| `ftt/transport` | Transport Tribunal | 2000–2009 |

#### Citation lookup

Set **Citation** to a neutral citation (e.g. `[2024] UKSC 1`) to look up one specific judgment instead of running a broad search. When set:

- `query`, `courts`, `party`, `judge` and `postedWithin` are all ignored.
- The Actor searches Find Case Law for that citation text, then keeps only the result(s) whose citation matches **exactly** (whitespace/case-insensitive) — tagged `"citationExactMatch": true`.
- If nothing matches exactly (e.g. a slightly malformed citation), it falls back to returning the raw, unfiltered search hits for that text instead, tagged `"citationExactMatch": false`, so you still get something useful to inspect. The fallback is capped at 25 records, so a mistyped citation can never run up a large bill.

#### Integrations

Export results as JSON, CSV or Excel, or wire this Actor into [Make](https://make.com), [Zapier](https://zapier.com) or [n8n](https://n8n.io); call it programmatically with `run-sync-get-dataset-items`; or use it from AI agents via the [Apify MCP server](https://mcp.apify.com).

#### Pricing

Check the Actor's current Apify pricing panel for metadata and full-text rates. Your run's maximum total charge limits billed output.

#### Use cases

- Legal research: track new judgments by topic, court or judge
- Litigation intelligence: monitor cases naming a company or party
- Feed RAG / AI legal assistants with authoritative primary law
- Academic analysis of UK courts and tribunals
- Compliance and news alerting on precedent-setting decisions

#### FAQ

**Is it legal to scrape this data?**
Yes — Find Case Law is The National Archives' official open service and this Actor uses only its documented public API. Judgments are Crown copyright, re-usable under the [Open Justice Licence](https://caselaw.nationalarchives.gov.uk/open-justice-licence). Note: the licence requires attribution and does **not** cover programmatic *computational analysis* (e.g. bulk text/data mining) — that needs a (free) licence application to The National Archives. Retrieval, research, republication with attribution are fine; check the licence for your use case.

**Do I need an API key or login?**
No. The Find Case Law public API is unauthenticated.

**How far back does coverage go?**
Consistently from 2001–2003 onwards depending on court; the archive grows as The National Archives ingests older judgments.

**How fresh is the data?**
Every run hits the live API — new judgments appear as courts publish them, often same-day.

**Something broken or missing?**
Open an issue on the Actor's **Issues** tab — it is monitored and fixes ship fast.

#### Fast setup and source code

[Public repository](https://github.com/Exdenta/OinkAIJobSearch) · [Agent setup skill](https://github.com/Exdenta/OinkAIJobSearch/blob/main/.agents/skills/public-apify-actors/SKILL.md).

Use the Actor’s current input form for filters, or start with its documented API example. Select the `latest` build. Read the dataset together with the run summary: a successful status alone does not show that every source was reached.

Restrictive filters or repeat-delivery suppression can produce zero results.

##### Observed output example

Selected fields from a real source record inspected on 2026-10-03; consult the output schema for the full contract. Values change with the source.

```json
{
  "source": "find-case-law",
  "title": "Sarah Douglas v Ronald Channon",
  "citation": "[2026] EWHC 2475 (KB)",
  "court": "High Court (King's Bench Division)",
  "date": "2026-10-02",
  "url": "https://caselaw.nationalarchives.gov.uk/ewhc/kb/2026/2475",
  "xmlUrl": "https://caselaw.nationalarchives.gov.uk/ewhc/kb/2026/2475/data.xml",
  "pdfUrl": "https://assets.caselaw.nationalarchives.gov.uk/d-31654798-dd10-4a9c-8170-97785f6ddb6b/d-31654798-dd10-4a9c-8170-97785f6ddb6b.pdf",
  "slug": "ewhc/kb/2026/2475",
  "fclId": "vp7np8np",
  "documentUri": "d-31654798-dd10-4a9c-8170-97785f6ddb6b",
  "contentHash": "5d15acf3ec5469f8ca83f390a71b7627a0b73c7a903eb6fba8c8e44396e0560b",
  "updatedAt": "2026-10-02T09:45:53+00:00"
}
```

#### Product guides and related tools

- [Product overview and public links](https://jobatlas.dev/actors/directory/public-records#nomad-agent-uk-case-law-scraper)
- [Public setup guide](https://github.com/Exdenta/jobatlas/blob/main/docs/public-actors-setup.md)

#### Current costs

Current Actor event rates, checked 2026-10-04. USD; use the **Pricing** tab for your plan and later changes.

| Event | Free | Bronze | Silver | Gold | Platinum | Diamond |
|---|---:|---:|---:|---:|---:|---:|
| Judgment result (`result`) | $0.0002 | $0.0002 | $0.0002 | $0.0002 | $0.0002 | $0.0002 |
| Actor start (`actor-start`) | $0.00005 | $0.00005 | $0.00005 | $0.00005 | $0.00005 | $0.00005 |

For example, 100 × `result`, 1 × `actor-start` totals **$0.02005 in Actor event charges on Free**. This is an arithmetic example, before any waiver; actual charged events depend on the run and selected options. It is not a promise of output or a charge for simply setting an item cap.

Your total is the charged Actor events, plus platform usage **only if this Actor’s Pricing tab bills it separately**, plus any external provider you use with your own key. Do not add platform usage twice when it is included. Apify credits and plan discounts affect your invoice. Set a run cost limit in Console before starting.

***

**Independent tool.** We built and run this Actor ourselves. The National Archives does not operate, sponsor or endorse it, and its name is used only to say which source the data comes from.

# Actor input Schema

## `query` (type: `string`):

Free-text search across judgments (e.g. <code>negligence</code>, <code>data protection</code>). Leave empty to browse latest judgments matching the other filters. Ignored when Citation is set.

## `citation` (type: `string`):

Look up one judgment by its exact neutral citation, e.g. <code>\[2024] UKSC 1</code>. When set, this takes over the search: Search query, Courts, Party, Judge and the date range are all ignored, and the actor returns only the judgment(s) whose citation matches exactly (case/whitespace-insensitive). If nothing matches exactly, it falls back to returning the raw (unfiltered) search hits for that citation text instead. Leave empty for a normal search.

## `courts` (type: `array`):

Optional court/tribunal codes to filter by — all 37 collections published on Find Case Law. Empty = all courts. Years show each collection's published coverage. Ignored when Citation is set.

## `party` (type: `string`):

Optional filter on a party's name (claimant, defendant, appellant, respondent...). Ignored when Citation is set.

## `judge` (type: `string`):

Optional filter on the judge's name. Ignored when Citation is set.

## `postedWithin` (type: `string`):

Judgments are dated by calendar day. This duration computes a lower date bound from the UTC cutoff and includes that whole day; hour windows cannot provide hour-level precision. Use <code>any</code> for no date filter, or <code>24h</code>, <code>3d</code>, <code>2w</code>, <code>6m</code>. An explicit value overrides From date and To date. Leave empty to use those saved bounds. Ignored when Citation is set.

## `fromDate` (type: `string`):

Inclusive judgment date lower bound in YYYY-MM-DD format. Used when Posted within is omitted or empty; ignored when Citation is set.

## `toDate` (type: `string`):

Inclusive judgment date upper bound in YYYY-MM-DD format. Used when Posted within is omitted or empty; ignored when Citation is set.

## `includeFullText` (type: `boolean`):

Fetch each judgment's XML and include parties, judges, the full judgment text and structured legislation references (statutes cited). Slower and heavier output. Full text is Crown copyright, re-usable under the Open Justice Licence.

## `maxItems` (type: `integer`):

Hard cap on judgments considered per run. 0 = no cap (use with care — broad queries match thousands of judgments).

## `concurrency` (type: `integer`):

How many judgment pages to fetch in parallel when 'Include full text' is on. Keep low — this is a public government service.

## Actor input object example

```json
{
  "query": "negligence",
  "postedWithin": "any",
  "includeFullText": false,
  "maxItems": 15,
  "concurrency": 4
}
```

# Actor output Schema

## `dataset` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "query": "negligence",
    "postedWithin": "any",
    "maxItems": 15
};

// Run the Actor and wait for it to finish
const run = await client.actor("nomad-agent/uk-case-law-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "query": "negligence",
    "postedWithin": "any",
    "maxItems": 15,
}

# Run the Actor and wait for it to finish
run = client.actor("nomad-agent/uk-case-law-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "query": "negligence",
  "postedWithin": "any",
  "maxItems": 15
}' |
apify call nomad-agent/uk-case-law-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,nomad-agent/uk-case-law-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/6yiUR9P1imsGHYvat/builds/b7B2vtPU49t2c7fha/openapi.json
