{
  "openapi": "3.0.1",
  "info": {
    "title": "UK Companies House Scraper & API: Officers, PSC",
    "description": "UK Companies House scraper & API, $2 per 1,000 results: paste a name or SIC code, get companies, directors and officers, PSC owners and filings with PDF links as JSON/CSV/Excel. Official Companies House API, no scraping.",
    "version": "1.0",
    "x-build-id": "A7nRgf20BlHgn3tf7"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/tuper~companies-house/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-tuper-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/tuper~companies-house/runs": {
      "post": {
        "operationId": "runs-sync-tuper-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/tuper~companies-house/run-sync": {
      "post": {
        "operationId": "run-sync-tuper-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",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "What to get",
            "enum": [
              "search",
              "companies",
              "officers"
            ],
            "type": "string",
            "description": "search = find companies by name and/or filters; companies = details for company numbers you already have; officers = find people (directors, secretaries) by name and list their appointments.",
            "default": "search"
          },
          "query": {
            "title": "Name to search",
            "type": "string",
            "description": "For 'search': company name words (e.g. 'bakery'). For 'officers': a person's name (e.g. 'Jane Smith'). Name search returns up to 1000 companies; add filters below for more."
          },
          "companyNumbers": {
            "title": "Company numbers",
            "type": "array",
            "description": "For 'companies': Companies House numbers, e.g. 00445790 or SC193794 (short numbers are padded to 8 digits).",
            "items": {
              "type": "string"
            }
          },
          "include": {
            "title": "Details to add",
            "type": "array",
            "description": "For 'companies' and 'search': which records to output for each company, one row per record. profile = the company record; officers = directors and secretaries; psc = persons with significant control (owners); filings = filing history. In 'search' with nothing ticked you get the search rows only (cheapest).",
            "items": {
              "type": "string",
              "enum": [
                "profile",
                "officers",
                "psc",
                "filings"
              ],
              "enumTitles": [
                "Company profile",
                "Officers (directors, secretaries)",
                "Persons with significant control",
                "Filing history"
              ]
            }
          },
          "activeOnly": {
            "title": "Current officers / PSC / appointments only",
            "type": "boolean",
            "description": "Skip resigned officers, ceased PSC and ended appointments.",
            "default": false
          },
          "companyStatus": {
            "title": "Company status",
            "type": "array",
            "description": "Filter for 'search' (uses Companies House advanced search). E.g. active, dissolved, liquidation, administration.",
            "items": {
              "type": "string",
              "enum": [
                "active",
                "dissolved",
                "open",
                "closed",
                "converted-closed",
                "receivership",
                "administration",
                "liquidation",
                "insolvency-proceedings",
                "voluntary-arrangement",
                "registered",
                "removed"
              ]
            }
          },
          "companyType": {
            "title": "Company type",
            "type": "array",
            "description": "Filter for 'search', e.g. ltd, plc, llp, private-limited-guarant-nsc.",
            "items": {
              "type": "string"
            }
          },
          "sicCodes": {
            "title": "SIC codes",
            "type": "array",
            "description": "Filter for 'search': 5-digit SIC 2007 codes, e.g. 56302 (pubs and bars), 62012 (software development).",
            "items": {
              "type": "string"
            }
          },
          "incorporatedFrom": {
            "title": "Incorporated from",
            "pattern": "^(\\d{4}-\\d{2}-\\d{2})?$",
            "type": "string",
            "description": "Filter for 'search': YYYY-MM-DD. Use with 'Incorporated to' to list newly formed companies."
          },
          "incorporatedTo": {
            "title": "Incorporated to",
            "pattern": "^(\\d{4}-\\d{2}-\\d{2})?$",
            "type": "string",
            "description": "Filter for 'search': YYYY-MM-DD."
          },
          "location": {
            "title": "Registered office location",
            "type": "string",
            "description": "Filter for 'search': a town or postcode area in the registered office address, e.g. Leeds."
          },
          "filingCategories": {
            "title": "Filing categories",
            "type": "array",
            "description": "For filings: keep only these categories, e.g. accounts, confirmation-statement, officers, capital, charges, incorporation, insolvency.",
            "items": {
              "type": "string"
            }
          },
          "maxFilingsPerCompany": {
            "title": "Max filings per company",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Newest first.",
            "default": 100
          },
          "officerIds": {
            "title": "Officer IDs",
            "type": "array",
            "description": "For 'officers': Companies House officer IDs (from an officer row's officerId) to list all their appointments.",
            "items": {
              "type": "string"
            }
          },
          "includeAppointments": {
            "title": "List each found officer's appointments",
            "type": "boolean",
            "description": "For 'officers' with a name: output every company each matching person is appointed to, instead of the search rows.",
            "default": false
          },
          "maxOfficers": {
            "title": "Max people to expand",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "For 'officers' with appointments: how many matching people to expand.",
            "default": 20
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop after this many rows (each row is one result).",
            "default": 100
          },
          "apiKey": {
            "title": "Your own API key (optional)",
            "type": "string",
            "description": "Optional. A free Companies House REST API key (developer.company-information.service.gov.uk). Without one the actor uses a shared key, limited to 1500 API requests per run; with yours there is no per-run cap and you get your own 600 requests / 5 minutes."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}