{
  "openapi": "3.0.1",
  "info": {
    "title": "UK Company Register Monthly Changes",
    "description": "New UK companies, strike-offs, liquidations, dissolutions and address, SIC and name changes from the Companies House monthly snapshot.",
    "version": "1.0",
    "x-build-id": "T8fIFpLIHkSkzDWxs"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/mastazee_data_lab~uk-company-register-changes/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-mastazee_data_lab-uk-company-register-changes",
        "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/mastazee_data_lab~uk-company-register-changes/runs": {
      "post": {
        "operationId": "runs-sync-mastazee_data_lab-uk-company-register-changes",
        "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/mastazee_data_lab~uk-company-register-changes/run-sync": {
      "post": {
        "operationId": "run-sync-mastazee_data_lab-uk-company-register-changes",
        "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": {
          "mode": {
            "title": "What to return",
            "enum": [
              "new",
              "changes"
            ],
            "type": "string",
            "description": "'New companies' lists companies incorporated in a window (one pass over the latest snapshot, a few minutes). 'Changes' compares the latest snapshot with the previous month and returns events such as strike-off, liquidation or dissolution; it reads two snapshots and takes much longer.",
            "default": "new"
          },
          "snapshotMonth": {
            "title": "Snapshot month (optional)",
            "type": "string",
            "description": "Month of the Companies House snapshot to read, as YYYY-MM (for example 2026-10). Leave empty for the latest published snapshot. In 'Changes' mode this is the newer of the two months."
          },
          "incorporationWindow": {
            "title": "Incorporated in (New companies mode)",
            "enum": [
              "last_month",
              "last_3_months",
              "last_12_months",
              "custom",
              "any"
            ],
            "type": "string",
            "description": "Which incorporation dates to keep. 'Last month' is the calendar month before the snapshot month (the snapshot dated 2026-10-01 holds data to 30 September, so 'last month' is September). Use 'Any date' for overdue-accounts lists.",
            "default": "last_month"
          },
          "incorporatedFrom": {
            "title": "Incorporated from (custom range)",
            "type": "string",
            "description": "First incorporation date to keep, as YYYY-MM-DD. Only used when the window is 'Custom range'."
          },
          "incorporatedTo": {
            "title": "Incorporated to (custom range)",
            "type": "string",
            "description": "Last incorporation date to keep, as YYYY-MM-DD. Only used when the window is 'Custom range'."
          },
          "events": {
            "title": "Events (Changes mode)",
            "type": "array",
            "description": "Which events to return in 'Changes' mode. Leave empty for all events. A month typically has about 88,000 strike-off proposals, 54,000 dissolutions and 62,000 postcode changes, so pick events and set filters.",
            "items": {
              "type": "string",
              "enum": [
                "new_company",
                "entered_strike_off",
                "entered_liquidation",
                "entered_administration",
                "entered_receivership",
                "entered_voluntary_arrangement",
                "dissolved_or_removed",
                "registered_office_postcode_changed",
                "sic_changed",
                "name_changed",
                "accounts_became_overdue"
              ],
              "enumTitles": [
                "New company",
                "Entered strike-off (proposal to strike off)",
                "Entered liquidation",
                "Entered administration",
                "Entered receivership",
                "Entered voluntary arrangement",
                "Dissolved or removed from the live register",
                "Registered office postcode changed",
                "SIC codes changed",
                "Company name changed",
                "Accounts became overdue"
              ]
            }
          },
          "sicPrefixes": {
            "title": "SIC code prefixes",
            "type": "array",
            "description": "Keep companies with a SIC code starting with any of these, for example 62 (computer programming and consultancy) or 47910. In 'Changes' mode a company matches if its old or new codes match.",
            "items": {
              "type": "string"
            }
          },
          "postcodes": {
            "title": "Postcode areas or districts",
            "type": "array",
            "description": "Registered office postcode areas (EC, M, LS) or districts (EC1A, M1). A district such as M1 does not match M11. In 'Changes' mode the old or the new postcode may match.",
            "items": {
              "type": "string"
            }
          },
          "companyTypes": {
            "title": "Company types",
            "type": "array",
            "description": "Keep companies whose type contains any of these words (not case-sensitive), for example \"private limited\", \"llp\", \"community interest\", \"limited partnership\".",
            "items": {
              "type": "string"
            }
          },
          "statuses": {
            "title": "Status contains",
            "type": "array",
            "description": "Keep companies whose current status contains any of these words, for example \"liquidation\" or \"strike off\". Leave empty for every status.",
            "items": {
              "type": "string"
            }
          },
          "nameContains": {
            "title": "Company name contains",
            "type": "string",
            "description": "Keep companies whose name (or, in 'Changes' mode, old name) contains this text, not case-sensitive."
          },
          "accountsOverdue": {
            "title": "Accounts overdue (New companies mode)",
            "type": "boolean",
            "description": "Only companies whose accounts were overdue on the snapshot date (Active or proposed-to-strike-off companies). Recent incorporations are never overdue, so set the window to 'Any date'.",
            "default": false
          },
          "confirmationStatementOverdue": {
            "title": "Confirmation statement overdue (New companies mode)",
            "type": "boolean",
            "description": "Only companies whose confirmation statement was overdue on the snapshot date. Set the window to 'Any date' or a custom older range.",
            "default": false
          },
          "minOverdueDays": {
            "title": "Minimum days overdue",
            "minimum": 1,
            "maximum": 3650,
            "type": "integer",
            "description": "With the overdue filters (and the 'accounts became overdue' event): ignore items overdue by fewer days than this.",
            "default": 1
          },
          "includeStreetAddress": {
            "title": "Include street address lines",
            "type": "boolean",
            "description": "Off by default: many small companies register at a director's home, so only town and postcode are output unless you switch this on. Switch it on only if your use of street addresses is lawful (e.g. B2B marketing to the company, not to a person). Care-of names and PO boxes are never output.",
            "default": false
          },
          "onlyNewResults": {
            "title": "Only results not delivered before (monitor)",
            "type": "boolean",
            "description": "For scheduled runs. Remembers (per state key) which monthly snapshot was already delivered, so re-running in the same month returns nothing and costs almost nothing. If a run stopped at 'Maximum results', the next run delivers the rest.",
            "default": false
          },
          "stateKey": {
            "title": "State key",
            "type": "string",
            "description": "Name for this monitor's memory. Use a different key for each watch list.",
            "default": "default"
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 200000,
            "type": "integer",
            "description": "Stop after this many rows. In 'New companies' mode you get the newest incorporations first.",
            "default": 500
          },
          "maxRuntimeSeconds": {
            "title": "Maximum run time (seconds)",
            "minimum": 60,
            "maximum": 36000,
            "type": "integer",
            "description": "Stop reading after this long and output what was found. The run summary says if it stopped early.",
            "default": 3300
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}