{
  "openapi": "3.0.1",
  "info": {
    "title": "🇬🇧 UKHawk — UK Companies House Data Scraper",
    "description": "Scrape 5M+ UK companies from Companies House. Get company name, status, incorporation date, SIC codes, registered address, directors, filing dates. Auto-industry classification + risk scoring. For UK B2B, VCs, lawyers, compliance, recruiters. Zero blocks, no API key.",
    "version": "1.1",
    "x-build-id": "RGoIj6jETGgZxqHLp"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/inexhaustible_glass~ukhawk/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-inexhaustible_glass-ukhawk",
        "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/inexhaustible_glass~ukhawk/runs": {
      "post": {
        "operationId": "runs-sync-inexhaustible_glass-ukhawk",
        "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/inexhaustible_glass~ukhawk/run-sync": {
      "post": {
        "operationId": "run-sync-inexhaustible_glass-ukhawk",
        "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": {
          "companyNumbers": {
            "title": "🎯 UK Company Numbers",
            "maxItems": 5000,
            "uniqueItems": true,
            "type": "array",
            "description": "8-digit Companies House numbers. Example: 00445790 (Tesco), 00048839 (Barclays). Leading zeros required.",
            "items": {
              "type": "string"
            }
          },
          "searchQueries": {
            "title": "🔍 Search by Name (optional)",
            "uniqueItems": true,
            "type": "array",
            "description": "Search companies by name keyword. Example: 'tesco', 'barclays'. Returns up to 10 company numbers each.",
            "items": {
              "type": "string"
            }
          },
          "sicCodes": {
            "title": "🏭 SIC Codes — filter by industry (lead-gen)",
            "uniqueItems": true,
            "type": "array",
            "description": "Find ALL companies in an industry by SIC 2007 code. Example: 41100 (development of buildings), 43999 (construction), 62012 (software dev), 68209 (real estate), 96020 (hairdressing). Combine with date + location for targeted leads. Works without an API key.",
            "items": {
              "type": "string"
            }
          },
          "incorporatedFrom": {
            "title": "📅 Incorporated From (new companies)",
            "type": "string",
            "description": "Only companies registered ON or AFTER this date. Format YYYY-MM-DD (e.g. 2026-03-01). 🔑 For precise newest-first results add a free 'apiKey' below — otherwise the date is applied after fetching (slower)."
          },
          "incorporatedTo": {
            "title": "📅 Incorporated To",
            "type": "string",
            "description": "Only companies registered ON or BEFORE this date. Format YYYY-MM-DD."
          },
          "newCompaniesOnly": {
            "title": "🔥 New Companies Only (<90 days)",
            "type": "boolean",
            "description": "Keep only freshly incorporated companies (registered in the last 90 days) — the hottest leads for accountants, banks and B2B services.",
            "default": false
          },
          "includeOfficers": {
            "title": "👥 Include Directors / Officers",
            "type": "boolean",
            "description": "Add every director & officer: name, role, appointed date, correspondence address, nationality, country of residence. (Personal email/phone are NOT published by Companies House — privacy law.)",
            "default": false
          },
          "location": {
            "title": "📍 Location (town / postcode)",
            "type": "string",
            "description": "Filter by registered office location. Example: 'London', 'Manchester', 'SW1A'."
          },
          "nameIncludes": {
            "title": "🔡 Company Name Contains",
            "type": "string",
            "description": "Advanced-search filter — company name must contain this text. Example: 'solar', 'consulting'."
          },
          "companyStatus": {
            "title": "📊 Company Status",
            "uniqueItems": true,
            "type": "array",
            "description": "Filter by status (advanced search). Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "active",
                "dissolved",
                "liquidation",
                "administration",
                "open",
                "closed"
              ],
              "enumTitles": [
                "Active",
                "Dissolved",
                "Liquidation",
                "Administration",
                "Open",
                "Closed"
              ]
            }
          },
          "companyTypes": {
            "title": "🏢 Company Types",
            "uniqueItems": true,
            "type": "array",
            "description": "Filter by type (advanced search). Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "ltd",
                "plc",
                "llp",
                "private-unlimited",
                "community-interest-company"
              ],
              "enumTitles": [
                "Private Limited (Ltd)",
                "Public Limited (PLC)",
                "LLP",
                "Private Unlimited",
                "CIC"
              ]
            }
          },
          "maxResults": {
            "title": "🔢 Max Results",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Cap total companies scraped (for SIC/date sweeps that can match thousands).",
            "default": 100
          },
          "apiKey": {
            "title": "🔑 Companies House API Key (optional, free)",
            "type": "string",
            "description": "Free key from developer.company-information.service.gov.uk → enables TRUE incorporation-date filtering (newest-first). Without it, SIC/location filters still work and dates are applied client-side."
          },
          "concurrency": {
            "title": "⚡ Concurrency",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Parallel requests. UK Companies House is fast and open — you can go higher.",
            "default": 5
          },
          "activeOnly": {
            "title": "🟢 Active Only",
            "type": "boolean",
            "description": "Skip dissolved / liquidated / in-administration companies.",
            "default": false
          },
          "minGrade": {
            "title": "⭐ Minimum Risk Grade",
            "enum": [
              "A",
              "B",
              "C",
              "D"
            ],
            "type": "string",
            "description": "Filter by risk score.",
            "default": "D"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}