Metadata-Version: 2.4
Name: vardic-uk-business-check
Version: 1.1.2
Summary: UK business check API client: Companies House status and filings, charity status and EORI checks in one call, with risk flags.
Author-email: Vardic <hello@vardic.dev>
Maintainer-email: Vardic <hello@vardic.dev>
License: MIT
Project-URL: Homepage, https://vardic.dev/business
Project-URL: Documentation, https://vardic.dev/docs/business
Project-URL: Source, https://github.com/vardic-dev/uk-business-check-python
Project-URL: Issues, https://github.com/vardic-dev/uk-business-check-python/issues
Project-URL: Changelog, https://github.com/vardic-dev/uk-business-check-python/blob/main/CHANGELOG.md
Keywords: companies-house,company-check,kyb,eori,charity-commission,uk
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Typing :: Typed
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# UK business check API for Python

[![PyPI](https://img.shields.io/pypi/v/vardic-uk-business-check)](https://pypi.org/project/vardic-uk-business-check/) [![CI](https://github.com/vardic-dev/uk-business-check-python/actions/workflows/ci.yml/badge.svg)](https://github.com/vardic-dev/uk-business-check-python/actions/workflows/ci.yml) [![Licence: MIT](https://img.shields.io/badge/licence-MIT-blue.svg)](LICENSE)

Check any UK company with one call: Companies House status, filings and overdue flags, charity status, an optional EORI check, and plain risk flags on top.

```python
from uk_business_check import BusinessCheck

api = BusinessCheck()  # reads VARDIC_API_KEY
c = api.check("00445790")["data"]  # Tesco PLC

print(c["company"]["name"], c["company"]["status"], c["company"]["ageYears"])
print("Accounts overdue:", c["company"]["accounts"]["overdue"])
print("Charity:", (c["charity"] or {}).get("found"))
print("Risk:", c["risk"])
for f in c["flags"]:
    print(f["severity"], f["message"])
```

## Install

```sh
pip install vardic-uk-business-check
```

Python 3.9+, standard library only.

## What you get

- **Company check** (`check`): status, type, age, SIC codes, registered office, accounts and confirmation statement due dates with overdue flags, insolvency and charge flags, the latest filings, and officer and PSC counts. Add `include=["officers", "psc", "charges", "filings"]` for the full lists.
- **Charity status** from the Charity Commission register, matched by company number.
- **EORI check** (`eori`, or `check(number, eori=...)`) for UK (GB) EORI numbers, from HMRC.
- **Search** companies by name (`search`, up to 10 matches).
- **Risk flags**: `risk` is `none`, `low`, `medium` or `high`, with a readable reason for each flag.
- **Watches** (`watch`): signed webhooks when a company's status, filings, charges, officers or risk change, or when it appears in a Gazette insolvency notice.

```python
matches = api.search("tesco")["data"]["items"]
eori = api.eori("GB123456789000")["data"]
print(eori["valid"])
```

UK VAT number checks are not open yet: until they are, `c["vat"]` is `None` and `vat()` raises a 503 that is not counted.

## Sandbox key

Every account gets a `vd_test_` key as well as a live key. It returns made-up data for any company number and is never counted. Number `00000000` returns `company_not_found`.

## Webhooks

```python
api.watch("00445790", "https://example.com/hooks/vardic")

from uk_business_check import verify_webhook
ok = verify_webhook(request.body, request.headers["vardic-signature"], WEBHOOK_SECRET)
```

Watches need a live key. Pass the raw request body as bytes. Event types and payloads: https://vardic.dev/docs/webhooks

## Errors

Failed calls raise `VardicApiError` with `.status` and `.code`, for example `company_not_found` (404), `quota_exceeded` (429) or `upstream_unavailable` (503). Calls that fail with 503 are not counted.

## Pricing

Free plan: 50 checks a month, no card needed. Paid plans start at £29 a month for 1,000 checks. See https://vardic.dev/pricing

## Links

- Get a free key: https://vardic.dev/signup
- API docs: https://vardic.dev/docs/business
- JavaScript client: https://github.com/vardic-dev/uk-business-check-js
- Examples: [examples/](examples/)
- Changelog: [CHANGELOG.md](CHANGELOG.md)
- Contributing: [CONTRIBUTING.md](CONTRIBUTING.md)
- Security: [SECURITY.md](SECURITY.md)

## Data

Contains public sector information licensed under the Open Government Licence v3.0, from Companies House and the Charity Commission. EORI data from HMRC. Not affiliated with or endorsed by Companies House, HMRC or the Charity Commission.

## Licence

MIT. Made by [Vardic](https://vardic.dev).
