Skip to content

maxmekiska/CompaniesHouse_API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CompaniesHouse API Wrapper

This code serves as a wrapper to interface with the Companies House API. Please create an API key to use this wrappers functionalities. You can crate an API key by following the official instructions: https://developer.company-information.service.gov.uk/get-started

Feel free to use the Jupyter Notebook "API prod.ipynb" as an interface.

Launch virtual Jupyter Notebook

badge

Creating a CHouse object

To interface with the companies house API, a CHouse object needs to be created. This is possible by passing a valid API key string into the CHouse class.

After a successful object creation, it is possible to filter companies after their SIC codes and current status (active, inactive). This filter and extraction process is done via the filter_sic(sic_code, status, start index) method. Please note that the start index determines where the extraction process should begin. If all filter specified companies shall be extracted, please set the start index to 0.

CHouse object creation

Creating a company location Map

The filtered data can be enriched with the geographical location of the different companies. This can be achieved by calling the method create_map(data, display map). The second argument of the method allows the user to specify if the map shall be instantly rendered within a Jupyter Notebook. Please note that the map will be saved within an CompanyMap.html file if the second argument is set to False.

Enrich geo location

Enrich geo location 2

Enriching data with significant owner

The method enrich_founder(data) will add information to the existing data by retrieving all owners with significant control based on the company id.

Retrieve company filings

The method retrieve_filings(company id) will retrieve the latest company filings based on the passed in company id.

Company filings

Saving data in a .xlsx file

You can save your retrieved data anytime as an xlsx file by using the export_excel(data) method. The file generated will be named as follows: CompaniesExport.xlsx

Releases

No releases published

Packages

No packages published