npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@companieshouse/api-sdk-node

v2.0.358

Published

This SDK abstract the calls to our public APIs.

Readme

Companies House SDK (Node)

This SDK abstract the calls to our public APIs.

Intended for use when making cross-web-service calls, supporting ERIC and the propagation of authentication details through to other services.

Compatible Node versions

This package has been upgraded to be compatible with Node v24. Presently, it's backward compatible with v20 and v18 but compatibility is primarily required for v24 as all CH Node services are in the process of being upgraded to v24.

Quick start

Use NPM to install the SDK in your project;

npm i @companieshouse/api-sdk-node

Note that this install may need to be run with the 'sudo' command to avoid an error related to file permissions (and Sophos virus scanning).

The following snippet shows how to get up and running quickly using TypeScript.


import {createApiClient} from "@companieshouse/api-sdk-node";

(async () => {
    const api = createApiClient("your-api-key");
    const profile = await api.companyProfile.getCompanyProfile("00006400");

    console.log(profile);
})()

There is an alternative way of calling some of the services, which forces you to check for errors. It borrows concepts from the Either class found in functional programming.


import {createApiClient} from "@companieshouse/api-sdk-node";

(async () => {
    const api = createApiClient("your-api-key");
    const orderResult = await api.companyProfile.getOrder("an-existing-order-id");

    if(orderResult.isFailure()) {
        const errorResponse = orderResult.value;
        console.log(errorResponse);
    } else {
        const order = orderResult.value;
        console.log(order);
    }

})()

Development

Once you have made changes to the library, you must validate against a service in Docker before merging your PR into main. Follow the guidance on the Validating Library Changes Confluence page. Reach out to the Common Components teams if you have any questions.

⚠️ Note (Informational Only)

The following instructions are retained for reference purposes only. They relate to testing changes made to this SDK within a local project.

They may no longer work as expected and are not actively maintained or supported.

npm link

From within this directory, run the following command to create a symbolic link in the global node modules directory:

npm link

Then from within your local project, simply link it with the following command

npm link api-sdk-node

Testing

Jest is the framework used in this project and all tests can be run using npm.

npm t

To tun the tests with coverage, pass the --coverage flag on the command line.

npm t -- --coverage

Dependency Overrides

  • [email protected]

    • Reason: Required as a transitive dependency by [email protected], which depends on vulnerable version 6.0.2.
    • Ticket/CVE: CVE-2026-34043
    • Remove after: Remove once Mocha has been upgraded beyond version 11.7.2 (patch or minor release). Ensure proper testing is completed after removal.
  • "uuid": "^11.1.1"

    • Reason: transitive dependency of istanbul-lib-processinfo / nyc
    • Ticket: ASM-2299 ( gulnerability GHSA-w5hq-g745-h8pq )
  • [email protected]

    • Reason: Required as a transitive dependency by @istanbuljs/[email protected], which depends on vulnerable version 3.13.1.
    • Ticket/CVE: CVE-2026-53550 ( vulnerability GHSA-h67p-54hq-rp68 )
    • Remove after: Remove once load-nyc-config has been upgraded beyond version 1.1.0 (patch or minor release). Ensure proper testing is completed after removal.