PHPackages                             dljfield/companies-house - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. dljfield/companies-house

ActiveLibrary[API Development](/categories/api)

dljfield/companies-house
========================

Client to interact with Companies House API

v0.1.4(9y ago)064MITPHP

Since Mar 2Pushed 9y agoCompare

[ Source](https://github.com/dljfield/companies-house)[ Packagist](https://packagist.org/packages/dljfield/companies-house)[ RSS](/packages/dljfield-companies-house/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (5)Dependencies (1)Versions (6)Used By (0)

Companies House API Client
==========================

[](#companies-house-api-client)

A simple API client for the [Companies House API](https://developer.companieshouse.gov.uk/api/docs/index.html).

Installation
------------

[](#installation)

This client can be installed with Composer:

```
composer require dljfield/companies-house

```

Endpoints
---------

[](#endpoints)

This client currently has at least partial support for the following endpoints of the Companies House API:

- [Company Profile](https://developer.companieshouse.gov.uk/api/docs/company/company_number/company_number.html)
- [Officer List](https://developer.companieshouse.gov.uk/api/docs/company/company_number/officers/officers.html)
- [Filing History List](https://developer.companieshouse.gov.uk/api/docs/company/company_number/filing-history/getFilingHistoryList.html)
- [Persons With Significant Control List](https://developer.companieshouse.gov.uk/api/docs/company/company_number/persons-with-significant-control/listPersonsWithSignificantControl.html)
- [Company Search](https://developer.companieshouse.gov.uk/api/docs/search/companies/companysearch.html)
- [Document Meta](https://developer.companieshouse.gov.uk/document/docs/document/id/fetchDocumentMeta.html)
- [Document Contents](https://developer.companieshouse.gov.uk/document/docs/document/id/content/fetchDocument.html)

Usage
-----

[](#usage)

To use the client, you must create an instance of `DLJField\CompaniesHouse\Client`, passing your Companies House API key into the constructor.

### Responses

[](#responses)

All endpoints return a named class as a response.

Except for the `DocumentContents` type, these classes are simple data objects that contain the response contents of the API call. As such, you can iterate over them and access them the way you would any other simple data object. e.g.

```
$companyProfile = $companiesHouseClient->getCompanyProfile($companyNumber);

foreach ($companyProfile as $field) {
    echo $field;
}

echo $companyProfile->next_accounts->due_on;

```

`DocumentContents` instead has two fields:

- `$content`
- `$contentLength`

The content should be the file available to stream directly to the browser, e.g.

```
$pdfFile = $companiesHouseClient->getDocumentContents($documentId, DocumentContents::CONTENT_TYPE_PDF);

header("Content-type: application/octet-stream");
header("Content-disposition: attachment;filename=filing-history-document.pdf");

echo $pdfFile->content;
exit;

```

### Exceptions

[](#exceptions)

If an API call fails, an exception will be thrown. As well as a normal exception message, these exceptions hold a `statusCode` parameter, a `reason` parameter and a `contents` parameter. These are the status code of the API response, the reason phrase associated with that status code, and any response body returned from the Companies House API (such as their own errors).

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~13 days

Total

5

Last Release

3306d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/6544682?v=4)[David Field](/maintainers/dljfield)[@dljfield](https://github.com/dljfield)

---

Top Contributors

[![dljfield](https://avatars.githubusercontent.com/u/6544682?v=4)](https://github.com/dljfield "dljfield (12 commits)")

### Embed Badge

![Health badge](/badges/dljfield-companies-house/health.svg)

```
[![Health](https://phpackages.com/badges/dljfield-companies-house/health.svg)](https://phpackages.com/packages/dljfield-companies-house)
```

###  Alternatives

[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[convertkit/convertkitapi

Kit PHP SDK for the Kit API

2167.1k1](/packages/convertkit-convertkitapi)[mapado/rest-client-sdk

Rest Client SDK for hydra API

1125.9k2](/packages/mapado-rest-client-sdk)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
