Useful Tip:
You can also sort the data returned by adding 'asc' or 'desc' after 'years' in the URL like this:
https://carmakemodeldb.com/api/v1/car-lists/get/years/desc
This is optional, if not sent the default is 'asc'
Welcome to CarMakerModelDB (CarListAPI) documentation. In order to gain access to our data you will need a subscription. If you do not have one already head over and register for an account at CarMakeModelDB.com
After registration you can use your API Token on this working example at JSFiddle. Complete Working Example
Using specific URL's you can retrieve data in different ways. Below you will find a list of available URL's you can build as well as what will be returned.
This URL will return all years from 1899-2018 in descending order (go ahead add your API token and paste in your web browser):
https://carmakemodeldb.com/api/v1/car-lists/get/years/desc?api_token=YOUR_API_TOKEN
// Actual JSON response returned
[{"year":"2015"},{"year":"2016"},{"year":"2017"},{"year":"2018"}]
// Beautified for your viewing pleasure
[
{
"year":"2015"
},
{
"year":"2016"
},
{
"year":"2017"
},
{
"year":"2018"
}
]
This URL will return all distinct vehicle makes in ascending order (go ahead add your API token and paste in your web browser):
https://carmakemodeldb.com/api/v1/car-lists/get/all/makes?api_token=YOUR_API_TOKEN
// Actual JSON response returned
[{"make":"AC"},{"make":"Acura"},{"make":"Alfa Romeo"},{"make":"Am General"},{"make":"American Motors"}]
// Beautified for your viewing pleasure
[
{
"make": "AC"
},
{
"make": "Acura"
},
{
"make": "Alfa Romeo"
},
{
"make": "Am General"
},
{
"make": "American Motors"
}
]
This URL will return all distinct vehicle makes for a particular year (go ahead add your API token and paste in your web browser):
https://carmakemodeldb.com/api/v1/car-lists/get/makes/1909?api_token=YOUR_API_TOKEN
// Actual JSON response returned
[{"make":"Auburn"},{"make":"Buick"},{"make":"Cadillac"},{"make":"Ford"},{"make":"Franklin"}]
// Beautified for your viewing pleasure
[
{
"make": "Auburn"
},
{
"make": "Buick"
},
{
"make": "Cadillac"
},
{
"make": "Ford"
},
{
"make": "Franklin"
}
]
This URL will return all distinct vehicle models for a particular make (go ahead add your API token and paste in your web browser):
https://carmakemodeldb.com/api/v1/car-lists/get/all/models/Acura?api_token=YOUR_API_TOKEN
// Actual JSON response returned
[{"model":"CL"},{"model":"ILX"},{"model":"ILX Hybrid"},{"model":"Integra"},{"model":"Legend"}]
// Beautified for your viewing pleasure
[
{
"model": "CL"
},
{
"model": "ILX"
},
{
"model": "ILX Hybrid"
},
{
"model": "Integra"
},
{
"model": "Legend"
}
]
This URL will return all vehicle models for a particular year & make (go ahead add your API token and paste in your web browser):
https://carmakemodeldb.com/api/v1/car-lists/get/models/2010/Acura?api_token=YOUR_API_TOKEN
// Actual JSON response returned
[{"model":"MDX"},{"model":"RDX"},{"model":"RL"},{"model":"TL"},{"model":"TSX"},{"model":"ZDX"}]
// Beautified for your viewing pleasure
[
{
"model": "MDX"
},
{
"model": "RDX"
},
{
"model": "RL"
},
{
"model": "TL"
},
{
"model": "TSX"
},
{
"model": "ZDX"
}
]
This URL will return all vehicle trims for a particular year, make & model (go ahead add your API token and paste in your web browser):
https://carmakemodeldb.com/api/v1/car-lists/get/trims/2010/Acura/RL?api_token=YOUR_API_TOKEN
// Actual JSON response returned
[{"trim":"3.7"},{"trim":"CMBS"},{"trim":"Technology"}]
// Beautified for your viewing pleasure
[
{
"trim": "3.7"
},
{
"trim": "CMBS"
},
{
"trim": "Technology"
}
]
This URL will return all vehicle transmissions for a particular year, make, model & trim (go ahead add your API token and paste in your web browser):
https://carmakemodeldb.com/api/v1/car-lists/get/car/transmissions/2020/Honda/Accord/1.5T Sport FWD?api_token=YOUR_API_TOKEN
// Actual JSON response returned
[{"transmission":"6-Speed Manual"},{"transmission":"7-Speed CVT"}]
// Beautified for your viewing pleasure
[
{
"transmission": "6-Speed Manual"
},
{
"transmission": "7-Speed CVT"
}
]
This URL will return all vehicle engines for a particular year, make, model, trim & transmissions (go ahead add your API token and paste in your web browser):
https://carmakemodeldb.com/api/v1/car-lists/get/car/engines/2018/Acura/NSX/SH-AWD/9-Speed Dual Clutch?api_token=YOUR_API_TOKEN
// Actual JSON response returned
[{"engine":"3.5L 573 hp V6 Hybrid"}]
// Beautified for your viewing pleasure
[
{
"engine": "3.5L 573 hp V6 Hybrid"
}
]
This URL will return all vehicle years for a particular make & model (go ahead add your API token and paste in your web browser):
https://carmakemodeldb.com/api/v1/car-lists/get/year-range/Acura/RL?api_token=YOUR_API_TOKEN
// Actual JSON response returned
[{"year":"1996"},{"year":"1997"},{"year":"1998"}]
// Beautified for your viewing pleasure
[
{
"year": "1996"
},
{
"year": "1997"
},
{
"year": "1998"
}
]
This URL will return all drive types in descending order (go ahead add your API token and paste in your web browser):
https://carmakemodeldb.com/api/v1/car-lists/get/drive-types/desc?api_token=YOUR_API_TOKEN
// Actual JSON response returned
[{"type":"4x2 (Two Wheel Drive)"},{"type":"4x4 (Four Wheel Drive)"}]
// Beautified for your viewing pleasure
[
{
"type":"4x2 (Two Wheel Drive)"
},
{
"type":"4x4 (Four Wheel Drive)"
}
]
This URL will return all body styles in descending order (go ahead add your API token and paste in your web browser):
https://carmakemodeldb.com/api/v1/car-lists/get/body-styles/desc?api_token=YOUR_API_TOKEN
// Actual JSON response returned
[{"style":"Van / Minivan"},{"style":"Sports Car"},{"style":"Sport Utility"}]
// Beautified for your viewing pleasure
[
{
"style":"Van / Minivan"
},
{
"style":"FWD (FWD Wheel Drive)"
},
{
"style":"Sport Utility"
}
]
Getting a list of all the years available in our database and populating a select box in your form is simple using jQuery.
<!DOCTYPE html>
<html lang="en">
<body>
<form>
<select id="vehicle_years" name="vehicle_years" class="form-control"></select>
</form>
</body>
</html>
<script>
$(document).ready(function() {
var apiToken = 'YOUR_API_TOKEN';
$.get("https://carmakemodeldb.com/api/v1/car-lists/get/years" + "?api_token=" + apiToken,
function(data) {
var year = $('#vehicle_years');
year.empty();
year.append("<option value=''>Select Year</option>");
$.each(data, function(index, element) {
year.append("<option value='"+ element.year +"'>" + element.year + "</option>");
});
}
);
});
</script>
You can also sort the data returned by adding 'asc' or 'desc' after 'years' in the URL like this:
https://carmakemodeldb.com/api/v1/car-lists/get/years/desc
This is optional, if not sent the default is 'asc'
Actual response would include all years from 1899-2018. Below is a short version of the response to give you an idea of what is returned.
// Actual JSON response returned
[{"year":"2015"},{"year":"2016"},{"year":"2017"},{"year":"2018"}]
// Beautified for your viewing pleasure
[
{
"year":"2015"
},
{
"year":"2016"
},
{
"year":"2017"
},
{
"year":"2018"
}
]
One method for connecting and retrieving data is to use PHP's cURL.
// Function to connect to API
function CarListAPI($method, $url, $data = false)
{
$curl = curl_init();
if ($data) {
$url = sprintf("%s?%s", $url, http_build_query($data));
}
// Optional Authentication:
curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($curl, CURLOPT_USERPWD, "username:password");
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl,CURLOPT_HTTPHEADER,array('Accept: application/json'));
$result = curl_exec($curl);
curl_close($curl);
// You can change this to return $result; if you would
// prefer to receive the JSON response
return json_decode($result);
}
// Call CarListAPI to get the years
$apiUrl = 'https://carmakemodeldb.com/api/v1/car-lists/get/years/desc';
$post = [
'api_token' => 'YOUR_API_TOKEN'
];
$getYears = CarListAPI('GET', $apiUrl, $post);
You can also sort the data returned by adding 'asc' or 'desc' after 'years' in the URL like this:
https://carmakemodeldb.com/api/v1/car-lists/get/years/desc
This is optional, if not sent the default is 'asc'
// Loop through the $getYears array
<form>
<select id="years" name="years" class="form-control">
<option value="">Select Year</option>
<?php
foreach($getYears as $year) {
echo "<option value='$year->year'>$year->year</option>";
}
?>
</select>
</form>
Using our data api you can integrate vehicle year, make, model & trim into any website and/or application.
Having the most up-to-date data is important to any website and/or application. We update our data monthly to make sure you have the most up-to-date information!
Need help integrating our data into your project? Contact us about our integration and custom programming services.