{
  "openapi": "3.0.1",
  "info": {
    "title": "UK Companies House API Scraper — PSC, iXBRL Accounts, Filings",
    "description": "Scrape UK Companies House data via 54 modes: company profiles, PSC ownership graphs, officer networks, iXBRL-parsed accounts (FRS 102/105), filings, charges, gazette notices, and AI director briefs. Pooled API key included — first 20 rows free.",
    "version": "0.0",
    "x-build-id": "qts6eNcT59wgKRGTc"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/dominvo~uk-companies-house-api-ai-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-dominvo-uk-companies-house-api-ai-scraper",
        "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/dominvo~uk-companies-house-api-ai-scraper/runs": {
      "post": {
        "operationId": "runs-sync-dominvo-uk-companies-house-api-ai-scraper",
        "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/dominvo~uk-companies-house-api-ai-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-dominvo-uk-companies-house-api-ai-scraper",
        "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": "Mode",
            "enum": [
              "company_profile",
              "company_registers",
              "uk_establishments",
              "company_exemptions",
              "company_search",
              "advanced_search_companies",
              "alphabetical_search",
              "dissolved_search",
              "officer_search",
              "disqualified_officer_search",
              "company_officers",
              "officer_appointments",
              "disqualified_officer_natural",
              "disqualified_officer_corporate",
              "psc_list",
              "psc_individual",
              "psc_corporate_entity",
              "psc_legal_person",
              "psc_super_secure",
              "psc_statements",
              "psc_exemptions",
              "filing_history",
              "filing_document",
              "charges_list",
              "charge_detail",
              "insolvency_cases",
              "bulk_company_snapshot",
              "bulk_psc_snapshot",
              "bulk_disqualified_officers",
              "bulk_mortgages",
              "bulk_accounts_archive",
              "filing_chunks",
              "accounts_peer_benchmark",
              "disclosure_compare",
              "ai_summary",
              "ai_importance",
              "signal_pack",
              "gazette_notices",
              "name_change_history",
              "companies_stream",
              "filings_stream",
              "charges_stream",
              "officers_stream",
              "insolvency_stream",
              "psc_stream",
              "ixbrl_accounts",
              "accounts_section_diff",
              "accounts_estimates",
              "ai_director_brief",
              "officer_network",
              "address_cluster",
              "director_risk_score",
              "incorporation_burst",
              "strike_off_risk_score"
            ],
            "type": "string",
            "description": "Which mode to run. See README for full catalog."
          },
          "crn": {
            "title": "Company Registration Number (CRN)",
            "type": "string",
            "description": "8-character UK CRN (e.g. 09446231). You may also supply a company name or URL — the Actor will resolve it automatically."
          },
          "crns": {
            "title": "CRNs (batch)",
            "type": "array",
            "description": "List of CRNs to process in one run. Supported by modes that accept multiple companies."
          },
          "officerId": {
            "title": "Officer ID",
            "type": "string",
            "description": "CH officer ID (used by officer_appointments, disqualified_officer_natural, disqualified_officer_corporate)."
          },
          "query": {
            "title": "Search query",
            "type": "string",
            "description": "Full-text search query (used by company_search, officer_search, alphabetical_search, dissolved_search)."
          },
          "chargeId": {
            "title": "Charge ID",
            "type": "string",
            "description": "CH charge ID (used by charge_detail mode)."
          },
          "pscId": {
            "title": "PSC ID",
            "type": "string",
            "description": "CH PSC ID (used by psc_individual, psc_corporate_entity, psc_legal_person, psc_super_secure modes)."
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum number of rows to emit per company / query. 0 = unlimited.",
            "default": 0
          },
          "dateFrom": {
            "title": "Date from (YYYY-MM-DD)",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Filter results to this start date (inclusive). Applicable to filing history and stream modes."
          },
          "dateTo": {
            "title": "Date to (YYYY-MM-DD)",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Filter results to this end date (inclusive)."
          },
          "outputFormat": {
            "title": "Output format",
            "enum": [
              "json",
              "ndjson",
              "csv",
              "xlsx",
              "md"
            ],
            "type": "string",
            "description": "json = Apify dataset (default). ndjson / csv / xlsx / md = streamed to key-value store as output.ndjson / output.csv / output.xlsx / output.md. Pick `md` for an LLM-ready Markdown bundle.",
            "default": "json"
          },
          "includeMarkdown": {
            "title": "Include AI-friendly Markdown (default ON)",
            "type": "boolean",
            "description": "When enabled, every dataset row carries a `markdown` field alongside the JSON `payload` — ready to paste straight into an LLM prompt. Turn off to keep rows lean for spreadsheet / ETL workflows.",
            "default": true
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional proxy for orgs whose egress firewall blocks api.company-information.service.gov.uk. Default OFF — CH ToS does not require proxying.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}