Get Models
Get a list of available models for a specific make.
GET https://api.oldcarsdata.com/models
Request Parameters
| Field | Type | Required | Description |
|---|---|---|---|
make | string | Yes | Make name to get models for. Minimum length: 1 character. |
Code Examples
cURL
bash
curl "https://api.oldcarsdata.com/models?make=Toyota"JavaScript
javascript
const response = await fetch(
'https://api.oldcarsdata.com/models?make=Toyota'
);
const data = await response.json();Python
python
import requests
response = requests.get(
'https://api.oldcarsdata.com/models',
params={'make': 'Toyota'}
)
data = response.json()Success Response (200)
Models retrieved successfully.
json
{
"data": [
"Land Cruiser",
"Supra",
"Celica",
"Corolla"
]
}Response Fields
| Field | Type | Description |
|---|---|---|
data | array | Array of model names (strings) for the specified make, sorted alphabetically |
Error Responses
| Field | Type | Description |
|---|---|---|
error | string | Error type identifier |
message | string | Human-readable error message |
details | object | Validation error details (400 responses only) |
400 — Validation Error:
json
{
"error": "Validation Error",
"message": "make: String must contain at least 1 character(s)",
"details": {
"make": ["String must contain at least 1 character(s)"]
}
}