Models
GET /api/models/v2
Section titled “GET /api/models/v2”Returns vehicle models available in the dataset. The demo dataset covers models sold between 2015–2020. To access models from 1900 to today, subscribe and include a valid JWT.
Sample Request
Section titled “Sample Request”curl "https://carapi.app/api/models/v2?year=2024&make=Toyota" \ -H "Authorization: Bearer YOUR_JWT_TOKEN_HERE"const params = new URLSearchParams({ year: '2024', make: 'Toyota' });
const response = await fetch(`https://carapi.app/api/models/v2?${params}`, { headers: { 'Authorization': `Bearer ${jwt}` }});
const data = await response.json();console.log('Models:', data);import requests
headers = { 'Authorization': f'Bearer {jwt}'}
params = { 'year': '2024', 'make': 'Toyota'}
response = requests.get( 'https://carapi.app/api/models/v2', headers=headers, params=params)
data = response.json()print('Models:', data)use GuzzleHttp\Client;
$client = new Client();
$response = $client->get('https://carapi.app/api/models/v2', [ 'headers' => [ 'Authorization' => 'Bearer YOUR_JWT_TOKEN_HERE', ], 'query' => [ 'year' => '2024', 'make' => 'Toyota', ],]);
$data = json_decode($response->getBody(), true);print_r($data);$url = 'https://carapi.app/api/models/v2?' . http_build_query([ 'year' => '2024', 'make' => 'Toyota',]);
$ch = curl_init();curl_setopt($ch, CURLOPT_URL, $url);curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);curl_setopt($ch, CURLOPT_HTTPHEADER, [ 'Authorization: Bearer YOUR_JWT_TOKEN_HERE',]);
$response = curl_exec($ch);curl_close($ch);
$data = json_decode($response, true);print_r($data);Sample Response
Section titled “Sample Response”{ "collection": { "url": "/api/models/v2?year=2024&make=toyota", "count": 23, "pages": 1, "total": 23, "next": "", "prev": "", "first": "/api/models/v2?year=2024&make=toyota", "last": "" }, "data": [ {"id": 4841, "make_id": 22, "make": "Toyota", "name": "4Runner"}, {"id": 7581, "make_id": 22, "make": "Toyota", "name": "bZ4X"}, {"id": 4779, "make_id": 22, "make": "Toyota", "name": "Camry"}, {"id": 3917, "make_id": 22, "make": "Toyota", "name": "Corolla"}, {"id": 7525, "make_id": 22, "make": "Toyota", "name": "Corolla Cross"}, {"id": 2994, "make_id": 22, "make": "Toyota", "name": "Crown"}, {"id": 7526, "make_id": 22, "make": "Toyota", "name": "GR 86"}, {"id": 7580, "make_id": 22, "make": "Toyota", "name": "GR Corolla"}, {"id": 7425, "make_id": 22, "make": "Toyota", "name": "GR Supra"}, {"id": 7639, "make_id": 22, "make": "Toyota", "name": "Grand Highlander"}, {"id": 6111, "make_id": 22, "make": "Toyota", "name": "Highlander"}, {"id": 3200, "make_id": 22, "make": "Toyota", "name": "Land Cruiser"}, {"id": 7170, "make_id": 22, "make": "Toyota", "name": "Mirai"}, {"id": 6109, "make_id": 22, "make": "Toyota", "name": "Prius"}, {"id": 7370, "make_id": 22, "make": "Toyota", "name": "Prius AWD-e"}, {"id": 7244, "make_id": 22, "make": "Toyota", "name": "Prius Prime"}, {"id": 5747, "make_id": 22, "make": "Toyota", "name": "RAV4"}, {"id": 7463, "make_id": 22, "make": "Toyota", "name": "RAV4 Prime"}, {"id": 6110, "make_id": 22, "make": "Toyota", "name": "Sequoia"}, {"id": 5870, "make_id": 22, "make": "Toyota", "name": "Sienna"}, {"id": 5688, "make_id": 22, "make": "Toyota", "name": "Tacoma"}, {"id": 6028, "make_id": 22, "make": "Toyota", "name": "Tundra"}, {"id": 6764, "make_id": 22, "make": "Toyota", "name": "Venza"} ]}Filtering
Section titled “Filtering”curl "https://carapi.app/api/models/v2?year=2024&json=[{\"field\":\"make\",\"op\":\"in\",\"val\":[\"Ford\",\"Acura\"]}]" \ -H "Authorization: Bearer YOUR_JWT_TOKEN_HERE"const filter = JSON.stringify([ { field: 'make', op: 'in', val: ['Ford', 'Acura'] }]);
const response = await fetch( `https://carapi.app/api/models/v2?year=2024&json=${encodeURIComponent(filter)}`, { headers: { 'Authorization': `Bearer ${jwt}` } });
const data = await response.json();console.log('Models:', data);import requestsimport json
headers = { 'Authorization': f'Bearer {jwt}'}
params = { 'year': '2024', 'json': json.dumps([ {'field': 'make', 'op': 'in', 'val': ['Ford', 'Acura']} ])}
response = requests.get( 'https://carapi.app/api/models/v2', headers=headers, params=params)
data = response.json()print('Models:', data)use GuzzleHttp\Client;
$client = new Client();
$response = $client->get('https://carapi.app/api/models/v2', [ 'headers' => [ 'Authorization' => 'Bearer YOUR_JWT_TOKEN_HERE', ], 'query' => [ 'year' => '2024', 'json' => json_encode([ ['field' => 'make', 'op' => 'in', 'val' => ['Ford', 'Acura']], ]), ],]);
$data = json_decode($response->getBody(), true);print_r($data);$filter = json_encode([ ['field' => 'make', 'op' => 'in', 'val' => ['Ford', 'Acura']],]);
$url = 'https://carapi.app/api/models/v2?' . http_build_query(['year' => '2024', 'json' => $filter]);
$ch = curl_init();curl_setopt($ch, CURLOPT_URL, $url);curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);curl_setopt($ch, CURLOPT_HTTPHEADER, [ 'Authorization: Bearer YOUR_JWT_TOKEN_HERE',]);
$response = curl_exec($ch);curl_close($ch);
$data = json_decode($response, true);print_r($data);