MarketCheck has been tracking vehicle listings since 2022, providing a rich historical dataset for analysis. The History API allows you to access this data by Vehicle Registration Mark (VRM), enabling you to retrieve detailed historical information about any vehicle.
Read Understanding MarketCheck Data to learn more about what data is available and how to interpret it.
GET https://api.marketcheck.com/v2/history/car/uk/{vrm}
Path Parameters:
vrm
: The Vehicle Registration Mark for which you want to retrieve history. Case-insensitive.The following example demonstrates how to use the History API to get historical data for a specific VRM:
import axios from 'axios';
const options = {
method: 'GET',
url: 'https://api.marketcheck.com/v2/history/car/uk/SM62UJT',
params: {api_key: 'YOUR_API_KEY'},
headers: {Accept: 'application/json'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
Your MarketCheck API authentication key. Required for every request, unless OAuth is used.
Page number for paginated History API results. Default — 1.
Specifies result sort order for historical data. Allowed values — asc
or desc
. Default — desc
.
Parameter | Default Value | Description |
---|---|---|
page | 1 | Page number for paginated results |
sort_order | desc | Sort order for the results can be asc (ascending) or desc (descending) |
You cannot specify the sort by field, but you can control the sort order using the sort_order
parameter.
The results are sorted by status_date
in descending order by default, meaning the most recent listings appear first. You can change this to ascending order by setting sort_order=asc
.
page
parameterpage
parameter to retrieve subsequent pages of results. Increase the page
value by 1 to get the next set of resultsThe VRM History API provides comprehensive historical data for vehicle analysis across multiple scenarios. This powerful tool enables you to retrieve detailed historical records for any Vehicle Registration Mark, supporting various business and research applications.
Key Use Cases:
Example:
The following example demonstrates retrieving historical data for a specific VRM, which provides all the information needed for the above use cases:
import axios from 'axios';
const options = {
method: 'GET',
url: 'https://api.marketcheck.com/v2/history/car/uk/YF74XHY',
params: {api_key: 'YOUR_API_KEY'},
headers: {Accept: 'application/json'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
200 OK
200 OK
200 OK
Status Code | Description | Common Causes |
---|---|---|
400 | Bad Request | Invalid parameter values |
401 | Unauthorized | Missing/invalid API key |
403 | Forbidden | Access denied to resource |
422 | Unprocessable Entity | Page exceeds number of records found |
429 | Too Many Requests | Rate limit exceeded |
500 | Internal Server Error | Temporary server issues |
502 | Bad Gateway | Issues with upstream services |
503 | Service Unavailable | API maintenance or downtime |
The VRM History API response schema includes the following structure:
type Response = HistoryResponse[];
interface HistoryResponse {
id: string; // Unique identifier for the listing
price: number; // Price of the vehicle
miles: number; // Mileage of the vehicle
data_source: string; // Source of the listing data
vdp_url: string; // Vehicle Detail Page URL
seller_type: string; // Type of seller (dealer, fsbo, auction)
inventory_type: string; // Type of inventory (new, used)
last_seen_at: number; // Timestamp when the listing was last seen
last_seen_at_date: string; // Date when the listing was last seen
scraped_at: number; // Timestamp when the listing was first seen
scraped_at_date: string; // Date when the listing was first seen
first_seen_at: number; // Timestamp when the listing was first seen
first_seen_at_date: string; // Date when the listing was first seen
source: string; // Source website of the listing
seller_name: string; // Name of the seller
city: string; // City of the seller
zip: string; // Postal code of the seller
postal_code: string; // Postal code of the seller
status_date: number; // Timestamp when the listing was last seen
}