Vehicle Attributes
GET /api/vehicle-attributes
Section titled “GET /api/vehicle-attributes”Returns all valid values for a given vehicle attribute. Use this to discover valid filter values before querying endpoints such as Bodies, Engines, and Colors.
Available Attributes
Section titled “Available Attributes”| Attribute | Description |
|---|---|
bodies.type | Body style (e.g. SUV, Sedan, Pickup) |
engines.cam_type | Camshaft type (e.g. DOHC, SOHC) |
engines.cylinders | Number of cylinders |
engines.drive_type | Drive type (e.g. AWD, FWD, RWD) |
engines.engine_type | Engine type (e.g. Gas, Diesel, Electric) |
engines.fuel_type | Fuel type (e.g. Regular Unleaded, Premium Unleaded) |
engines.transmission | Transmission type (e.g. Automatic, Manual) |
engines.valve_timing | Valve timing type |
engines.valves | Number of valves |
Sample Request
Section titled “Sample Request”curl "https://carapi.app/api/vehicle-attributes?attribute=bodies.type"const params = new URLSearchParams({ attribute: 'bodies.type' });
const response = await fetch( `https://carapi.app/api/vehicle-attributes?${params}`);
const data = await response.json();console.log('Attribute values:', data);import requests
params = { 'attribute': 'bodies.type'}
response = requests.get( 'https://carapi.app/api/vehicle-attributes', params=params)
data = response.json()print('Attribute values:', data)use GuzzleHttp\Client;
$client = new Client();
$response = $client->get('https://carapi.app/api/vehicle-attributes', [ 'query' => [ 'attribute' => 'bodies.type', ],]);
$data = json_decode($response->getBody(), true);print_r($data);$url = 'https://carapi.app/api/vehicle-attributes?' . http_build_query([ 'attribute' => 'bodies.type',]);
$ch = curl_init();curl_setopt($ch, CURLOPT_URL, $url);curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);curl_close($ch);
$data = json_decode($response, true);print_r($data);Sample Response
Section titled “Sample Response”[ "Cargo Van", "Convertible", "Coupe", "Crew Cab Pickup", "Extended Cab Pickup", "Hatchback", "Minivan", "Passenger Van", "Regular Cab Pickup", "SUV", "Sedan", "Wagon"]