Get statistical information about auctions including price trends and sell-through rates.
This endpoint requires authentication. Include your API key in the Authorization header:
Authorization: Bearer YOUR_API_KEYStats retrieved successfully
| Field | Type | Required | Description |
|---|---|---|---|
| Authorization | header | Required | Bearer token with your API key: Bearer YOUR_API_KEY |
| make | string | Required | Make name (e.g., "Toyota"). Minimum length: 1 character. |
| model | string | - | Model name to filter statistics by |
| year_min | integer | - | Minimum year filter (inclusive) |
| year_max | integer | - | Maximum year filter (inclusive) |
| Field | Type | Required | Description |
|---|---|---|---|
| total_sales | number | Required | Total number of sold auctions matching the filters |
| average_price | number | Required | Average sale price (rounded to nearest integer) |
| median_price | number | Required | Median sale price (rounded to nearest integer) |
| lowest_price | number | Required | Lowest sale price |
| highest_price | number | Required | Highest sale price |
| sell_through_rate | number | Required | Sell-through rate as a decimal (0.0 to 1.0), representing the percentage of auctions that sold |
| price_trend | array<object> | Required | Monthly price trend data for the last 12 months |
| price_trend[].date | string | Required | Month in YYYY-MM format |
| price_trend[].avg_price | number | Required | Average price for that month (rounded to nearest integer) |
| price_trend[].volume | number | Required | Number of sales in that month |
| Field | Type | Required | Description |
|---|---|---|---|
| error | string | Required | Error type identifier. Common values: "Validation Error", "HTTP Error", "Database Error", "Internal Server Error" |
| message | string | Required | Human-readable error message describing what went wrong |
| details | object<string, string[]> | - | Additional validation error details. Only present for 400 Validation Error responses. Keys are field names, values are arrays of error messages for that field |
const response = await fetch(
'https://api.oldcarsdata.com/stats?make=Toyota&model=Land+Cruiser',
{
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
}
);
const data = await response.json();{
"total_sales": 150,
"average_price": 42500,
"median_price": 40000,
"lowest_price": 15000,
"highest_price": 125000,
"sell_through_rate": 0.75,
"price_trend": [
{
"date": "2024-01",
"avg_price": 41000,
"volume": 12
},
{
"date": "2024-02",
"avg_price": 43000,
"volume": 15
}
]
}