Skip to content

Getting Started

Terminal window
npm install @jxdltd/companies-house

Requires Node.js 22.18 or later. The SDK authenticates with your API key, so use it server-side only; never ship the key to a browser.

Get a REST API key from the Companies House developer hub. Register an application and create a live key for the Public Data API.

import { createCompaniesHouseClient } from "@jxdltd/companies-house";
const ch = createCompaniesHouseClient({ apiKey: process.env.CH_API_KEY! });
const { data } = await ch.getCompanyProfile({
path: { company_number: "00445790" },
});
console.log(data?.company_name); // "TESCO PLC"

Every endpoint is a method on the client, including search:

const { data } = await ch.searchCompanies({
query: { q: "lego", items_per_page: 10 },
});

Browse every endpoint, parameter, and response shape in the API Reference.