{
  "openapi": "3.0.1",
  "info": {
    "title": "Company Registry Lookup: UK Companies House and LEI Data",
    "description": "Look up, search, match and monitor legal entities: every live UK company (Companies House) and every LEI worldwide in one English schema. Lookup by number or LEI, name search, name matching with a score, weekly change feed. Legal persons only. API and AI-agent (MCP) ready.",
    "version": "0.1",
    "x-build-id": "0Khp31h7WYXBaS9zv"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/pracadata~company-registry-lookup/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-pracadata-company-registry-lookup",
        "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/pracadata~company-registry-lookup/runs": {
      "post": {
        "operationId": "runs-sync-pracadata-company-registry-lookup",
        "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/pracadata~company-registry-lookup/run-sync": {
      "post": {
        "operationId": "run-sync-pracadata-company-registry-lookup",
        "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": [
              "lookup",
              "search",
              "filter",
              "match",
              "changes"
            ],
            "type": "string",
            "description": "What to do. `lookup`: return the entity for each ID in `ids` (UK company number, LEI or `entity_uid`). `search`: entities whose name is similar to each text in `names`, best first. `filter`: every entity that matches the filters below (at least one filter is required (it does not take a list of IDs: use `lookup` for that)). `match`: for each name in `names`, the single best candidate with `match_score`, or nothing if no candidate reaches `min_score`. `changes`: rows of the change feed since `changes_since`. Default: lookup.",
            "default": "lookup"
          },
          "ids": {
            "title": "IDs",
            "type": "array",
            "description": "`lookup` only. UK company numbers (8 characters; `445790` is padded to `00445790`; Scottish `SC…`, Northern Irish `NI…`, LLP `OC…` and others as printed), LEIs (20 characters) or `entity_uid` values (`GB-CH:00445790`, `LEI:HWUPKR0MPOU8FGXBT394`). Up to 1,000 per run. An LEI linked to a UK company returns the UK row with the LEI filled in. IDs that are not found are listed in `RUN_SUMMARY.not_found` and are not charged. To get entities by criteria instead of by ID, use `filter` (which does not take a list of IDs).",
            "items": {
              "type": "string"
            },
            "default": [
              "00445790",
              "00102498",
              "HWUPKR0MPOU8FGXBT394"
            ]
          },
          "names": {
            "title": "Names",
            "type": "array",
            "description": "`search` and `match` only. Company names as you have them (`Tesco plc`, `BP P.L.C.`, `apple inc`). Case, punctuation and common legal suffixes (Ltd, Limited, PLC, Inc, LLP, GmbH, SA…) are normalised before comparing. Up to 1,000 names per run.",
            "items": {
              "type": "string"
            }
          },
          "countries": {
            "title": "Countries",
            "type": "array",
            "description": "Optional, every mode except `lookup`. Two-letter ISO country codes of the registry or jurisdiction (`GB`, `US`, `DE`…). For LEI records it is the country of the legal jurisdiction.",
            "items": {
              "type": "string"
            }
          },
          "status": {
            "title": "Status",
            "type": "array",
            "description": "Optional, `search`, `match` and `filter`. `active`, `inactive`, `in_liquidation`, `in_administration`, `dissolved`, `unknown`. UK rows are live companies by definition (dissolved UK companies leave the source file).",
            "items": {
              "type": "string",
              "enum": [
                "active",
                "inactive",
                "in_liquidation",
                "in_administration",
                "dissolved",
                "unknown"
              ]
            }
          },
          "nace_prefix": {
            "title": "Industry (NACE Rev. 2 prefix)",
            "type": "string",
            "description": "Optional, UK companies only. NACE Rev. 2 code or prefix, with or without the dot: `62` (computer programming and consultancy), `62.01`, `6201`. Derived from the company's first UK SIC 2007 code."
          },
          "legal_form_elf": {
            "title": "Legal form (ISO 20275 ELF code)",
            "type": "array",
            "description": "Optional. ISO 20275 Entity Legal Form codes, for example `H0PO` (UK private limited company). See the README for how UK company categories map to ELF codes.",
            "items": {
              "type": "string"
            }
          },
          "incorporated_from": {
            "title": "Incorporated from",
            "type": "string",
            "description": "Optional. Only entities incorporated (created) on or after this date, YYYY-MM-DD."
          },
          "incorporated_to": {
            "title": "Incorporated to",
            "type": "string",
            "description": "Optional. Only entities incorporated on or before this date, YYYY-MM-DD (inclusive)."
          },
          "only_with_lei": {
            "title": "Only entities with an LEI",
            "type": "boolean",
            "description": "If true, return only entities that have an LEI. Default: false.",
            "default": false
          },
          "min_score": {
            "title": "Minimum name score",
            "minimum": 0.5,
            "maximum": 1,
            "type": "number",
            "description": "`search` and `match` only. Similarity between 0 and 1 (Jaro-Winkler on the normalised name, plus token overlap). Candidates below it are not returned and not charged. Default 0.9; 0.85 finds more, with more false positives.",
            "default": 0.9
          },
          "search_limit": {
            "title": "Results per name (search)",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "`search` only. Maximum candidates returned per name, best first. Default 5.",
            "default": 5
          },
          "changes_since": {
            "title": "Changes since",
            "type": "string",
            "description": "`changes` only. First week (YYYY-MM-DD; moved back to its Monday). Default: the latest week in the data."
          },
          "change_types": {
            "title": "Change types",
            "type": "array",
            "description": "`changes` only. Any of `new`, `removed_from_source`, `status_change`, `renamed`, `legal_form_change`, `industry_change`, `seat_city_change`, `lei_linked`, `lei_lapsed`. No value means all.",
            "items": {
              "type": "string",
              "enum": [
                "new",
                "removed_from_source",
                "status_change",
                "renamed",
                "legal_form_change",
                "industry_change",
                "seat_city_change",
                "lei_linked",
                "lei_lapsed"
              ]
            }
          },
          "max_rows": {
            "title": "Maximum rows",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Maximum number of rows returned (1 to 100,000; default 1,000). Rows are charged one by one, so this is also your cost cap. If more rows match, the rest is not returned and `RUN_SUMMARY.capped_by_max_rows` is true. `filter` can return up to 100,000 rows per run, so the whole registry is reachable here; run it again with narrower filters (country, status, industry, incorporation date) to page through a bigger result.",
            "default": 1000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}