Developers

How to get a Companies House API key and make your first call

Updated By
Short answerTo get a Companies House API key, register on the Companies House Developer Hub, create a test or live application, then select Create new key and choose API key as the client type. The key is free. Send it as HTTP Basic auth with a blank password; the limit is 600 requests per five minutes.

What you need before you start

The Companies House API is free, and the only requirement is a Companies House user account. The government API catalogue describes it as providing "access to all of the public data we hold on companies free of charge": company profiles, officers, persons with significant control, charges, insolvency and filing history, returned as JSON.

You will need:

  • an email address for the Developer Hub account;
  • the outgoing IP address of the server that will call the API, if you want to restrict the key (recommended);
  • curl, or any language with an HTTP client.

Step 1: register on the Developer Hub

Go to the Companies House Developer Hub and choose Sign in / Register. The get started page is explicit: "You must register a user account with Companies House to explore and perform tests with the Companies House API." Confirm your email and sign in.

Step 2: create an application

An application is a container for your keys, and you pick its environment when you create it. Following the Developer Hub application guide:

  1. Select create an application.
  2. Give the application a name and a description.
  3. Choose the environment: a test application for the sandbox, or a live application for production.
  4. Optionally add links to your privacy policy and terms.
  5. Select Create.

Test and live applications are separate. A key from a test application works only on the sandbox host, api-sandbox.company-information.service.gov.uk, and a live key only on api.company-information.service.gov.uk. The Companies House API testing page says the sandbox does not accept live API clients, and mixing them up is one of the commonest causes of a 401.

From Developer Hub account to first Companies House API request COMPANIES HOUSE API KEY Four steps to a working request STEP 1 Register User account on the Developer Hub, free STEP 2 Application Name, description, test or live STEP 3 Create new key Client type: API key for REST STEP 4 Call the API Basic auth, key as user, blank password ENVIRONMENT DECIDES THE HOST Liveapi.company-information.service.gov.uk Testapi-sandbox.company-information... THREE CLIENT TYPES, NOT INTERCHANGEABLE API key REST API Stream key Streaming OAuth web client user sign-in services curl -u "$CH_API_KEY:" https://api.company-information.service.gov.uk/company/00445790 Limit: 600 requests per 5 minutes, then 429 Too Many Requests until the window resets Source: Companies House Developer Hub and API guides, checked 31 October 2026
From a Developer Hub account to a working request: application, key type, environment and the Basic auth header.

Step 3: create the key

Open the application, select Create new key, give the key a name and choose the client type. There are three types:

Client typeUse it forHost
API keyThe REST API: company profile, officers, PSCs, charges, filing history, searchapi.company-information.service.gov.uk
Stream keyThe Streaming API, a live feed of changes to the registerstream.companieshouse.gov.uk
OAuth web clientServices where a company user signs in and authorises you, such as filingOAuth endpoints

For reading public data, choose API key. When you create it you can fill in optional Restricted IPs and JavaScript domains. Companies House recommends restricting keys by IP in its developer guidelines, but the list must match your real egress address: a mismatch returns 403, and changes take about 10 minutes to apply. If you also need the change feed, create a separate stream key; REST and stream keys are not interchangeable. Our Streaming API guide covers that route.

Step 4: make your first request

Companies House uses HTTP Basic authentication, with the API key as the username and a blank password. That is how the authorisation guide describes it.

export CH_API_KEY="your-key-here"
curl -u "$CH_API_KEY:" https://api.company-information.service.gov.uk/company/00445790

The trailing colon tells curl the password is empty. The response is the company profile for TESCO PLC, trimmed here:

{
  "company_name": "TESCO PLC",
  "company_number": "00445790",
  "company_status": "active",
  "type": "plc",
  "registered_office_address": { "...": "..." },
  "sic_codes": ["..."],
  "links": { "filing_history": "/company/00445790/filing-history" }
}

In Python, set session.auth = (key, ""). In JavaScript, send the header Authorization: Basic followed by base64 of the key plus a colon. Do not base64 the key and then add the colon, and do not send it as a Bearer token: both return 401. Working Python and JavaScript versions are in our guide to Companies House API 401 and 403 errors.

Rate limit: 600 requests per five minutes

The Companies House rate limiting guide says: "You can make up to 600 requests within a five-minute period." Above that, every request gets 429 Too Many Requests until the window resets, and applications that regularly exceed or try to bypass the limit can be banned. We checked the page on 31 October 2026.

Six hundred requests is enough to look up a few companies at a time, but not to walk the register. Fetching the profile, officers and filing history of 10,000 companies takes 30,000 requests, which is at least 250 minutes at full speed. For bulk work use the free monthly register file and the daily accounts files instead; see Companies House bulk data and rate limits in practice.

Test or live: which to use

Use a test application while you build, and a live application for real data. The sandbox lets you try requests and filing flows without touching the real register, but its data is test data. For reading public company information you can go straight to a live key, because the read-only endpoints cannot change anything.

Keep the base URL and the key in the same configuration entry, so a test key is never sent to the live host or the other way round. Keep the key on your server: a key shipped in browser code can be read by anyone who opens the page.

What the Companies House API does not give you

The official API returns accounts as documents, not as numbers. The filing history tells you that accounts were filed and links to the Document API, but there is no net_assets or turnover field. To get figures you download each document and parse the iXBRL, and about 30% of active companies have no machine-readable accounts at all.

Our API adds that layer. We parse the accounts once, about 35 million iXBRL filings from 2008 to 2026 covering about 7 million companies, and return balance sheet history as JSON next to the register record. It uses a Bearer token, not Basic auth, so the two keys cannot be confused. Field coverage is in Companies House financial data as JSON, and the quickstart gets you from key to first call in five minutes. A free key with 50 requests a month is on the developer docs page.

Planning a CRM, ERP or accounts system link? The Companies House API integration guide covers endpoints, sync design and where accounts figures come from.

Sources

FAQ

Is the Companies House API free?

Yes. The Companies House API gives access to the public data it holds on companies free of charge. You need a free user account on the Developer Hub to create an application and a key. The limit is 600 requests per five minutes per key; above that, requests return 429 until the window resets.

How do I get a Companies House API key?

Register on the Companies House Developer Hub, create an application and choose test or live, then open it, select Create new key, give it a name and choose API key as the client type. The key appears in the application. Use it as the username in HTTP Basic authentication with an empty password.

Why does my new Companies House API key return 401?

Usually the header is wrong or the key is used on the wrong host. Send the key as Basic auth with a colon and empty password, not as a Bearer token. A test key works only on the sandbox host and a live key only on the live host. A REST key will not work on the Streaming API, which needs a stream key.

How long does a Companies House API key take to work?

Companies House does not publish an activation delay for new keys. If you change the Restricted IPs on a key, Companies House staff have said on the developer forum that there is a caching period of about 10 minutes, so wait before retesting. A 403 straight after creating a key usually means the restricted IP list does not match your server.

Try it with a free key. 50 requests a month, REST and MCP, no card. Company register, iXBRL financial history since 2008 and watchlist alerts.

Get a free API key