# UK MOT History Check (DVSA) (`onibaku/uk-mot-history`) Actor

Full MOT history for UK vehicles by registration or VIN: make, model, every test's result, mileage, expiry date, failures and advisories, plus MOT valid or expired, latest mileage and mileage drops. Bulk lists, no API key needed.

- **URL**: https://apify.com/onibaku/uk-mot-history.md
- **Developed by:** [Onibaku](https://apify.com/onibaku) (community)
- **Categories:** Automation, Business
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 vehicles

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## UK MOT History Check (DVSA)

Paste in **UK registrations (or VINs)** and get each vehicle's **full MOT history** from DVSA's MOT history API:
make, model, colour, fuel, engine size and first-registration date, then **every MOT test** with its date, result,
**mileage**, expiry date and each **failure, defect and advisory** in the tester's own words.

Each row also has the answers you'd otherwise work out by hand: **is the MOT valid right now** and when does it
expire, the latest test result, the **latest mileage**, how many tests it has failed, how many advisories it got
last time, and whether the **mileage has ever gone down** (a classic sign of clocking).

Check one car or 10,000 in a run. No DVSA registration, API key or OAuth set-up needed.

### What it's for

- **Used-car buyers:** before you view a car, see whether the MOT is current, what failed in the past, what the
  tester warned about last time (tyres, brakes, corrosion) and whether the mileage history adds up.
- **Dealers and traders:** check every car in a part-exchange or auction list in one go, spot clocked or
  neglected stock before you bid, and pull the MOT history into your listings.
- **Fleet managers and leasing firms:** run your whole fleet on a schedule and catch MOTs that are about to
  expire or have lapsed, plus the latest recorded mileage for each vehicle.
- **Insurers, finance and valuation:** confirm make, model and mileage against what the customer told you, and
  flag mileage drops and long gaps in testing.
- **Mileage checks:** every recorded odometer reading with its date, and `mileageDrops` listing any reading lower
  than an earlier one.
- **AI agents:** one call answers "has this car got a valid MOT, and what did it fail on?" (see MCP below).

### Input

| Field | What it does |
| --- | --- |
| `registrations` | UK number plates, e.g. `AB12 CDE`. Spaces and case don't matter, and duplicates are looked up once. |
| `vins` | Vehicle identification numbers (chassis numbers), for a vehicle that has changed plates. |
| `oneRowPerTest` | One row per MOT test instead of one row per vehicle. Handy for spreadsheets. |

**Check a few cars:**

```json
{ "registrations": ["AB12 CDE", "XY65 ZZZ"] }
```

**A fleet, one row per test, for a spreadsheet:**

```json
{ "registrations": ["AB12CDE", "XY65ZZZ", "LM19ABC"], "oneRowPerTest": true }
```

Up to 10,000 vehicles per run. For more, split the list across runs.

### Output

One row per vehicle:

```json
{
    "query": "ZZ99ABC",
    "queryType": "registration",
    "found": true,
    "lookupStatus": "found",
    "registration": "ZZ99ABC",
    "make": "FORD",
    "model": "FOCUS",
    "fuelType": "Petrol",
    "primaryColour": "Yellow",
    "engineSizeCc": 1800,
    "firstUsedDate": "2010-11-13",
    "registrationDate": "2010-11-13",
    "manufactureDate": "2010-11-13",
    "manufactureYear": 2010,
    "hasOutstandingRecall": "No",
    "motStatus": "valid",
    "motValid": true,
    "motExpiryDate": "2019-05-21",
    "firstMotDueDate": null,
    "latestTestDate": "2018-05-22",
    "latestTestResult": "PASSED",
    "latestTestAdvisories": 1,
    "latestMileage": 57318,
    "latestMileageUnit": "mi",
    "latestMileageDate": "2018-05-20",
    "totalTests": 4,
    "totalFails": 2,
    "mileageDropped": false,
    "mileageDrops": [],
    "motTests": [
        {
            "testDate": "2018-05-20",
            "completedDate": "2018-05-20T11:28:34.000Z",
            "testResult": "FAILED",
            "expiryDate": null,
            "odometerValue": 57318,
            "odometerUnit": "mi",
            "odometerResultType": "READ",
            "motTestNumber": "741489560458",
            "registrationAtTimeOfTest": "ZZ99ABC",
            "dataSource": "DVSA",
            "location": null,
            "advisoryCount": 2,
            "defects": [
                { "type": "MAJOR", "text": "Nearside Parking brake efficiency below requirements (1.4.2 (a) (i))", "dangerous": false },
                { "type": "ADVISORY", "text": "Front Tyre worn close to legal limit/worn on edge (5.2.3 (e))", "dangerous": false }
            ]
        }
    ],
    "source": "Contains public sector information licensed under the Open Government Licence v3.0."
}
```

- `motStatus` is `valid`, `expired`, `not-yet-due` (a new vehicle before its first MOT; `firstMotDueDate` says
  when) or `unknown`. `motValid` is the same as true or false.
- Tests are newest first. Defect `type` is DVSA's: `ADVISORY`, `MINOR`, `MAJOR`, `DANGEROUS`, `FAIL` (mostly
  tests before the 20 May 2018 rule change), `NON SPECIFIC`, `SYSTEM GENERATED` or `USER ENTERED`.
- `mileageDrops` lists each reading lower than the highest one before it, with both dates and readings. That can
  mean clocking, but also a replaced odometer, a miles/km mix-up or a typo at the test centre, so treat it as a
  reason to ask questions.
- `hasOutstandingRecall` comes from DVSA's recalls service: `Yes`, `No`, `Unknown` or `Unavailable`.

With `oneRowPerTest`, each row is one test with the vehicle's main details repeated (registration, make, model,
fuel, colour, MOT status and expiry). A vehicle with no tests yet gets a single row with the test fields empty.

**Vehicles that aren't found** still get a row, so you can match results to your list: `found: false`, a
`lookupStatus` of `not-found` (DVSA has no record), `invalid` (not a valid registration or VIN) or `failed` (the
lookup errored), and an `error` saying why. **These rows are free.**

### Pricing

**$0.003 per vehicle found**, plus a token $0.00005 per run. 1,000 vehicles cost $3. Registrations DVSA doesn't
know, invalid entries and failed lookups aren't charged. With `oneRowPerTest`, you still pay once per vehicle,
however many tests it has.

### Good to know

- Covers cars, vans, motorcycles and heavy vehicles tested in Great Britain, plus tests from Northern Ireland's
  DVA (`dataSource`). HGV and bus annual tests come from DVSA's commercial vehicle service and include the test
  station in `location`.
- Only passed and failed tests are listed. Abandoned and aborted tests aren't in DVSA's API.
- `motValid` is worked out from the test records and today's date in the UK. Some vehicles don't need an MOT at
  all (for example many over 40 years old), and their status will show as `expired` or `unknown`.
- Mileages are as recorded at each test, in miles (`mi`) or kilometres (`km`). An unreadable odometer shows as
  `null` with `odometerResultType` `UNREADABLE` or `NO_ODOMETER`.
- **No keeper or personal data.** The API only has vehicle and test details: no owner names, addresses or
  previous keepers, and no finance, write-off or theft markers.
- This actor isn't affiliated with or endorsed by the Driver and Vehicle Standards Agency (DVSA) or the DVLA.

### Use it from Claude, ChatGPT or Cursor (MCP)

AI assistants can call this actor as a tool through Apify's MCP server. Add this server URL to your MCP client and
sign in with your Apify account when prompted:

```
https://mcp.apify.com?tools=onibaku/uk-mot-history
```

Then ask things like "Check the MOT history for AB12 CDE: is the MOT valid, and has the mileage ever gone down?"

### Data source

DVSA's [MOT history API](https://documentation.history.mot.api.gov.uk/), the same data as the GOV.UK "check the
MOT history of a vehicle" service. Contains public sector information licensed under the
[Open Government Licence v3.0](https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/).

Questions or feature requests? Open an issue on the actor's Issues tab or email admin@onibaku.co.uk.

# Actor input Schema

## `registrations` (type: `array`):

UK number plates, e.g. AB12 CDE or ab12cde. Spaces and case don't matter, and duplicates are looked up once. Up to 10,000 vehicles per run.

## `vins` (type: `array`):

Vehicle identification numbers, usually 17 characters. Useful for a vehicle that has changed its registration.

## `oneRowPerTest` (type: `boolean`):

Return each MOT test as its own row, with the vehicle's details repeated, instead of one row per vehicle with a motTests list. Handy for spreadsheets. You're still charged once per vehicle.

## Actor input object example

```json
{
  "registrations": [
    "MV15DHL"
  ],
  "oneRowPerTest": false
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

## `results` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "registrations": [
        "MV15DHL"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("onibaku/uk-mot-history").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "registrations": ["MV15DHL"] }

# Run the Actor and wait for it to finish
run = client.actor("onibaku/uk-mot-history").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "registrations": [
    "MV15DHL"
  ]
}' |
apify call onibaku/uk-mot-history --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,onibaku/uk-mot-history"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/TiPKTIts7L80WtQjH/builds/Yhs5mXVTryeimeINm/openapi.json
