Mileage History
Track vehicle odometer readings and mileage history over time
GET Request
~200ms response
1 credit per request
Endpoint
GET https://api.carapi.dev/v1/mileage-history/{vin}Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| vin | string | Required | 17-character Vehicle Identification Number (URL path parameter) |
| token | string | Required | API authentication token (query parameter) |
Request Examples
cURL
curl -X GET \
"https://api.carapi.dev/v1/mileage-history/1HGBH41JXMN109186?token=YOUR_API_KEY"JavaScript
// Using fetch API
const response = await fetch('https://api.carapi.dev/v1/mileage-history/1HGBH41JXMN109186?token=YOUR_API_KEY', {
method: 'GET',
headers: {
'Content-Type': 'application/json'
}
});
const data = await response.json();
console.log(data);Python
import requests
url = "https://api.carapi.dev/v1/mileage-history/1HGBH41JXMN109186"
params = {
"token": "YOUR_API_KEY"
}
response = requests.get(url, params=params)
data = response.json()
print(data)Response Examples
Success Response (200)
{
"vin": "JHMZE2870AS223772",
"totalRecords": 3,
"mileageHistory": [
{
"mileage": 179650,
"createdAt": "2025-09-09T13:59:09.872Z"
},
{
"mileage": 179645,
"createdAt": "2025-09-05T00:00:00.000Z"
},
{
"mileage": 179647,
"createdAt": "2025-09-05T00:00:00.000Z"
}
]
}Error Response (404)
{
"error": "No mileage history found for this VIN"
}Response Fields
| Field | Type | Description |
|---|---|---|
| vin | string | The VIN number that was searched |
| totalRecords | number | Total number of mileage records found |
| mileageHistory | array | Array of mileage history records |
| mileageHistory[].mileage | number | Odometer reading in miles or kilometers |
| mileageHistory[].createdAt | string | Timestamp when the mileage record was created (ISO format) |
Error Codes
400
Bad Request
Invalid VIN format or missing required parameters
403
Forbidden
Invalid or missing API token
404
Not Found
No mileage history found for this VIN
500
Internal Server Error
Server encountered an error processing the request
503
Service Unavailable
External data provider temporarily unavailable
Important Notes
- •VIN must be exactly 17 characters long and contain only alphanumeric characters
- •Mileage records are sorted by date with the most recent entries first
- •Each successful request consumes 1 API credit from your monthly allowance
- •Historical data availability varies by vehicle and reporting sources
- •Useful for maintenance tracking, fraud detection, and vehicle history verification