{
  "openapi": "3.0.1",
  "info": {
    "title": "UK Companies House Search – New Companies, SIC & Postcode",
    "description": "Search all 5.6M+ live UK companies from the official Companies House bulk data: filter by SIC code, postcode, post town, status, category and incorporation date, or bulk-look-up company numbers. Address, accounts & confirmation due dates, mortgages, previous names. $1 per 1,000.",
    "version": "0.1",
    "x-build-id": "kTJNN9koNwxH1tKvY"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/gazidev~uk-companies-house-search/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-gazidev-uk-companies-house-search",
        "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/gazidev~uk-companies-house-search/runs": {
      "post": {
        "operationId": "runs-sync-gazidev-uk-companies-house-search",
        "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/gazidev~uk-companies-house-search/run-sync": {
      "post": {
        "operationId": "run-sync-gazidev-uk-companies-house-search",
        "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": {
          "incorporatedWithinDays": {
            "title": "Incorporated in the last N days (of the snapshot)",
            "minimum": 0,
            "type": "integer",
            "description": "New-company leads: only companies incorporated in the N days before the monthly data snapshot date (the snapshot is compiled to the end of the previous month). 0 = any date."
          },
          "incorporatedAfter": {
            "title": "Incorporated on/after (date)",
            "type": "string",
            "description": "YYYY-MM-DD. Overrides *last N days*."
          },
          "incorporatedBefore": {
            "title": "Incorporated on/before (date)",
            "type": "string",
            "description": "YYYY-MM-DD. Optional upper bound."
          },
          "postcodePrefixes": {
            "title": "Postcode areas / districts / prefixes",
            "type": "array",
            "description": "Registered office postcode. An area (`CB`, `M`, `EC`), a district (`SW1A`, `M1` - exact outward code) or a longer prefix (`EC1V 2`). Only the shards for these areas are read, so postcode searches are the fastest.",
            "items": {
              "type": "string"
            }
          },
          "postTowns": {
            "title": "Post towns",
            "type": "array",
            "description": "Exact post town of the registered office, case-insensitive, e.g. `Cambridge`, `Leeds`, `London`.",
            "items": {
              "type": "string"
            }
          },
          "sicCodes": {
            "title": "SIC codes (2007)",
            "type": "array",
            "description": "SIC 2007 codes or prefixes: `62020` (IT consultancy), `6201` or `62` (all IT/software), `56` (food & drink service), `41` (construction of buildings). A company matches if any of its up to 4 SIC codes starts with one of these.",
            "items": {
              "type": "string"
            }
          },
          "statuses": {
            "title": "Company status",
            "type": "array",
            "description": "Empty = all statuses in the file. The bulk file contains live companies only (dissolved companies are not included).",
            "items": {
              "type": "string",
              "enum": [
                "active",
                "proposal-to-strike-off",
                "liquidation",
                "administration-or-receivership",
                "voluntary-arrangement"
              ],
              "enumTitles": [
                "Active",
                "Active - proposal to strike off",
                "Liquidation",
                "Administration / receivership",
                "Voluntary arrangement"
              ]
            }
          },
          "companyCategories": {
            "title": "Company type",
            "type": "array",
            "description": "Empty = all company types.",
            "items": {
              "type": "string",
              "enum": [
                "private-limited",
                "plc",
                "llp",
                "limited-partnership",
                "guarantee",
                "cic",
                "charity",
                "overseas-entity",
                "unlimited",
                "other"
              ],
              "enumTitles": [
                "Private limited company (Ltd)",
                "Public limited company (PLC)",
                "Limited liability partnership (LLP)",
                "Limited partnership",
                "Private, limited by guarantee",
                "Community interest company (CIC)",
                "Charitable incorporated organisation (CIO / SCIO)",
                "Overseas entity",
                "Private unlimited company",
                "Other (royal charter, registered society, ...)"
              ]
            }
          },
          "nameContains": {
            "title": "Company name contains",
            "type": "array",
            "description": "Words or phrases matched at word start, case-insensitive, e.g. `solar`, `dental`, `property`. Any one keyword is enough.",
            "items": {
              "type": "string"
            }
          },
          "excludeDormant": {
            "title": "Exclude dormant companies (SIC 99999)",
            "type": "boolean",
            "description": "Skip companies whose SIC code is 99999 (dormant company).",
            "default": false
          },
          "onlyAccountsOverdue": {
            "title": "Only companies with overdue accounts",
            "type": "boolean",
            "description": "Only companies whose next accounts due date is before the snapshot date (useful for accountants' lead lists).",
            "default": false
          },
          "companyNumbers": {
            "title": "Company numbers (bulk lookup)",
            "type": "array",
            "description": "Look up specific companies, e.g. `08209948`, `SC123456`, `NI012345`, `OC301234`. Leading zeros can be omitted. When given, the filters above are ignored.",
            "items": {
              "type": "string"
            }
          },
          "maxResults": {
            "title": "Max companies",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many companies (0 = no limit). You pay only for companies saved.",
            "default": 1000
          },
          "sortNewestFirst": {
            "title": "Newest companies first",
            "type": "boolean",
            "description": "Return the most recently incorporated matches first (for up to 50,000 results). Off = file order, slightly faster.",
            "default": true
          },
          "onlyNew": {
            "title": "Only companies not returned before (monitoring)",
            "type": "boolean",
            "description": "Skip companies this saved search already returned in an earlier run (stored in your key-value store `uk-companies-house-search-state`). Schedule monthly to get only new companies.",
            "default": false
          },
          "stateKey": {
            "title": "Monitoring state key",
            "type": "string",
            "description": "Name for the onlyNew memory, so different saved searches don't share it.",
            "default": "default"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}