{
  "openapi": "3.0.1",
  "info": {
    "title": "UK Case Law Scraper — Find Case Law Judgments API",
    "description": "Search UK court judgments and tribunal decisions from The National Archives' Find Case Law service via its official public API. Filter by keyword, court, party, judge and date range — get neutral citation, parties, court, date, links and optional full text. No login, no proxies, no HTML parsing.",
    "version": "0.1",
    "x-build-id": "WV8ePH3BJNhC6dV1A"
  },
  "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. \"negligence\", \"data protection\"). 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. \"[2024] UKSC 1\". 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",
            "type": "array",
            "description": "Optional court/tribunal codes to filter by. Empty = all courts. Ignored when Citation is set.",
            "items": {
              "type": "string",
              "enum": [
                "uksc",
                "ukpc",
                "ewca/civ",
                "ewca/crim",
                "ewhc/kb",
                "ewhc/ch",
                "ewhc/admin",
                "ewhc/comm",
                "ewhc/fam",
                "ewhc/pat",
                "ewhc/tcc",
                "ewfc",
                "ewcop",
                "ukut/iac",
                "ukut/lc",
                "ukut/tcc",
                "ukut/aac",
                "ukeat",
                "ukftt/tc",
                "ukftt/grc"
              ],
              "enumTitles": [
                "Supreme Court (uksc)",
                "Privy Council (ukpc)",
                "Court of Appeal — Civil Division (ewca/civ)",
                "Court of Appeal — Criminal Division (ewca/crim)",
                "High Court — King's Bench Division (ewhc/kb)",
                "High Court — Chancery Division (ewhc/ch)",
                "High Court — Administrative Court (ewhc/admin)",
                "High Court — Commercial Court (ewhc/comm)",
                "High Court — Family Division (ewhc/fam)",
                "High Court — Patents Court (ewhc/pat)",
                "High Court — Technology and Construction Court (ewhc/tcc)",
                "Family Court (ewfc)",
                "Court of Protection (ewcop)",
                "Upper Tribunal — Immigration and Asylum Chamber (ukut/iac)",
                "Upper Tribunal — Lands Chamber (ukut/lc)",
                "Upper Tribunal — Tax and Chancery Chamber (ukut/tcc)",
                "Upper Tribunal — Administrative Appeals Chamber (ukut/aac)",
                "Employment Appeal Tribunal (ukeat)",
                "First-tier Tribunal — Tax Chamber (ukftt/tc)",
                "First-tier Tribunal — General Regulatory Chamber (ukftt/grc)"
              ]
            }
          },
          "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 and the full judgment text. 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}