Companies House API integration: how to connect company data to your systems
What a Companies House integration usually does
Most integrations do the same four jobs, whether the target is a CRM such as Salesforce or HubSpot, an ERP or an accounts package with a built-in Companies House link:
- Verify a customer or supplier at onboarding. A user types a name or company number; the system confirms the company exists, is active and fills in the registered name, number and registered office address.
- Keep the record current. Status changes (for example from active to "proposal to strike off" or "liquidation"), new directors and a changed address are pulled in automatically instead of being re-keyed.
- Warn about filing deadlines. Accountants and company secretarial tools read the next accounts and confirmation statement due dates for each client company.
- Add risk signals. Outstanding charges, overdue filings, insolvency history and, if available, balance sheet figures feed a credit or KYB score.
The free Companies House public data API covers jobs 1 to 3 well. Job 4 is where its limits show, because it does not return accounts figures as data (details below).
The endpoints you need
All calls go to https://api.company-information.service.gov.uk with your key sent as HTTP Basic authentication: the key is the username and the password is blank. Getting a key takes a few minutes on the Developer Hub (step-by-step guide).
| Job | Endpoint | Returns |
|---|---|---|
| Find a company by name | GET /search/companies?q=... | Matching companies with number, status and address |
| Company record | GET /company/{number} | Name, status, type, incorporation date, SIC codes, registered office, accounts and confirmation statement dates |
| Directors and secretaries | GET /company/{number}/officers | Current and resigned officers with appointment dates |
| Ownership | GET /company/{number}/persons-with-significant-control | PSCs and the nature of their control |
| Charges | GET /company/{number}/charges | Registered charges, outstanding or satisfied |
| Filing history | GET /company/{number}/filing-history | Every filing with type, date and a link to the document |
| Insolvency | GET /company/{number}/insolvency | Insolvency cases and practitioners, if any |
Documents themselves, such as a PDF or iXBRL file of the accounts, come from the separate Document API, using the link in each filing history item.
A minimal lookup in Python
import os, requests
KEY = os.environ["CH_API_KEY"]
BASE = "https://api.company-information.service.gov.uk"
def company(number: str) -> dict:
r = requests.get(f"{BASE}/company/{number}", auth=(KEY, ""), timeout=10)
if r.status_code == 404:
return {}
r.raise_for_status()
c = r.json()
return {
"number": c["company_number"],
"name": c["company_name"],
"status": c["company_status"],
"address": c.get("registered_office_address", {}),
"accounts_due": c.get("accounts", {}).get("next_due"),
"accounts_overdue": c.get("accounts", {}).get("overdue", False),
"cs_due": c.get("confirmation_statement", {}).get("next_due"),
}
print(company("00445790"))
Pad company numbers to eight characters before calling ("445790".zfill(8)), and keep prefixes such as SC, NI or OC as they are (company number formats). A 401 or 403 almost always means the key is wrong, sent the wrong way or created for the sandbox (error guide).
Design the sync before you write it
Store only what you use. Copy the fields your users see and your rules depend on, plus the date you last refreshed them. Do not mirror the whole register through the API: for that, the free monthly bulk files are faster and do not count against the rate limit (bulk data guide).
Respect the rate limit. The documented limit is 600 requests in any five-minute period per key; above that the API returns 429 until the window resets. A full refresh of 10,000 customers with three calls each takes at least 50 minutes, so spread scheduled jobs and back off on 429 (rate limit guide).
Use the Streaming API for change. Instead of polling every record, subscribe to the company profile, officers, PSC, charges and filing history streams and update only the companies you hold (streaming guide). Keep a nightly or weekly check as a safety net, because a stream connection can drop.
Treat status as data, not text. Values such as active, dissolved, liquidation, administration and voluntary-arrangement should drive rules in your system, for example blocking new orders to a dissolved customer. The full list of values is in the company status guide.
Log the source and date. For audit and KYB, store when each field was fetched and from which endpoint. Companies House data is under the Open Government Licence v3.0, which allows commercial reuse with attribution.
Ready-made connectors
Many systems already have a Companies House connector, either built in or from a marketplace: accounts packages, practice management tools for accountants, CRM add-ons and ERP extensions. Before building one, check whether yours does, and which fields it actually keeps in sync: many only fill the name and address at the moment of entry and never refresh them. For automation without code, the same calls work from n8n or Zapier style tools (n8n workflow example).
Accounts figures are the gap
The Companies House API tells you that accounts were filed and links to the document. It does not return turnover, net assets, cash or creditors as numbers. To use those in a credit rule or a dashboard you need to download each iXBRL file and parse the tagged values (how to parse iXBRL in Python), or use a service that has already done it.
Two caveats apply whichever route you take. Paper and image filings have no machine-readable figures, and most small companies file micro-entity or filleted accounts with no profit and loss account, so turnover is missing for the majority of the register (accounts types data). Your integration should treat a missing figure as "not filed", never as zero.
The UK Company Data API returns register fields and parsed balance sheet history in one call, with a free key for testing (quickstart, financial data API). For many integrations the cleanest split is the free Companies House API for live register fields and a parsed source for accounts figures.
Checklist before go-live
- Keys stored in a secrets manager or environment variable, never in client-side code.
- Separate keys for test and production, and for each system that calls the API.
- Retry with backoff on 429 and 5xx, timeouts on every request.
- Company numbers normalised to eight characters with the prefix kept.
- A field showing users when the record was last checked.
- A rule for dissolved and struck-off companies, including what happens to open invoices.
Sources
- Companies House: public data API documentation
- Companies House: API rate limiting
- Companies House: Streaming API
- Open Government Licence v3.0
FAQ
Is the Companies House API free?
Yes. You register on the Companies House Developer Hub, create an application and a key, and pay nothing per call. The limit is 600 requests in any five-minute period per key. Bulk data downloads and the Streaming API are free as well.
How do I integrate Companies House with my CRM?
Use the company number as the key field. At record creation, call the search or company profile endpoint to fill the name, status and registered address, then refresh those fields on a schedule or from the Streaming API. Check first whether your CRM already has a Companies House connector in its marketplace.
Can the Companies House API return company financial data?
Not as figures. It lists accounts filings and links to the documents. To get net assets, cash or creditors as numbers you need to parse the iXBRL accounts yourself or use an API that returns parsed balance sheet data, such as UK Company Data.
What is the difference between the Companies House API and bulk data?
The API answers questions about one company at a time and is current within minutes. Bulk data is a monthly snapshot of every company, plus daily and monthly accounts files, and is the right choice for analysing or loading the whole register.
Why does the Companies House API return 401 or 403?
Usually the key is sent incorrectly: it must be the Basic auth username with an empty password. Other common causes are a sandbox key used on the live host, a stream key used for REST calls, or a key restricted to other IP addresses or domains.
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