How to pull UK company data from the official Companies House API

The UK's official company register is public, and Companies House publishes a real-time Public Data API for it. You can look up a company by number, search by name, list directors and people with significant control, and read filing history and charges — all without scraping the website.

This is a short, practical guide to getting a free API key and making your first requests. At the end I also show how I use an Apify actor that I built to handle pagination, rate limits and tidy CSV/JSON export. Disclosure: I work on CleanFeed Data, and that actor is ours. The API itself is free and official, and you can follow everything here with curl alone.

What you'll need

Get a free API key (about two minutes)

These steps match the current Get started and How to create an application pages.

  1. Go to developer.company-information.service.gov.uk and register or sign in.
  2. Create an application. Give it any name and description, and choose Live (a test application only works on the sandbox).
  3. Open the application, click Create new key, and choose the client type API key. The form may still say REST — that is the same type. Do not pick a stream key or an OAuth client unless you need those products.
  4. Copy the key value itself (the long code, not the key's name).

Leave IP restrictions empty unless you know the exact address your requests will come from. A mismatch comes back as HTTP 403.

Companies House authenticates with HTTP Basic auth: the API key is the username, and the password is blank. Rate limits are documented as 600 requests per 5 minutes per key. If you go over, you get HTTP 429 until the window resets.

Your first request

Tesco PLC's company number is 00445790. This call returns the live profile:

curl -u "YOUR_API_KEY:" \ https://api.company-information.service.gov.uk/company/00445790 

The trailing colon tells curl the password is empty. You should see JSON with company_name, company_status, date_of_creation, SIC codes, the registered office and accounts dates.

Useful follow-up paths, all under https://api.company-information.service.gov.uk:

  • /search/companies?q=rolls+royce — company name search
  • /advanced-search/companies?sic_codes=62012&location=Manchester — filter the register
  • /company/00445790/officers — directors, secretaries and other officers of that company
  • /search/officers?q=... — search the officer index by a person's name
  • /officers/{officer_id}/appointments — every company that person is (or was) appointed to
  • /search/disqualified-officers?q=... — the register of disqualified officers
  • /company/00445790/persons-with-significant-control — beneficial owners
  • /company/00445790/filing-history — filings, with a link through to the document page
  • /company/00445790/charges — mortgages and other charges

Officer IDs come from the links object on a search hit or officer list item, typically /officers/{id} or /officers/{id}/appointments.

If you only need one company occasionally, the public website at find-and-update.company-information.service.gov.uk is enough. The API is there for lists, repeats, and combining several endpoints into one table.

Pagination and 429s

List endpoints take items_per_page and start_index (or size / start_index for advanced search). Company name search stops at 1,000 results; advanced search can return up to 10,000. Build a loop, and stop when a page comes back short or you reach total_results.

When you hit HTTP 429, wait until the five-minute window resets rather than retrying immediately. Companies House also publishes X-Ratelimit-* headers on many responses.

Exporting a tidy table (optional)

If you would rather not write the pagination and join-up yourself, the UK Company Data actor on the Apify Store calls only those official endpoints with your key, flattens the JSON into one row type per record (company, officer, psc, filing, charge, officer-search, disqualified-officer), and exports CSV, Excel or JSON. It stays under the 600-request window automatically.

A typical input looks like this (the key stays in Apify's encrypted input and is only sent to Companies House):

{ "apiKey": "YOUR_COMPANIES_HOUSE_API_KEY", "companyNumbers": ["00445790"], "officerQueries": ["Ken Murphy"], "includeOfficerAppointments": true, "includePsc": true, "includeFilingHistory": true } 

companyNumbers accepts a list, so you can enrich a spreadsheet of company numbers in one run. officerQueries uses the official officer search and, by default, pulls that person's appointments.

Pricing is pay-per-result, currently $0.005 to start a run and $1.50 per 1,000 company profiles (related rows are less). The Apify free plan includes $5 of usage each month, which is enough to try this. I built this actor; it is not affiliated with or endorsed by Companies House.

Using the data legally

Companies House imposes no rules or requirements on how information on the public register is used, except that you may not reproduce the Crown insignia. You remain responsible for data protection and other law. Officer, owner (PSC) and disqualified-officer records include personal data, so if you store them you are a controller under UK GDPR and the Data Protection Act 2018. Do not use them for unlawful direct marketing.

The register is not licensed under the Open Government Licence. OGL v3.0 covers Companies House's own guidance, website material, publications and statistical tables, not the register itself.

Further reading