Engines
GET /api/engines/v2
Section titled “GET /api/engines/v2”Returns vehicle engine specifications including engine type, fuel type, cylinders, horsepower, transmission, and drive type. The demo dataset covers model years 2015–2020. To access the full range from 1900 to today, subscribe and include a valid JWT.
Sample Request
Section titled “Sample Request”curl "https://carapi.app/api/engines/v2?year=2024&make=Ford&model=Mustang" \ -H "Authorization: Bearer YOUR_JWT_TOKEN_HERE"const params = new URLSearchParams({ year: '2024', make: 'Ford', model: 'Mustang' });
const response = await fetch(`https://carapi.app/api/engines/v2?${params}`, { headers: { 'Authorization': `Bearer ${jwt}` }});
const data = await response.json();console.log('Engines:', data);import requests
headers = { 'Authorization': f'Bearer {jwt}'}
params = { 'year': '2024', 'make': 'Ford', 'model': 'Mustang'}
response = requests.get( 'https://carapi.app/api/engines/v2', headers=headers, params=params)
data = response.json()print('Engines:', data)use GuzzleHttp\Client;
$client = new Client();
$response = $client->get('https://carapi.app/api/engines/v2', [ 'headers' => [ 'Authorization' => 'Bearer YOUR_JWT_TOKEN_HERE', ], 'query' => [ 'year' => '2024', 'make' => 'Ford', 'model' => 'Mustang', ],]);
$data = json_decode($response->getBody(), true);print_r($data);$url = 'https://carapi.app/api/engines/v2?' . http_build_query([ 'year' => '2024', 'make' => 'Ford', 'model' => 'Mustang',]);
$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/engines/v2?trim_id=8860", "count": 1, "pages": 1, "total": 1, "next": "", "prev": "", "first": "/api/engines/v2?trim_id=8860", "last": "" }, "data": [ { "id": 8860, "make_id": 22, "model_id": 4779, "submodel_id": 73504, "trim_id": 8860, "year": 2020, "make": "Toyota", "model": "Camry", "series": null, "submodel": "LE", "trim": "LE", "trim_description": "LE 4dr Sedan (2.5L 4cyl 8A)", "engine_type": "gas", "fuel_type": "regular unleaded", "cylinders": "I4", "size": "2.5", "horsepower_hp": 203, "horsepower_rpm": 6600, "torque_ft_lbs": 184, "torque_rpm": 5000, "valves": 16, "valve_timing": "Variable", "cam_type": "Double overhead cam (DOHC)", "drive_type": "front wheel drive", "transmission": "8-speed shiftable automatic" } ]}Filtering
Section titled “Filtering”curl "https://carapi.app/api/engines/v2?year=2024&make=Ford&json=[{\"field\":\"horsepower_hp\",\"op\":\">=\",\"val\":300},{\"field\":\"horsepower_hp\",\"op\":\"<=\",\"val\":500}]" \ -H "Authorization: Bearer YOUR_JWT_TOKEN_HERE"const filter = JSON.stringify([ { field: 'horsepower_hp', op: '>=', val: 300 }, { field: 'horsepower_hp', op: '<=', val: 500 }]);
const response = await fetch( `https://carapi.app/api/engines/v2?year=2024&make=Ford&json=${encodeURIComponent(filter)}`, { headers: { 'Authorization': `Bearer ${jwt}` } });
const data = await response.json();console.log('Engines:', data);import requestsimport json
headers = { 'Authorization': f'Bearer {jwt}'}
params = { 'year': '2024', 'make': 'Ford', 'json': json.dumps([ {'field': 'horsepower_hp', 'op': '>=', 'val': 300}, {'field': 'horsepower_hp', 'op': '<=', 'val': 500} ])}
response = requests.get( 'https://carapi.app/api/engines/v2', headers=headers, params=params)
data = response.json()print('Engines:', data)use GuzzleHttp\Client;
$client = new Client();
$response = $client->get('https://carapi.app/api/engines/v2', [ 'headers' => [ 'Authorization' => 'Bearer YOUR_JWT_TOKEN_HERE', ], 'query' => [ 'year' => '2024', 'make' => 'Ford', 'json' => json_encode([ ['field' => 'horsepower_hp', 'op' => '>=', 'val' => 300], ['field' => 'horsepower_hp', 'op' => '<=', 'val' => 500], ]), ],]);
$data = json_decode($response->getBody(), true);print_r($data);$filter = json_encode([ ['field' => 'horsepower_hp', 'op' => '>=', 'val' => 300], ['field' => 'horsepower_hp', 'op' => '<=', 'val' => 500],]);
$url = 'https://carapi.app/api/engines/v2?' . http_build_query(['year' => '2024', 'make' => 'Ford', '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);Use /api/vehicle-attributes?attribute=engines.fuel_type to retrieve all valid fuel type values
before filtering.
GET /api/engines Deprecated
Section titled “GET /api/engines ”This legacy endpoint supports a verbose=yes parameter to include make, model, and trim in the
response description. Use /api/engines/v2 for all new integrations.