{
  "openapi": "3.0.1",
  "info": {
    "title": "UK Companies House Company Lookup API",
    "description": "UK company data from the official Companies House API: status, SIC codes, registered office, incorporation and dissolution dates, accounts and confirmation-statement due dates and overdue flags, filings, charges and insolvency. Search, bulk lookup or advanced search. No personal data. $1.50/1,000.",
    "version": "0.1",
    "x-build-id": "VoxUP1kxy49DBSLBM"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/crawlwren~uk-companies-house/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-crawlwren-uk-companies-house",
        "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/crawlwren~uk-companies-house/runs": {
      "post": {
        "operationId": "runs-sync-crawlwren-uk-companies-house",
        "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/crawlwren~uk-companies-house/run-sync": {
      "post": {
        "operationId": "run-sync-crawlwren-uk-companies-house",
        "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": [
              "search",
              "lookup",
              "advanced"
            ],
            "type": "string",
            "description": "What to fetch.",
            "default": "search"
          },
          "queries": {
            "title": "Company names (search mode)",
            "type": "array",
            "description": "One search per name, ranked by Companies House.",
            "items": {
              "type": "string"
            }
          },
          "resultsPerQuery": {
            "title": "Results per name (search mode)",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "How many search hits to turn into records for each name.",
            "default": 20
          },
          "companyNumbers": {
            "title": "Company numbers (lookup mode)",
            "type": "array",
            "description": "e.g. 00445790, SC123456, OC301234. Leading zeros are added. Numbers that don't exist are listed in RUN_STATS and are free.",
            "items": {
              "type": "string"
            }
          },
          "nameIncludes": {
            "title": "Name includes (advanced)",
            "type": "string",
            "description": "Word that must appear in the company name."
          },
          "sicCodes": {
            "title": "SIC codes (advanced)",
            "type": "array",
            "description": "5-digit SIC 2007 codes, e.g. 62012 (business and domestic software development).",
            "items": {
              "type": "string"
            }
          },
          "statuses": {
            "title": "Company status (advanced)",
            "type": "array",
            "description": "Empty = any status.",
            "items": {
              "type": "string",
              "enum": [
                "active",
                "dissolved",
                "liquidation",
                "administration",
                "receivership",
                "voluntary-arrangement",
                "insolvency-proceedings",
                "converted-closed",
                "open",
                "closed",
                "registered",
                "removed"
              ]
            }
          },
          "companyTypes": {
            "title": "Company types (advanced)",
            "type": "array",
            "description": "Companies House type codes, e.g. ltd, plc, llp.",
            "items": {
              "type": "string"
            }
          },
          "incorporatedFrom": {
            "title": "Incorporated from (advanced)",
            "type": "string",
            "description": "YYYY-MM-DD"
          },
          "incorporatedTo": {
            "title": "Incorporated to (advanced)",
            "type": "string",
            "description": "YYYY-MM-DD"
          },
          "location": {
            "title": "Location (advanced)",
            "type": "string",
            "description": "Registered office town, county or postcode area, e.g. Manchester or SW1."
          },
          "includeFilings": {
            "title": "Include latest filings",
            "type": "boolean",
            "description": "Filing history metadata (date, type, description). One extra request per company.",
            "default": true
          },
          "filingsCount": {
            "title": "Filings per company",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Most recent filings to include.",
            "default": 5
          },
          "includeCharges": {
            "title": "Include charges summary",
            "type": "boolean",
            "description": "Counts of outstanding and satisfied charges (one extra request, only for companies with charges). Lender names are not included.",
            "default": true
          },
          "includeInsolvency": {
            "title": "Include insolvency cases",
            "type": "boolean",
            "description": "Case types and dates (one extra request, only for companies with insolvency history). Practitioner names are not included.",
            "default": true
          },
          "includeCorporateOfficers": {
            "title": "Include corporate officers",
            "type": "boolean",
            "description": "Officers that are companies (e.g. corporate directors or secretaries) with their registration details. Individual officers are never output, only counted.",
            "default": true
          },
          "includeCorporatePscs": {
            "title": "Include corporate PSCs",
            "type": "boolean",
            "description": "Persons with significant control that are companies or legal persons, with natures of control. Individual PSCs are never output, only counted.",
            "default": true
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Stop after this many company records (you're charged per record).",
            "default": 50
          },
          "apiKey": {
            "title": "Your Companies House API key (optional)",
            "type": "string",
            "description": "Optional. Leave empty to use ours. Add your own free key (from the Companies House Developer Hub) for large or frequent pulls: it gets its own 600-requests-per-5-minutes allowance and runs about twice as fast."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}