{
  "openapi": "3.0.1",
  "info": {
    "title": "Companies House UK Scraper & Monitor",
    "description": "Companies House scraper using the official API: search UK companies, officers, PSC, charges and filings. Get daily new-incorporation lead lists by SIC code and postcode, monitor watchlist changes, export JSON, CSV or Excel. Pay per result, from $2 per 1,000 companies.",
    "version": "0.0",
    "x-build-id": "GFpPjQxtCzg0dqbQB"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/tiger19935~companies-house-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-tiger19935-companies-house-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/tiger19935~companies-house-scraper/runs": {
      "post": {
        "operationId": "runs-sync-tiger19935-companies-house-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/tiger19935~companies-house-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-tiger19935-companies-house-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": {
          "mode": {
            "title": "Mode",
            "enum": [
              "lookup",
              "search",
              "officers",
              "psc",
              "filings",
              "charges",
              "new-incorporations",
              "monitor"
            ],
            "type": "string",
            "description": "What to do. lookup = company profile by number or name; search = name search; officers / psc / filings / charges = detail rows for each company; new-incorporations = feed of newly registered companies; monitor = detect changes on a watchlist since the last run.",
            "default": "lookup"
          },
          "queries": {
            "title": "Company numbers or names",
            "type": "array",
            "description": "Used by lookup, search, officers, psc, filings and charges. Company numbers (for example 00445790 or SC123456) are looked up directly; anything else is treated as a company name. In search mode every entry is a search phrase.",
            "items": {
              "type": "string"
            }
          },
          "include": {
            "title": "Also fetch (lookup mode)",
            "type": "array",
            "description": "Lookup mode only: extra detail rows to fetch for every company. Each row is billed as an officer-psc event.",
            "items": {
              "type": "string",
              "enum": [
                "officers",
                "psc",
                "filings",
                "charges"
              ]
            },
            "default": []
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Maximum number of billable result rows for the whole run. The run stops when this is reached. Free Apify plan users are capped at 25.",
            "default": 25
          },
          "apiKey": {
            "title": "Companies House API key (optional)",
            "type": "string",
            "description": "Your free API key from developer.company-information.service.gov.uk (REST key). Leave empty to use the shared key pool if the Actor owner configured one. Your own key gives you your own 600 requests per 5 minutes."
          },
          "includeResigned": {
            "title": "Include resigned officers",
            "type": "boolean",
            "description": "Officers mode only: also return officers who have resigned. Off = active officers only.",
            "default": false
          },
          "filingCategories": {
            "title": "Filing categories",
            "type": "array",
            "description": "Filings mode only: keep only these categories, for example accounts, confirmation-statement, officers, mortgage, insolvency, address, incorporation. Empty = all.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "incorporatedFrom": {
            "title": "Incorporated from (YYYY-MM-DD)",
            "type": "string",
            "description": "New-incorporations mode: earliest incorporation date. Leave empty to use Days back instead."
          },
          "incorporatedTo": {
            "title": "Incorporated to (YYYY-MM-DD)",
            "type": "string",
            "description": "New-incorporations mode: latest incorporation date. Empty = today."
          },
          "daysBack": {
            "title": "Days back",
            "minimum": 0,
            "maximum": 3650,
            "type": "integer",
            "description": "New-incorporations mode: used when Incorporated from is empty. 1 = yesterday and today.",
            "default": 1
          },
          "sicCodes": {
            "title": "SIC codes",
            "type": "array",
            "description": "New-incorporations mode: only companies with at least one of these SIC codes, for example 62020 (IT consultancy) or 56101 (restaurants). Empty = any.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "location": {
            "title": "Location",
            "type": "string",
            "description": "New-incorporations mode: free-text registered-office location filter passed to the API, for example London or Manchester."
          },
          "postcodePrefixes": {
            "title": "Postcode prefixes",
            "type": "array",
            "description": "New-incorporations mode: keep only companies whose registered postcode starts with one of these prefixes (for example EC1, M1, SW). Applied after the API search.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "includeOfficers": {
            "title": "Add officers to new incorporations",
            "type": "boolean",
            "description": "New-incorporations mode: fetch officers for every new company, add officerNames to the row and return one officer row each (billed as officer-psc). Slower: one extra API request per company.",
            "default": false
          },
          "watchlist": {
            "title": "Watchlist (company numbers)",
            "type": "array",
            "description": "Monitor mode: companies to watch. The first run stores a baseline and reports nothing; later runs report changes.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "watch": {
            "title": "What to watch",
            "type": "array",
            "description": "Monitor mode: which data to compare. profile = status, name, address, accounts and confirmation-statement dates; filings = new filings; charges; officers; psc. Every watched item costs one API request per company per run.",
            "items": {
              "type": "string",
              "enum": [
                "profile",
                "filings",
                "charges",
                "officers",
                "psc"
              ]
            },
            "default": [
              "profile",
              "filings"
            ]
          },
          "stateStoreName": {
            "title": "State store name",
            "type": "string",
            "description": "Monitor mode: named key-value store that keeps the previous snapshot between runs. Use a different name per watchlist.",
            "default": "companies-house-watchlist"
          },
          "resetBaseline": {
            "title": "Reset baseline",
            "type": "boolean",
            "description": "Monitor mode: discard the stored snapshot and start again (no change events are reported on that run).",
            "default": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}