{
  "openapi": "3.0.1",
  "info": {
    "title": "Companies House API – UK Company Data, Directors & PSC",
    "description": "UK company data from the official Companies House API, not scraping. $0.003 per company. Search by name, company number, SIC code, incorporation date and status. Directors and PSCs are optional (+$0.001) and off by default. Not affiliated with or endorsed by Companies House.",
    "version": "0.1",
    "x-build-id": "xqRkqcVZWD8m8rplV"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/agentic_solutions~uk-companies-house/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-agentic_solutions-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/agentic_solutions~uk-companies-house/runs": {
      "post": {
        "operationId": "runs-sync-agentic_solutions-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/agentic_solutions~uk-companies-house/run-sync": {
      "post": {
        "operationId": "run-sync-agentic_solutions-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": {
          "apiKey": {
            "title": "Companies House API key",
            "type": "string",
            "description": "Your free Companies House REST API key (developer.company-information.service.gov.uk → Your applications → Create an application → REST). Stored encrypted. Each key allows 600 requests per 5 minutes."
          },
          "searchQuery": {
            "title": "Company name",
            "type": "string",
            "description": "Words in the company name. Used alone for a normal name search, or combined with the filters below for an advanced search."
          },
          "nameMatch": {
            "title": "Name matching",
            "enum": [
              "strict",
              "relevance"
            ],
            "type": "string",
            "description": "Strict (default) returns only companies whose current name contains all words of 'Company name'. Relevance uses Companies House's ranked search, which can also match former names; each row shows matchedOn and matchSnippet.",
            "default": "strict"
          },
          "companyNumbers": {
            "title": "Company numbers",
            "type": "array",
            "description": "Look up exact companies, e.g. 00445790 or SC123456. When set, the other search fields are ignored. Short numbers are zero-padded.",
            "items": {
              "type": "string"
            }
          },
          "sicCodes": {
            "title": "SIC codes",
            "type": "array",
            "description": "Filter by 2007 SIC code(s), e.g. 62012 (business software). Uses the advanced search.",
            "items": {
              "type": "string"
            }
          },
          "incorporatedFrom": {
            "title": "Incorporated from",
            "type": "string",
            "description": "Only companies incorporated on/after this date (YYYY-MM-DD)."
          },
          "incorporatedTo": {
            "title": "Incorporated to",
            "type": "string",
            "description": "Only companies incorporated on/before this date (YYYY-MM-DD)."
          },
          "companyStatus": {
            "title": "Company status",
            "type": "array",
            "description": "Only companies with these statuses, e.g. active.",
            "items": {
              "type": "string",
              "enum": [
                "active",
                "dissolved",
                "liquidation",
                "administration",
                "receivership",
                "voluntary-arrangement",
                "insolvency-proceedings",
                "open",
                "closed",
                "converted-closed",
                "registered",
                "removed"
              ]
            }
          },
          "location": {
            "title": "Location",
            "type": "string",
            "description": "Registered office location contains, e.g. Manchester. Uses the advanced search."
          },
          "confirmLawfulBasis": {
            "title": "I confirm a lawful basis for officer/PSC data",
            "type": "boolean",
            "description": "Required when Include officers or Include PSCs is on. Tick to confirm: 'I have a lawful basis (e.g. legitimate interests) for processing this personal data and will meet my UK GDPR duties, including Art. 14 transparency.' The confirmation is recorded in the run's RUN_STATS. Without it, a run that requests officers/PSCs stops with a message before any data is fetched.",
            "default": false
          },
          "includeOfficers": {
            "title": "Include officers",
            "type": "boolean",
            "description": "Opt-in (off by default). Adds directors/secretaries — personal data under UK GDPR; see README. +$0.001 per company (charged once even with PSCs).",
            "default": false
          },
          "maxOfficersPerCompany": {
            "title": "Max officers per company",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Cap on officers fetched per company (current and resigned).",
            "default": 50
          },
          "officersCurrentOnly": {
            "title": "Current officers only",
            "type": "boolean",
            "description": "Exclude resigned officers (default). Turn off to include resigned officers too.",
            "default": true
          },
          "includePsc": {
            "title": "Include people with significant control",
            "type": "boolean",
            "description": "Opt-in (off by default). Adds people with significant control — personal data under UK GDPR; see README. Shares the single $0.001-per-company enrichment charge with officers.",
            "default": false
          },
          "maxItems": {
            "title": "Max companies",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum companies to return. Keep small for tests; each company with add-ons uses 2-4 API requests.",
            "default": 20
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}