Socket
Socket
Sign inDemoInstall

companies-house-api-es6

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

companies-house-api-es6

This service will do a companies house lookup for a registered UK company


Version published
Weekly downloads
58
decreased by-19.44%
Maintainers
1
Weekly downloads
 
Created
Source

Companies House

An ES6 Node.js library for the Companies House BETA API

Installation instructions

Run npm install --save companies-house-api

Usage

First you will need to create an account on companies house and get an API Key

Then you will need to include the library

const CHA = require('companies-house-api');
const cha = new CHA('YOUR_API_KEY');

Search Methods

/**
 * This method performs a request to Companies House to search for a company by ID
 * @param id
 * @returns {Promise}
*/
cha.searchForCompanyById(companyID).then(result => {
	console.log(result);
}).catch(err => {
	console.log(err);
});

/**
 * This method performs a request to Companies House to search for a company by a generic search term. You can add an optional item count by overloading the function with the desired total, default is 10
 * @param q
 * @param itemCount? Optional
 * @returns {Promise}
*/
cha.searchForCompanyByGenericTerm(query).then(result => {
	console.log(result);
}).catch(err => {
	console.log(err);
});

/**
 * This method performs a request to Companies House to search across all indexed items by a generic search term. You can add an optional item count by overloading the function with the desired total, default is 10
 * @param q
 * @returns {Promise}
*/
cha.searchAll(query).then(result => {
	console.log(result);
}).catch(err => {
	console.log(err);
});

/**
 * This method performs a request to Companies House to search for company officers by a generic search term. You can add an optional item count by overloading the function with the desired total, default is 10
 * @param q
 * @returns {Promise}
*/
cha.searchForOfficer(query).then(result => {
	console.log(result);
}).catch(err => {
	console.log(err);
});

/**
 * This method performs a request to Companies House to search for disqualified officers by a generic search term. You can add an optional item count by overloading the function with the desired total, default is 10
 * @param q
 * @returns {Promise}
*/
cha.searchForDisqualifiedOfficer(query).then(result => {
	console.log(result);
}).catch(err => {
	console.log(err);
});

FAQs

Package last updated on 20 May 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc