UK vehicle data API for Python
Look up any UK registration and get the DVLA record and full DVSA MOT history in one call, with mileage checks, an estimated ULEZ status and MOT and tax countdowns.
from uk_vehicle_data import VehicleData
api = VehicleData() # reads VARDIC_API_KEY
v = api.lookup("AB12 CDE")["data"]
print(v["make"], v["model"], v["colour"], v["fuelType"])
print("MOT expires", v["mot"]["expiryDate"], f'({v["mot"]["daysUntilExpiry"]} days)')
print("Tax", v["tax"]["status"], v["tax"]["dueDate"])
print("ULEZ (estimate)", (v["cleanAirZone"] or {}).get("result"))
for a in v["mileage"]["anomalies"]:
print(a["type"], a["detail"])
Install
pip install vardic-uk-vehicle-data
Python 3.9+, standard library only.
What you get
- Vehicle record from the DVLA: make, colour, fuel, engine size, CO2, Euro status, first registration, tax status and due date.
- MOT history from the DVSA: every test with result, mileage, expiry and defects.
- Mileage checks: readings over time, average miles a year and anomalies such as a reading that went down.
- Clean air zone estimate:
likely_compliant,likely_non_compliant,uncertainorunknown, with the basis for it. - Bulk lookups (
bulk): up to 25 registrations in one call. - Expiry webhooks (
watch): signed events before MOT or tax runs out, and when a new MOT test is recorded.
Sandbox key
Every account gets a vd_test_ key as well as a live key. It returns made-up data for any registration and is never counted. ZZ99ZZZ returns vehicle_not_found and TL12OLD returns an old diesel whose mileage went down.
Webhooks
api.watch("AB12CDE", "https://example.com/hooks/vardic", days_before=[30, 7, 1])
from uk_vehicle_data 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 vehicle_not_found (404), quota_exceeded (429) or upstream_unavailable (503). Calls that fail with 503 are not counted.
Pricing
Free plan: 100 lookups a month, no card needed. Paid plans start at £59 a month for 2,000 lookups. See https://vardic.dev/pricing
Links
- Get a free key: https://vardic.dev/signup
- API docs: https://vardic.dev/docs/vehicle
- JavaScript client: https://github.com/vardic-dev/uk-vehicle-data-js
- Examples: examples/
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- Security: SECURITY.md
Data
Contains public sector information licensed under the Open Government Licence v3.0. Not affiliated with or endorsed by the DVLA or DVSA. Clean air zone results are estimates: check the official TfL or GOV.UK vehicle checker before relying on one.
Licence
MIT. Made by Vardic.
Metadata
Release files for vardic-uk-vehicle-data 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| vardic_uk_vehicle_data-1.0.2.tar.gz | 12.4 kB | Without provenance | Details for vardic_uk_vehicle_data-1.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| vardic_uk_vehicle_data-1.0.2-py3-none-any.whl | Python 3 | none | any | Details for vardic_uk_vehicle_data-1.0.2-py3-none-any.whl |
Total release size: 18.3 kB
Release files / vardic_uk_vehicle_data-1.0.2.tar.gz
| Download URL | vardic_uk_vehicle_data-1.0.2.tar.gz |
|---|---|
| Size | 12.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d2fccc5eb2baa3299672cabc0ed29edb3cfd95c7983506d07ab18ebe89b3aa4f
|
|
BLAKE2b-256 checksum How to use checksums |
77325d7980d5dfa4a5184c3b42d1e57fa16f2b98ca6dd1d5938fb54aeca220dc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.15.2
|
Release files / vardic_uk_vehicle_data-1.0.2-py3-none-any.whl
| Download URL | vardic_uk_vehicle_data-1.0.2-py3-none-any.whl |
|---|---|
| Size | 5.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4ad74ce57e8084889e42741f2c6587a821b1cc00e753e66b944b153dbff0d85d
|
|
BLAKE2b-256 checksum How to use checksums |
51c70a08e3dc535845fba82cacce4169ae8e46df97f0ae7713b37f21475221e4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.15.2
|
Security for vardic-uk-vehicle-data 1.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.