Get a list of available models for a specific make.
Models retrieved successfully
| Field | Type | Required | Description |
|---|---|---|---|
| make | string | Required | Make name to get models for. Minimum length: 1 character. |
| Field | Type | Required | Description |
|---|---|---|---|
| data | array<string> | Required | Array of model names (strings) for the specified make, sorted alphabetically |
| 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/models?make=Toyota'
);
const data = await response.json();{
"data": [
"Land Cruiser",
"Supra",
"Celica",
"Corolla"
]
}