{
  "openapi": "3.0.1",
  "info": {
    "title": "UK Case Law Scraper — BAILII Alternative, Judgments API",
    "description": "The only UK case-law actor with structured court, party, judge, date and citation filters. Search judgments and tribunal decisions from The National Archives' Find Case Law (the official BAILII alternative): citation, parties, judges, dates, links, full text, legislation refs, delta mode.",
    "version": "0.1",
    "x-build-id": "4KoF43p5ClTrb0vIl"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nomad-agent~uk-case-law-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nomad-agent-uk-case-law-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/nomad-agent~uk-case-law-scraper/runs": {
      "post": {
        "operationId": "runs-sync-nomad-agent-uk-case-law-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/nomad-agent~uk-case-law-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-nomad-agent-uk-case-law-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "query": {
            "title": "Search query",
            "type": "string",
            "description": "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": {
            "title": "Citation",
            "type": "string",
            "description": "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": {
            "title": "Courts & tribunals",
            "type": "array",
            "description": "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.",
            "items": {
              "type": "string",
              "enum": [
                "uksc",
                "ukpc",
                "ewca/civ",
                "ewca/crim",
                "ewhc/admin",
                "ewhc/admlty",
                "ewhc/ch",
                "ewhc/comm",
                "ewhc/fam",
                "ewhc/ipec",
                "ewhc/kb",
                "ewhc/mercantile",
                "ewhc/pat",
                "ewhc/scco",
                "ewhc/tcc",
                "ewcr",
                "ewcc",
                "ewfc",
                "ewcop",
                "eat",
                "ukut/aac",
                "ukut/iac",
                "ukut/lc",
                "ukut/tcc",
                "ukftt/tc",
                "ukftt/grc",
                "ukftt/hesc",
                "ftt/pc",
                "ftt/phl",
                "ukiptrib",
                "siac",
                "ftt/claims",
                "ukftt/credit",
                "ukftt/estate",
                "ukit",
                "ukist",
                "ftt/transport"
              ],
              "enumTitles": [
                "Supreme Court — uksc (2009–)",
                "Privy Council — ukpc (2009–)",
                "Court of Appeal, Civil Division — ewca/civ (2001–)",
                "Court of Appeal, Criminal Division — ewca/crim (2003–)",
                "High Court, Administrative Court — ewhc/admin (2003–)",
                "High Court, Admiralty Court — ewhc/admlty (2003–)",
                "High Court, Chancery Division — ewhc/ch (2003–)",
                "High Court, Commercial Court — ewhc/comm (2003–)",
                "High Court, Family Division — ewhc/fam (2003–)",
                "High Court, Intellectual Property Enterprise Court — ewhc/ipec (2013–)",
                "High Court, King's / Queen's Bench Division — ewhc/kb (2003–)",
                "High Court, Mercantile Court — ewhc/mercantile (2008–2014)",
                "High Court, Patents Court — ewhc/pat (2003–)",
                "High Court, Senior Courts Costs Office — ewhc/scco (2003–)",
                "High Court, Technology and Construction Court — ewhc/tcc (2003–)",
                "Crown Court — ewcr (2020–)",
                "County Court — ewcc (2019–)",
                "Family Court — ewfc (2014–)",
                "Court of Protection — ewcop (2009–)",
                "Employment Appeal Tribunal — eat (2021–)",
                "Upper Tribunal, Administrative Appeals Chamber — ukut/aac (2011–)",
                "Upper Tribunal, Immigration and Asylum Chamber — ukut/iac (2007–)",
                "Upper Tribunal, Lands Chamber — ukut/lc (2014–)",
                "Upper Tribunal, Tax and Chancery Chamber — ukut/tcc (2016–)",
                "First-tier Tribunal, Tax Chamber — ukftt/tc (2019–)",
                "First-tier Tribunal, General Regulatory Chamber — ukftt/grc (2009–)",
                "First-tier Tribunal, Care Standards — ukftt/hesc (1985–)",
                "First-tier Tribunal, Land Registration Division — ftt/pc (2024–)",
                "First-tier Tribunal, Primary Health Lists — ftt/phl (2025–)",
                "Investigatory Powers Tribunal — ukiptrib (2023–2024)",
                "Special Immigration Appeals Commission — siac (2003–)",
                "Claims Management Services Tribunal — ftt/claims (2010–2011)",
                "Consumer Credit Appeals Tribunal — ukftt/credit (2008–2013)",
                "Estate Agents Tribunal — ukftt/estate (2010)",
                "Information Tribunal — ukit (1990–2010)",
                "Immigration Services Tribunal — ukist (2001–2009)",
                "Transport Tribunal — ftt/transport (2000–2009)"
              ]
            }
          },
          "party": {
            "title": "Party name",
            "type": "string",
            "description": "Optional filter on a party's name (claimant, defendant, appellant, respondent...). Ignored when Citation is set."
          },
          "judge": {
            "title": "Judge name",
            "type": "string",
            "description": "Optional filter on the judge's name. Ignored when Citation is set."
          },
          "fromDate": {
            "title": "From date",
            "type": "string",
            "description": "Only judgments on/after this date. Ignored when Citation is set."
          },
          "toDate": {
            "title": "To date",
            "type": "string",
            "description": "Only judgments on/before this date. Ignored when Citation is set."
          },
          "includeFullText": {
            "title": "Include full text",
            "type": "boolean",
            "description": "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.",
            "default": false
          },
          "onlyNewSinceLastRun": {
            "title": "Only new since last run",
            "type": "boolean",
            "description": "Only output judgments not seen in previous runs with this flag. Skipped (already-seen) judgments are not pushed or billed, so repeat runs against the same query only charge for genuinely new results.",
            "default": false
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 0,
            "type": "integer",
            "description": "Hard cap on judgments considered per run. 0 = no cap (use with care — broad queries match thousands of judgments). With 'Only new since last run' on, some considered judgments may be skipped as already-seen, so fewer than this may actually be pushed and billed.",
            "default": 50
          },
          "concurrency": {
            "title": "Concurrency",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "How many judgment pages to fetch in parallel when 'Include full text' is on. Keep low — this is a public government service.",
            "default": 4
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}