CompaniesHouse

Test StatusCoverage StatusHex VersionHex Docs

An Elixir client for the Companies House API.

Installation

The package can be installed by adding companies_house to your list of dependencies in mix.exs:

def deps do
[
{:companies_house, "~> 0.4.0"}
]
end

Usage

Configuration

Add your API key to your application config:

config :companies_house, api_key: "your-api-key"

By default the client targets the sandbox environment. To use the live API:

config :companies_house, environment: :live

Retries

By default no retries are performed. To retry transient failures — including 429 rate-limit and 503 responses, honouring their Retry-After header — set the :retry option, which is passed straight through to Req:

config :companies_house, retry: :safe_transient

Available functions

Company data

Officers

Filing history

Persons with significant control

Charges

UK establishments

Streaming (auto-pagination)

Return values

See the HexDocs for full API reference.

Development

Requirements

Setup

bin/setup
mix setup

bin/setup installs the pre-commit hook tools (actionlint, check-jsonschema, lefthook, markdownlint-cli2) and activates the hooks. mix setup fetches Elixir dependencies.

Common commands

mix test # Run tests
mix credo # Lint
mix format # Format code
mix coveralls # Test coverage

License

CompaniesHouse is released under the MIT license.