Access vehicle inventory data programmatically. All endpoints return JSON.
/api
Format: JSON
Auth: None
/api/vehicles
Retrieve a paginated list of vehicles with optional filtering and sorting.
| Parameter | Type | Default | Description |
|---|---|---|---|
page | integer | 1 | Page number |
limit | integer | 20 | Items per page (max 100) |
sort | string | price | Sort field: price, mileage, name |
order | string | asc | Sort order: asc, desc |
minPrice | integer | — | Minimum price filter |
maxPrice | integer | — | Maximum price filter |
make | string | — | Filter by vehicle make |
location | string | — | Filter by location |
search | string | — | Full-text search |
/api/vehicles/:vin
Retrieve a single vehicle by its VIN (Vehicle Identification Number).
| Parameter | Type | Description |
|---|---|---|
vin | string | 17-character Vehicle Identification Number |
/api/vehicles/stats
Get aggregated statistics: total count, price ranges, average price, makes distribution, and location breakdown.
/api/search
Full-text search across vehicle name, VIN, color, and location fields.
| Parameter | Type | Description |
|---|---|---|
q | string | Search query (required) |
page | integer | Page number (default: 1) |
limit | integer | Items per page (default: 20) |
All endpoints return a consistent JSON structure:
{
"success": true,
"data": [...], // Array or object
"pagination": { // Only for list endpoints
"page": 1,
"limit": 20,
"total": 1000,
"totalPages": 50,
"hasNext": true,
"hasPrev": false
}
}
Error Response (404):
{
"success": false,
"error": "Vehicle not found"
}
| Field | Type | Description |
|---|---|---|
name | string | Full vehicle name (year, make, model, trim) |
vin | string | 17-character VIN |
price | string | Listing price (e.g. "$15,995") |
retailAvg | string | Average retail price |
savings | string | Savings vs retail average |
mileage | string | Odometer reading (e.g. "61,438") |
exterior | string | Exterior color |
interior | string | Interior color |
location | string | Dealership location |
link | string | URL to original listing |
img | string | Vehicle image URL |