{
  "openapi": "3.0.1",
  "info": {
    "title": "Find Case Law - UK Case Law Search (The National Archives)",
    "description": "Search UK judgments (UKSC, Privy Council, Court of Appeal, High Court, tribunals) via The National Archives Find Case Law API: neutral citation, judges, PDF.",
    "version": "0.1",
    "x-build-id": "dbdzz9kpGbDrTKuPm"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/legaltech~find-case-law-uk/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-legaltech-find-case-law-uk",
        "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/legaltech~find-case-law-uk/runs": {
      "post": {
        "operationId": "runs-sync-legaltech-find-case-law-uk",
        "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/legaltech~find-case-law-uk/run-sync": {
      "post": {
        "operationId": "run-sync-legaltech-find-case-law-uk",
        "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": {
          "searchTerms": {
            "title": "Search terms",
            "type": "array",
            "description": "Full-text search, in English. Words (implicit AND), \"exact phrase\", OR / NOT, parentheses, -word and * wildcard (OR, NOT and wildcards are checked locally).",
            "items": {
              "type": "string"
            }
          },
          "courts": {
            "title": "Courts",
            "type": "array",
            "description": "UKSC, Privy Council, Court of Appeal, High Court (by division), Upper Tribunal, First-tier Tribunal, EAT, Court of Protection, Family Court. Codes are opaque: do NOT guess them; choose by reading the title (enumTitle) of each option.",
            "items": {
              "type": "string",
              "enum": [
                "uksc",
                "ukpc",
                "ewca/civ",
                "ewca/crim",
                "ewhc/admin",
                "ewhc/admlty",
                "ewhc/bp",
                "ewhc/ch",
                "ewhc/comm",
                "ewhc/fam",
                "ewhc/ipec",
                "ewhc/kb",
                "ewhc/mercantile",
                "ewhc/pat",
                "ewhc/scco",
                "ewhc/tcc",
                "ewcop/t3",
                "ewfc",
                "eat",
                "ukut/aac",
                "ukut/iac",
                "ukut/lc",
                "ukut/tcc",
                "ewcop/t1",
                "ewcop/t2",
                "ewfc/b",
                "ukftt/hesc",
                "ukftt/grc",
                "ukftt/iac",
                "ukftt/tc",
                "ukftt/credit",
                "ukftt/estate"
              ],
              "enumTitles": [
                "United Kingdom Supreme Court",
                "Privy Council",
                "Court of Appeal – Civil Division",
                "Court of Appeal – Criminal Division",
                "High Court – Administrative Court",
                "High Court – Admiralty Court",
                "High Court – Business and Property Division",
                "High Court – Chancery Division",
                "High Court – Commercial Court",
                "High Court – Family Division",
                "High Court – Intellectual Property Enterprise Court",
                "High Court – King's / Queen's Bench Division",
                "High Court – Mercantile Court",
                "High Court – Patents Court",
                "High Court – Senior Courts Costs Office",
                "High Court – Technology and Construction Court",
                "Court of Protection (High court judges)",
                "Family Court (High court judges)",
                "Employment Appeal Tribunal",
                "Upper Tribunal – Administrative Appeals Chamber",
                "Upper Tribunal – Immigration and Asylum Chamber",
                "Upper Tribunal – Lands Chamber",
                "Upper Tribunal – Tax and Chancery Chamber",
                "Court of Protection (District judges)",
                "Court of Protection (Circuit judges)",
                "Family Court (District and circuit judges)",
                "First-tier Tribunal – Care Standards",
                "First-tier Tribunal – General Regulatory Chamber",
                "First-tier Tribunal – Immigration and Asylum Chamber",
                "First-tier Tribunal – Tax Chamber",
                "First-tier Tribunal – Consumer Credit Appeals Tribunal",
                "First-tier Tribunal – Estate Agents Tribunal"
              ]
            }
          },
          "judge": {
            "title": "Judge",
            "type": "string",
            "description": "Surname of a judge (whole-word match), e.g. \"Leggatt\"."
          },
          "party": {
            "title": "Party",
            "type": "string",
            "description": "A word from a party name, e.g. \"Tesco\"."
          },
          "dateFrom": {
            "title": "Date from",
            "type": "string",
            "description": "Judgment (handed down) date, YYYY-MM-DD."
          },
          "dateTo": {
            "title": "Date to",
            "type": "string",
            "description": "Decision date, end of range (YYYY-MM-DD)."
          },
          "sortOrder": {
            "title": "Sort by",
            "enum": [
              "relevance",
              "newest",
              "oldest"
            ],
            "type": "string",
            "description": "Order of the results: relevance (default, same as the website) or judgment date.",
            "default": "relevance"
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum number of decisions returned per search term.",
            "default": 20
          },
          "includeDetails": {
            "title": "Include judges and parties",
            "type": "boolean",
            "description": "Downloads the XML of each judgment to add judges, parties and date.",
            "default": true
          },
          "passages": {
            "title": "Relevant passages",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "Numbered paragraphs containing the search terms.",
            "default": 3
          },
          "includeFullText": {
            "title": "Include full text",
            "type": "boolean",
            "description": "Adds the full text with paragraph numbers.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Optional. The source usually works without a proxy. If it blocks, use Apify RESIDENTIAL (GB) or your own proxyUrls; requests then use sticky sessions, IP rotation and a Chrome TLS fingerprint.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}