In this blog post we look at a small project I was involved in to analyse publicly available UK MOT data to answer the above question (and more!)
I am a huge fan of Toyota MR2 Mk1s and at the time of this project (early 2025), owned one myself. Being a fairly active member of the MR2 community at the time, I noticed on one of the owners’ groups that a couple of members of the Toyota MR2 community sought to answer the question “How Many Mk1 Toyota MR2s are still on the road, or currently being restored in the UK?”
The project was born out of curiosity by a Mk1 MR2 owner called Clive England and the main Mk1 MR2 parts supplier worldwide, huge enthusiast and all-round Mk1 legend, Neil Jones. Neil is the main supplier of Mk1 parts to customers all around the world. He owns almost 100 Mk1s, has owned many more over the years and has supplied parts for a lot of the others. Neil also built the Mk1 that was used on stage for Australia’s Eurovision 2023 entry, performed by Voyager. As a result, Neil often gets asked how many MR2s are still on the road and so Clive, in conjunction with Neil, sought to answer that question.

Clive set about answering the above question and was writing an article for a historic motoring magazine presenting the findings. Unfortunately, it wasn’t just a case of looking on howmanyleft.co.uk as Toyota MR2s on there are not separated by generation (there is also a Mk2 and a Mk3).
After a call to arms was put out on the various Mk1 Facebook groups asking owners for information, Clive compiled a list using data from various sources:
- Neil’s records
- MR2 Owners club records
- MR2 Owners club photo archive
- Pictures in UK Mk1 MR2 Facebook groups
- Surveys completed by the Mk1 MR2 community in UK Facebook groups
Where I Came In
I noticed that the data collection method was a survey and then Clive was looking up the registration numbers on the UK’s MOT History Check Website to get further information about the cars.
Being a data professional and self-confessed data nerd, I wondered since MOT data is publicly available (via the website noted above) whether an API was available that could be queried to return the MOT records of all cars by make / model / year.
Sure enough, I found that the DVSA (Driver and Vehicle Standards Agency) makes this data available for free via the MOT History API under the Open Government Licence v3.0 so I offered my assistance to Clive to provide this data.
A Bit About The MOT Data
The MOT Test (Ministry of Transport Test) is an annual check that every car in the UK over three and up to forty years old must have to prove its roadworthiness. You cannot legally drive a car in this age range on a public road without a valid MOT (the exception being if you are driving to an MOT centre to get a pre-booked test carried out). When the test is completed, if a pass is issued, the owner gets a certificate to say they have a valid MOT, if the car fails, they are given a list of the items that it failed on that will need to be resolved before the car can pass an MOT. Since 2005, the result has been entered onto an electronic system and all that history is made available on the MOT History check website – you can see the history of any car as long as you know the registration plate, you do not need to be the owner of the car.
Using the API
The API is documented here and using it was really just a case of following that documentation.
You have to register for the API to use it and then you make a GET request to the API which returns a URL where you can download the Bulk Data files (all data ever up to the most recent Sunday) and the delta files (all changes since the most recent bulk).
The file you download is a zip file that contains a large number of JSON files (individually zipped). There were over 300 bulk files in the set I downloaded, each with around 500,000 JSON records, where one record represents a single car and its entire digital MOT history. There were a similar number of delta files, though they contained considerably fewer records than the bulk files.
A sample record for a single vehicle is below:
{
"registration": "XXXXXX",
"firstUsedDate": "2013-07-08",
"registrationDate": "2013-07-08",
"manufactureDate": "2013-07-08",
"primaryColour": "Silver",
"secondaryColour": "Not Stated",
"engineSize": 1560,
"model": "XXX",
"make": "XXX",
"fuelType": "Diesel",
"lastMotTestDate": "2024-12-28T13:26:34.000Z",
"motTests": [
{
"completedDate": "2016-07-04T14:51:57.000Z",
"expiryDate": "2017-07-07",
"testResult": "PASSED",
"odometerValue": 70457,
"odometerUnit": "MI",
"odometerResultType": "READ",
"defects": [
{
"dangerous": false,
"text": "Front Brake pad(s) wearing thin (3.5.1g)",
"type": "ADVISORY"
},
{
"dangerous": false,
"text": "emissions too clean to test",
"type": "ADVISORY"
}
]
},
{
"completedDate": "2017-07-07T14:31:13.000Z",
"testResult": "FAILED",
"odometerValue": 82363,
"odometerUnit": "MI",
"odometerResultType": "READ",
"defects": [
{
"dangerous": false,
"text": "Nearside Front Coil spring not correctly located (2.4.C.2)",
"type": "FAIL"
},
{
"dangerous": false,
"text": "Nearside Front Tyre has ply or cords exposed (4.1.D.1b)",
"type": "FAIL"
},
{
"dangerous": false,
"text": "Offside Front Tyre has ply or cords exposed (4.1.D.1b)",
"type": "FAIL"
}
]
}
],
"lastUpdateTimestamp": "2024-12-28 13:26:34.000000",
"dataSource": "dvsa",
"lastUpdateDate": "2024-12-28",
"lastRunDate": "2024-12-30",
"lastRunTimestamp": "2024-12-30 04:38:57.190285",
"modification": "UPDATED"
}
The process I used to get the data was:
- Register for the API
- Connect to the API using
Invoke-WebRequestin PowerShell and download the bulk MOT test dataset – a .zip file which decompresses to numerous JSON files, detailing every MOT record since 2005 - Shred the JSON using PowerShell to return the vehicle properties of all Toyota MR2s manufactured before 1st Jan 1990 (these are the Mk1s) and the most recent MOT date, result, expiry date and odometer reading and dump it to a csv file
- Use everyone’s favourite BI tool – Microsoft Excel to do a bit of cleansing and analysis
Downloading the files
To download the files, I created a PowerShell script that makes web calls using Invoke-WebRequest to get the URLs required to download the files.
Firstly, we have to authenticate which gives us an access token. We then use that token in the header of the main call.
The script I created is below:
# These parameters are taken from the gov Email
$ClientId = "XXX";
$ClientSecret = "XXX";
$APIKey = "XXX";
$ScopeURL = "XXX";
$TokenURL = "XXX";
function Get-AccessToken
{
param (
[string]
$Url
)
$body = @{
grant_type = "client_credentials"
client_id = $ClientId
client_secret = $ClientSecret
scope = $ScopeURL
};
$response = Invoke-WebRequest -Uri $Url `
-Method Post `
-Headers @{"Content-Type" = "application/x-www-form-urlencoded"} `
-Body $body;
return $response.Content;
};
# get the token
$token = Get-AccessToken -Url $TokenURL | ConvertFrom-Json | Select-Object -ExpandProperty access_token;
# get the bulk data
$headers = @{
"Authorization" = "Bearer $token"
"X-API-Key" = $APIKey
"accept" = "application/json"
};
$response = Invoke-WebRequest -Uri "https://history.mot.api.gov.uk/v1/trade/vehicles/bulk-download" -Method "Get" -Headers $headers;
if ($response.StatusCode -eq "200")
{
# The content returns the filename of the file we should download (it's large!)
$response.Content | ConvertFrom-JSON | Select-Object -ExpandProperty bulk | Select-Object -ExpandProperty downloadUrl;
}
else
{
"Error in request";
};
With this we are presented with a (long) URL:

We can just click the link and download like any other file:

The URL is valid for 5 minutes and you get this if you try after that:

The contents of the .zip file are shown below. We can see multiple further compressed files, each one contains a single JSON file of around 1GB in size:

Analysing the Data
At the time of this project, I had not yet used MongoDB – a JSON / document database system, which is undoubtedly one of the better ways to analyse this data. As I didn’t have that set up, I just analysed the data the “brute force” way:
- Read file 1
- Read JSON record 1
- Is it a Toyota MR2 Mk1?
- If so, add to the output file, if not discard
- Read JSON record 2
- etc…
- Read file 2
- etc….
So we are literally shredding each JSON record to work out if it’s a Mk1. The criteria for a Mk1 is
- Make: Toyota
- Model: MR2
- Year of manufacture: 1989 or before
1990 was the year that the Mk2 MR2 was released, but Mk1s were still manufactured that year also. Not wanting to “clutter” the data with Mk2s, I used 1989 as an end date knowing that this would exclude some Mk1s, but I decided that was better than including superfluous Mk2 records.
The script to run through every record and check it matches the criteria is below. This was done in PowerShell.
# Output File
$OutFile = "C:\Test\Results.csv";
# Where we have our data saved
$SourceDataPath = "C:\Test\MOT";
# Search Parameters
$Make = "Toyota";
$Model = "MR2";
$Date = "01-01-1990";
$files = Get-ChildItem $SourceDataPath -Filter "*.json";
# loop through the files
foreach ($f in $files)
{
$content = Get-Content $f;
# filter the data to our search criteria
$content | ConvertFrom-JSON | Where-Object {$_.make -eq $Make -and $_.model -eq $Model -and $_.manufactureDate -lt $date } | ForEach-Object {
# the vehicle matches our search
# get its last MOT details
$lastMOT = $_.motTests | Sort-Object -Property completedDate -Descending | Select-Object -First 1;
$result = [PsCustomObject]@{
Reg = $_.registration
ManufactureDate = $_.manufactureDate
PrimaryColour = $_.primaryColour
SecondaryColour = $_.secondaryColour
EngineSize = $_.engineSize
Make = $_.make
Model = $_.model
FuelType = $_.fuelType
LastMOTTestDate = $_.lastMOTTestDate
LastMOTTestResult = $lastMOT.testResult
LastMOTOdometerReading = $lastMOT.odometerValue
LastMOTOdometerUnit = $lastMOT.odometerUnit
MOTExpiry = $lastMOT.expiryDate
} ;
# print the result to the screen
$result;
#dump the result to csv
$result | ConvertTo-CSV -NoHeader | Out-File -FilePath $OutFile -Append;
};
};
It’s fairly straightforward – we used ConvertFrom-JSON to convert the JSON record to a PowerShell object and then just use Where-Object to filter.
As for the MOT result, rather crudely, I am pulling only the most recent MOT result to determine whether the car is still on the road – a pass meaning it is on the road, a fail meaning it is not.
The output file looks like this:

Now it’s in Excel, it’s quite easy to interpret. I used Excel’s filter tool to slice the data in various ways. The findings are below:
The Insights in Numbers
13,417 – the number of Mk1s in the MOT History database
751 – the number of these Mk1s still on the road (those with a current MOT)
478 – the number of Mk1s on the road not already in Clive’s survey list
314 – the number of Mk1s still on the road in the best colour red
1118 – the number of Mk1s whose most recent MOT was a failure
4226 – the number of Mk1s whose most recent MOT was a pass but has since lapsed
7322 – the number of Mk1s on the MOT database with no MOT history – possibly scrapped / mothballed pre 2005
1 – the number of Mk1s converted to LPG
1 – the number of Mk1s converted to electric
294,302 – the number of miles on the odometer of the highest mileage Mk1 still on the road
1.2321 – the number of trips to the moon it would take to clock up that number of miles
545 – the number of miles on the odometer of the lowest mileage car still on the road
15.57 – the average number of miles per year of that car
706,810,742 – the total number of miles covered by all Mk1s in the list
5 – the number of Mk1s still on the road with less than 2000 miles on the clock
71 – the number of Mk1s with odometer readings in KM, suggesting a Japanese import
12 – the number of Mk1s on the road that have had their stock 1.6L engine swapped for something larger
98 – the number of Mk1s Neil Jones owned at the time of writing*
300 – Neil’s estimate of the number of Mk1s he has owned over the years*
770 – the number of JSON files in the bulk set downloaded from the API
352 – the total size of those files in GB
133,963,607 – the total number of vehicle records in the files
*Source – Neil Jones
Conclusion
We have seen how we can use PowerShell to query the UK MOT history API to download all of the publicly available MOT data and to filter it down to a workable set for analysis in Excel. There is more to this story – as Clive and I looked through the MOT data, we found more anomalies and of course, I made it far more user-friendly to query – stay tuned for that!
References / Further Reading
Clive England – MR2 Mk1 at 40 years Deep dive into MOT Data
Clive England – MR2 Mk1 at 40 years – Survey Link to data dump and Image Bank
Clive England – MR2 Mk1, in the UK, at 40 years old – A review of known cars
gov.uk – Check the MOT history of a vehicle
