Registrum · Guides · Updated 15 October 2026

How to get a Companies House API key, step by step

The Companies House API is free to use and needs a key on every request. The steps below follow the developer hub as it reads on 15 October 2026, and the final call was run against the live API.

1. Register a Companies House user account

The get started page says you "must register a user account with Companies House to explore and perform tests with the Companies House API". Use the Sign in / Register link at the top of the developer hub.

2. Create an application

Per how to create an application: sign in, then choose Create an application. Give it a name and description, and choose whether it is a test application for the sandbox or a live application for production. The privacy policy and terms URLs are optional. Select Create.

Real company data comes from the live environment. The sandbox is for testing filing and OAuth, runs on a different host, and needs its own keys (API testing). To read public company data, create a live application.

3. Create the key

Open the application and select Create new key. Name the key and choose the client type. There are three:

  • API key: for the REST API (company profiles, officers, filings, search). This is the one most people want.
  • stream key: for the streaming API, which pushes changes as they happen.
  • OAuth web client: a client ID and secret for acting on behalf of a Companies House user, for example filing. Not a key for reading public data.

The keys are not interchangeable: a stream key sent to the REST API was refused with a 401 when we tried it. Select Create and the credentials are generated.

4. Make your first call

Send the key as the HTTP Basic username with an empty password. Company 00000006 is a real record, so a 200 and a company name confirm the key works.

bash
export CH_API_KEY="paste-your-key-here"
curl -u "$CH_API_KEY:" https://api.company-information.service.gov.uk/company/00000006
python
import os
import requests

r = requests.get(
    "https://api.company-information.service.gov.uk/company/00000006",
    auth=(os.environ["CH_API_KEY"], ""),
    timeout=10,
)
r.raise_for_status()
print(r.json()["company_name"])

With the Python client (companies-house on PyPI) the first call is the same request with the Basic auth header built for you:

python
import os
from companies_house import CompaniesHouse   # pip install companies-house

ch = CompaniesHouse(os.environ["CH_API_KEY"])
print(ch.company("445790")["company_name"])  # TESCO PLC
print(ch.rate_limit.remaining, "requests left in this window")

A 401 or 400 here means something in the request is off, and the response header Ch-Authentication-Error says what. See Companies House API key not working.

5. Keep the key safe

The developer guidelines recommend: do not embed keys in code, do not keep key files inside the source tree, use environment variables or configuration, restrict a key to a specific IP address or domain, regenerate keys regularly, and delete keys you no longer use. Reading the key from an environment variable, as the snippets above do, covers the first two.

6. Know the limit before you build a loop

The documented allowance is 600 requests in a 5-minute window, and higher limits are available on request. The headers to watch and a retry pattern are in the rate-limit guide.

Sources

If you would rather not run your own key

Registrum sits on top of Companies House data and can be queried over MCP with no key and no signup, or with a Registrum API key. It is a fallback, not a replacement for reading the official docs. Start at the quickstart.