{
  "openapi": "3.0.1",
  "info": {
    "title": "UK Legislation Scraper - Acts and Statutory Instruments",
    "description": "The UK statute book as structured records: Acts and Statutory Instruments from Westminster, Scotland, Wales and Northern Ireland, plus retained EU law. Dates, extent, subjects and the amendment trail, ready to filter by type and year.",
    "version": "0.1",
    "x-build-id": "DeHEUAjVz6GdNKlWM"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/jungle_synthesizer~uk-legislation-gov-uk-statute-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-jungle_synthesizer-uk-legislation-gov-uk-statute-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/jungle_synthesizer~uk-legislation-gov-uk-statute-scraper/runs": {
      "post": {
        "operationId": "runs-sync-jungle_synthesizer-uk-legislation-gov-uk-statute-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/jungle_synthesizer~uk-legislation-gov-uk-statute-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-jungle_synthesizer-uk-legislation-gov-uk-statute-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",
        "required": [
          "maxItems"
        ],
        "properties": {
          "sp_intended_usage": {
            "title": "What is the intended usage of this data?",
            "minLength": 1,
            "type": "string",
            "description": "What will this data feed? E.g. lead lists, KYB checks, price tracking."
          },
          "sp_improvement_suggestions": {
            "title": "How can we improve this crawler for you?",
            "minLength": 1,
            "type": "string",
            "description": "Provide any feedback or suggestions for improvements."
          },
          "sp_contact": {
            "title": "Contact Email",
            "minLength": 1,
            "type": "string",
            "description": "We'll personally help with your use case. No spam."
          },
          "legislationTypes": {
            "title": "Legislation Types",
            "type": "array",
            "description": "Which kinds of legislation to collect (Acts, Statutory Instruments, retained EU law and so on). Leave empty to collect every type, primary legislation first.",
            "items": {
              "type": "string",
              "enum": [
                "ukpga",
                "ukla",
                "ukppa",
                "asp",
                "asc",
                "anaw",
                "mwa",
                "nia",
                "mnia",
                "ukcm",
                "apni",
                "aosp",
                "aep",
                "aip",
                "apgb",
                "gbla",
                "uksi",
                "ssi",
                "wsi",
                "nisr",
                "nisi",
                "nisro",
                "uksro",
                "ukmo",
                "ukci",
                "ukmd",
                "eur",
                "eudn",
                "eudr",
                "eut"
              ],
              "enumTitles": [
                "UK Public General Acts (ukpga)",
                "UK Local Acts (ukla)",
                "UK Private and Personal Acts (ukppa)",
                "Acts of the Scottish Parliament (asp)",
                "Acts of Senedd Cymru (asc)",
                "Acts of the National Assembly for Wales (anaw)",
                "Measures of the National Assembly for Wales (mwa)",
                "Acts of the Northern Ireland Assembly (nia)",
                "Measures of the Northern Ireland Assembly (mnia)",
                "Church of England Measures (ukcm)",
                "Acts of the Northern Ireland Parliament (apni)",
                "Acts of the Old Scottish Parliament (aosp)",
                "Acts of the English Parliament (aep)",
                "Acts of the Old Irish Parliament (aip)",
                "Acts of the Parliament of Great Britain (apgb)",
                "Local Acts of the Parliament of Great Britain (gbla)",
                "UK Statutory Instruments (uksi)",
                "Scottish Statutory Instruments (ssi)",
                "Welsh Statutory Instruments (wsi)",
                "Northern Ireland Statutory Rules (nisr)",
                "Northern Ireland Orders in Council (nisi)",
                "Northern Ireland Statutory Rules and Orders (nisro)",
                "UK Statutory Rules and Orders (uksro)",
                "UK Ministerial Orders (ukmo)",
                "Church Instruments (ukci)",
                "UK Ministerial Directions (ukmd)",
                "EU Regulations (eur)",
                "EU Decisions (eudn)",
                "EU Directives (eudr)",
                "EU Treaties (eut)"
              ]
            },
            "default": []
          },
          "yearFrom": {
            "title": "Year From",
            "minimum": 1200,
            "maximum": 2100,
            "type": "integer",
            "description": "Earliest year of enactment to include, for example 2015. Leave empty for no lower bound."
          },
          "yearTo": {
            "title": "Year To",
            "minimum": 1200,
            "maximum": 2100,
            "type": "integer",
            "description": "Latest year of enactment to include, for example 2024. Leave empty for no upper bound."
          },
          "titleContains": {
            "title": "Title Contains",
            "type": "string",
            "description": "Keep only items whose title contains this text, for example \"data protection\". Free text, matched by the publisher. Leave empty for no title filter."
          },
          "includeDetail": {
            "title": "Include Dates, Extent and Subjects",
            "type": "boolean",
            "description": "Add the enactment or made date, coming-into-force date, territorial extent, subject headings and PDF link to each record. Turn off for a faster title-and-reference listing.",
            "default": true
          },
          "includeAmendments": {
            "title": "Include Amendments",
            "type": "boolean",
            "description": "Add the lists of legislation each item amends and is amended by, with the number of changes and their kinds. Slower, because it adds requests per record.",
            "default": false
          },
          "maxAmendmentPages": {
            "title": "Amendment Pages per Item",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many pages of changes to read per direction when amendments are included. Each page covers up to 50 changes, and records are flagged when more exist.",
            "default": 2
          },
          "maxItems": {
            "title": "Max Items",
            "type": "integer",
            "description": "Maximum number of legislation items to save.",
            "default": 10
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}