{
  "openapi": "3.0.1",
  "info": {
    "title": "UK Companies House Search",
    "description": "Search the official UK Companies House registry for company profiles, directors, officers, filing history, and registered addresses.",
    "version": "2.0",
    "x-build-id": "ro0xzuAs30IUTQByl"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ryanclinton~uk-companies-house/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ryanclinton-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/ryanclinton~uk-companies-house/runs": {
      "post": {
        "operationId": "runs-sync-ryanclinton-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/ryanclinton~uk-companies-house/run-sync": {
      "post": {
        "operationId": "run-sync-ryanclinton-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": [
              "custom",
              "lookup",
              "kyb",
              "monitor",
              "investigate",
              "discovery"
            ],
            "type": "string",
            "description": "A one-click preset that fills sensible defaults for a workflow. 'lookup' = fast decision-only lookup; 'kyb' = full enrichment (PSC, charges, officers, filings) with onboarding risk policy; 'monitor' = enrich + alert-only on change (set a Watchlist Name); 'investigate' = full enrichment + connected companies via shared directors + a graph export, surfaced as red flags; 'discovery' = advanced filtered company discovery with officer contacts; 'custom' = use every input exactly as set. Any field you set explicitly overrides the preset.",
            "default": "custom"
          },
          "query": {
            "title": "Search Query",
            "type": "string",
            "description": "A single company name or number (e.g., 'Tesco' or '00445790'). An exact company number returns one record; a name returns up to Max Results. Leave blank if using Batch Queries or advanced search.",
            "default": "Tesco"
          },
          "queries": {
            "title": "Batch Queries",
            "maxItems": 1000,
            "type": "array",
            "description": "Batch mode: a list of company names and/or numbers. Each resolves to one company row; unresolved entries are returned as 'unresolved' records. Overrides the single Search Query when set.",
            "items": {
              "type": "string"
            }
          },
          "searchMode": {
            "title": "Search Mode",
            "enum": [
              "basic",
              "advanced"
            ],
            "type": "string",
            "description": "'basic' uses the Search Query / Batch Queries. 'advanced' ignores them and uses the Advanced Search filters below for filtered company discovery. Defaults to basic."
          },
          "advancedSearch": {
            "title": "Advanced Search Filters",
            "type": "object",
            "description": "Used only when Search Mode is 'advanced'. Keys: companyNameIncludes, companyStatus, companyType (array), sicCodes (array), incorporatedFrom (YYYY-MM-DD), incorporatedTo (YYYY-MM-DD), location."
          },
          "apiKey": {
            "title": "API Key",
            "type": "string",
            "description": "Companies House API key (free at https://developer.company-information.service.gov.uk/). If not provided, returns instructions on how to get a key."
          },
          "includeOfficers": {
            "title": "Include Officers/Directors",
            "type": "boolean",
            "description": "Fetch officer and director details, plus a director-churn score (adds 1 API call per company). Auto-on in KYB mode."
          },
          "includeFilings": {
            "title": "Include Filing History",
            "type": "boolean",
            "description": "Fetch and classify recent filing history, and build a health timeline + trend (adds 1 API call per company). Auto-on in KYB mode."
          },
          "includePsc": {
            "title": "Include PSC / Beneficial Ownership",
            "type": "boolean",
            "description": "Fetch persons with significant control and summarise ownership, plus an ownership-complexity score (adds 1 API call per company). Auto-on in KYB / Monitor modes."
          },
          "includeCharges": {
            "title": "Include Charges Detail",
            "type": "boolean",
            "description": "Fetch registered charges and classify them (outstanding vs satisfied, latest dates). Adds 1 API call per company. Auto-on in KYB / Monitor modes."
          },
          "includeOfficerAppointments": {
            "title": "Include Officer Network",
            "type": "boolean",
            "description": "For active directors, fetch their other appointments to flag sole directors, multiple directorships, and possible serial directors. Adds up to ~10 extra API calls per company (capped). Implies Include Officers."
          },
          "includeRelationshipAnalysis": {
            "title": "Include Relationship Analysis",
            "type": "boolean",
            "description": "Discover connected companies via shared directors: returns connectedCompanies[] and a relationshipSummary. Turns the actor into an investigation tool. Adds up to ~10 extra API calls per company (capped). Implies Include Officers."
          },
          "includeGraphEdges": {
            "title": "Include Graph Export",
            "type": "boolean",
            "description": "Emit graphNodes[] + graphEdges[] (companies + directors as nodes, appointments as edges) ready for Neo4j / Gephi / NetworkX. Requires Include Relationship Analysis. Returned in the 'full' output profile."
          },
          "includeSectorComparison": {
            "title": "Include Sector Comparison",
            "type": "boolean",
            "description": "Compute an honest sector age-percentile (older than X% of companies in the same SIC code, by incorporation date) via two count queries per company. Adds 2 API calls per company."
          },
          "riskPolicy": {
            "title": "Risk Policy",
            "enum": [
              "balanced",
              "onboarding",
              "supplier",
              "credit",
              "minimal"
            ],
            "type": "string",
            "description": "Deterministically reweights the risk score for your workflow without changing which facts fire. 'balanced' (general), 'onboarding' (heavier PSC / address / status), 'supplier' (heavier filings / insolvency / charges), 'credit' (heavier charges / insolvency / overdue), 'minimal' (terminal status facts only). Auditable via scoreBreakdown + riskPolicyVersion. Defaults to balanced."
          },
          "companyStatus": {
            "title": "Company Status Filter",
            "enum": [
              "",
              "active",
              "dissolved",
              "liquidation",
              "receivership",
              "converted-closed"
            ],
            "type": "string",
            "description": "Filter search results by company status (basic search mode).",
            "default": ""
          },
          "maxResults": {
            "title": "Max Results",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum number of company results to return (1-100). Ignored when the query is an exact company number (one record returned).",
            "default": 25
          },
          "outputProfile": {
            "title": "Output Profile",
            "enum": [
              "minimal",
              "standard",
              "full"
            ],
            "type": "string",
            "description": "How much detail to return per company. 'minimal' = the decision fields only (verdict, risk, recommended action) for agents/automation; 'standard' = the full company record without the verbose officer/filing arrays; 'full' = everything including officers and filing history. Defaults to standard."
          },
          "watchlistName": {
            "title": "Watchlist Name (monitoring)",
            "type": "string",
            "description": "Optional. Set a name to monitor these companies across runs. Each run is compared against the last run under the same name and every company gets a change flag, a risk delta, and typed corporate events (status change, new charge, insolvency, accounts overdue, director/PSC changes, name/address change). Leave blank for a one-off lookup."
          },
          "alertOnly": {
            "title": "Alert Only (watchlist)",
            "type": "boolean",
            "description": "When monitoring, emit only companies that changed since the last run (changeFlag != UNCHANGED). Suppressed companies are counted in the summary, never silently dropped. Auto-on in Monitor mode."
          },
          "minimumRiskDelta": {
            "title": "Minimum Risk Delta (watchlist)",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "When monitoring, a risk-score move smaller than this (with no corporate event) is treated as UNCHANGED, cutting noise from trivial fluctuations. 0 = report every move.",
            "default": 0
          },
          "eventFilter": {
            "title": "Event Filter (watchlist)",
            "type": "array",
            "description": "When monitoring, keep only companies whose corporate events intersect this list (e.g. ENTERED_INSOLVENCY, NEW_CHARGE_REGISTERED, DIRECTOR_RESIGNED, ACCOUNTS_NOW_OVERDUE). Leave empty to keep all.",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}