Cars API
The Cars API provides detailed information on tens of thousands of vehicle models from over four hundred automakers.
Look up cars by name — no identifiers to carry between calls:
/v2/cars?make=bmw&model=3-series&body=wagon&fuel=diesel
That one call returns every matching car with its full specification sheet attached, so there is no second request to make, and each car has an id you can store. The other endpoints are for browsing: /v2/carfacets gives the available values and counts for every dimension in one call, which is what you want for dependent dropdowns.
Available endpoints:
- /v2/cars - search and specifications
- /v2/carfacets - dropdown values and counts
- /v2/carmakes - list manufacturers
- /v2/carmodels - list models
- /v2/cargenerations - list generations
For electric vehicle (EV)-specific data, see the Electric Vehicle API.
From 9,240 users
Applications using this API
API Status
API Response Times
Average | P50 | P75 | P90 | P95 |
|---|---|---|---|---|
| 379ms | 404ms | 479ms | 876ms | 1265ms |
Similar APIs
Didn't find what you were looking for? Suggest an improvement
Premium only
https://api.api-ninjas.com/v2/cars
The main endpoint. Search all 84,177 cars by any combination of filters, or fetch cars you already know by id. Either way every car comes back with its full specification sheet attached, so there is never a second call to make.
There is no hierarchy to walk first — ?body=Wagon&fuel=diesel&min_power_hp=150 works on its own. At least one filter, or an id, is required. The total number of matches comes back in the X-Total-Count response header.
Parameters
idoptionalA car handle, e.g.
car_e71ff3416a. Safe to store — it is derived from the car's identity and survives data refreshes.idsoptionalComma-separated handles, at most 50. Request order is preserved, and a handle matching nothing comes back as
null.makeoptionalManufacturer, e.g.
bmw. Case and punctuation are ignored.modeloptionalModel, e.g.
3-series.generationoptionalGeneration, e.g.
e90-e91-e92-e93.chassis_codeoptionalChassis code, e.g.
E91. Matches any code in the generation's set.bodyoptionalSedan,Coupe,Convertible,Wagon,Hatchback,Liftback,SUV,MPV,VanorPickup.doorsoptionalNumber of doors.
badgeoptionalModel designation, e.g.
320d. Spacing and case are ignored.fueloptionalgasoline,diesel,electric,hybrid,plugin_hybrid,lpg,cng,hydrogenorethanol.transmissionoptionalmanual,automatic,cvt,dual_clutch,automated_manualorsingle_speed.driveoptionalfwd,rwd,awdor4wd.cylindersoptionalNumber of cylinders.
engine_codeoptionalManufacturer engine code, e.g.
OM646.962.min_power_hpoptionalMinimum engine power in horsepower.
max_power_hpoptionalMaximum engine power in horsepower.
min_yearoptionalCars still in production in or after this year.
max_yearoptionalCars in production in or before this year.
yearoptionalCars in production in this year.
sortoptionalpower_hp,-power_hp,year,-year,nameormake.limitoptionalHow many results to return. Must be between
1and100. Default is10. A value outside that range is rejected rather than silently clamped.offsetoptionalNumber of results to skip. Used for pagination. Default is
0.
Headers
X-Api-KeyrequiredAPI Key associated with your account.
Response
A JSON array of objects, or an error if the request is unsuccessful.
Sample Request Live Demo!
Try our APIs in the API playground
Sign up for a free API key to get started — no credit card required.
https://api.api-ninjas.com/v2/cars?make=bmw&model=3-series&badge=320dHeaders
X-Api-KeyLog in or sign up to get your API KeySample Response
Code Examples
1
2
curl -X GET "https://api.api-ninjas.com/v2/cars?make=bmw&model=3-series&badge=320d" \
-H "X-Api-Key: YOUR_API_KEY"https://api.api-ninjas.com/v2/carfacets
Returns the available values and counts for each dimension, narrowed by whatever is already selected. Available on every plan, including Free.
This builds every dependent dropdown in one request rather than one request per level: ask for the facets you need, and pass the user's current selection to narrow the rest.
Parameters
facetsrequiredComma-separated dimensions to count, at most 6. One of
make,model,generation,chassis_code,body,doors,fuel,transmission,drive,cylinders,year,badge.makeoptionalNarrow the counts to one manufacturer.
modeloptionalNarrow the counts to one model.
generationoptionalNarrow the counts to one generation.
bodyoptionalNarrow the counts to one body style.
fueloptionalNarrow the counts to one fuel type.
transmissionoptionalNarrow the counts to one transmission.
driveoptionalNarrow the counts to one drive type.
yearoptionalNarrow the counts to one production year.
Headers
X-Api-KeyrequiredAPI Key associated with your account.
Response
A JSON object, or an error if the request is unsuccessful.
Sample Request Live Demo!
Try our APIs in the API playground
Sign up for a free API key to get started — no credit card required.
https://api.api-ninjas.com/v2/carfacets?facets=make%2Cbody&fuel=dieselHeaders
X-Api-KeyLog in or sign up to get your API KeySample Response
Code Examples
1
2
curl -X GET "https://api.api-ninjas.com/v2/carfacets?facets=make,body&fuel=diesel" \
-H "X-Api-Key: YOUR_API_KEY"Premium only
https://api.api-ninjas.com/v2/carmakes
Lists vehicle manufacturers.
Parameters
searchoptionalCase-insensitive substring match on the manufacturer name.
yearoptionalOnly manufacturers with a car in production in this year.
limitoptionalHow many results to return. Must be between
1and100. Default is10. A value outside that range is rejected rather than silently clamped.offsetoptionalNumber of results to skip. Used for pagination. Default is
0.
Headers
X-Api-KeyrequiredAPI Key associated with your account.
Response
A JSON array of objects, or an error if the request is unsuccessful.
Sample Request Live Demo!
Try our APIs in the API playground
Sign up for a free API key to get started — no credit card required.
https://api.api-ninjas.com/v2/carmakes?search=BMWHeaders
X-Api-KeyLog in or sign up to get your API KeySample Response
Code Examples
1
2
curl -X GET "https://api.api-ninjas.com/v2/carmakes?search=BMW" \
-H "X-Api-Key: YOUR_API_KEY"Premium only
https://api.api-ninjas.com/v2/carmodels
Lists the models of one manufacturer. Pass the make as a word — bmw, BMW and Bmw all resolve, as do 3 Series, 3-series and 3series.
Parameters
makerequiredManufacturer, e.g.
bmw.searchoptionalCase-insensitive substring match on the model name.
yearoptionalOnly models with a car in production in this year.
limitoptionalHow many results to return. Must be between
1and100. Default is10. A value outside that range is rejected rather than silently clamped.offsetoptionalNumber of results to skip. Used for pagination. Default is
0.
Headers
X-Api-KeyrequiredAPI Key associated with your account.
Response
A JSON array of objects, or an error if the request is unsuccessful.
Sample Request Live Demo!
Try our APIs in the API playground
Sign up for a free API key to get started — no credit card required.
https://api.api-ninjas.com/v2/carmodels?make=BMWHeaders
X-Api-KeyLog in or sign up to get your API KeySample Response
Code Examples
1
2
curl -X GET "https://api.api-ninjas.com/v2/carmodels?make=BMW" \
-H "X-Api-Key: YOUR_API_KEY"Business tier and above, or any annual plan
https://api.api-ninjas.com/v2/cargenerations
Lists the generations of a model. Useful when you want to browse by generation or chassis code — but optional, since /v2/cars accepts generation and chassis_code directly.
One generation often covers several chassis codes. BMW's 2004–2010 3 Series is E90 (saloon), E91 (Touring), E92 (coupé) and E93 (convertible) — one generation, four codes. So chassis_codes lists them all, and passing chassis_code=E91 finds the generation that contains it.
Parameters
makerequiredManufacturer, e.g.
bmw.modelrequiredModel, e.g.
3-series.chassis_codeoptionalFilter to one code, e.g.
E91. Matches any generation whosechassis_codescontains it.yearoptionalOnly generations in production in this year.
has_carsoptionalSet
trueto omit generations that have no cars.limitoptionalHow many results to return. Must be between
1and100. Default is10. A value outside that range is rejected rather than silently clamped.offsetoptionalNumber of results to skip. Used for pagination. Default is
0.
Headers
X-Api-KeyrequiredAPI Key associated with your account.
Response
A JSON array of objects, or an error if the request is unsuccessful.
Sample Request Live Demo!
Try our APIs in the API playground
Sign up for a free API key to get started — no credit card required.
https://api.api-ninjas.com/v2/cargenerations?make=BMW&model=3%20SeriesHeaders
X-Api-KeyLog in or sign up to get your API KeySample Response
Code Examples
1
2
curl -X GET "https://api.api-ninjas.com/v2/cargenerations?make=BMW&model=3%20Series" \
-H "X-Api-Key: YOUR_API_KEY"Frequently Asked Questions
Can I use the Cars API for commercial purposes?
Yes, but you must have a premium subscription. Commercial use of the Cars API is not permitted on the free tier. See our pricing page to choose a plan that fits your needs.How do I get an API key and start using the Cars API?
Sign up for a free account to instantly get your API key, then pass it in theX-Api-Keyheader on every request. The documentation above includes ready-to-run examples in cURL, Python, JavaScript, Node.js, and more.What happens if I exceed my quota for the month?
Your API requests will simply be denied once you hit your monthly quota — you will never be charged more than the plan you signed up for. To increase your quota, you can upgrade your plan any time on our pricing page.What happens if a request to the Cars API fails?
The API responds with a standard HTTP status code and a JSON error message describing the problem. See our error codes reference for the full list of codes and how to resolve each one, or contact support if you need help.How do I build make, model, generation and engine dropdowns?
Two ways. For a classic cascade, call/v2/carmakes, then/v2/carmodelswith amake, then/v2/cargenerationsfor the generation or chassis code (for exampleE90on a BMW 3 Series). Faster is/v2/carfacets, which returns the available values and counts for every dimension in a single request and narrows them as the user chooses - so a dependent dropdown does not need one call per level. Everything is looked up by name:make=bmw&model=3-series, with case and punctuation ignored./v2/carmakes,/v2/carmodelsand/v2/carfacetsare available on the free tier.How do I search for cars without walking the hierarchy?
Use/v2/cars, which searches the whole catalogue with any combination of filters and needs no generation, model or id first. For example/v2/cars?body=Wagon&fuel=diesel&min_power_hp=150&max_power_hp=200&min_year=2010returns every diesel wagon between 150 and 200 hp still in production from 2010. Filters includemake,model,generation,chassis_code,body,doors,badge,fuel,transmission,drive,cylinders,engine_code, power and year ranges, plussort,limitandoffset. The total number of matches is returned in theX-Total-Countresponse header.Why does one badge such as 320d return several cars?
Because a model designation is not unique within a generation. In the BMW E90 alone,320dcovers both 163 hp and 177 hp engines in manual and automatic, across four body styles./v2/carstherefore returns each car separately, withbadge,power_hp,transmission,drive,fuel,bodyanddisplacement_las separate fields, so every result is distinguishable on sight. Use/v2/carfacets?facets=badgeto get one row per designation with a count when you want a compact dropdown.Why is chassis_codes an array rather than a single code?
Because a generation genuinely covers several codes. BMW usesE90for the saloon,E91for the Touring,E92for the coupe andE93for the convertible, and the source data does not record which code belongs to which body - Mercedes ships three codes across seven bodies, and Volkswagen'sMk5andA5are two names for one generation rather than two bodies. Rather than guess, the whole set is attached to the generation and no individual car claims one code. Filtering bychassis_code=E91still works: it matches any generation whose set contains that code.Do I need a second call to get a car's specifications?
No./v2/carsreturns the full specification sheet with every car, whether you searched for it or fetched it byid- dozens of attributes covering engine power, torque, fuel consumption, dimensions, curb weight and seating capacity. Values keep their unit as a separate field, for example{"value": 1995, "unit": "cm3"}, so they can be compared and sorted without parsing strings. Because each car carries a sheet of roughly 2 KB, the defaultlimitis10; raise it up to100when you need more. Passidsto fetch up to 50 known cars at once - request order is preserved and a handle matching nothing comes back as null.Are the car ids stable enough to store in my own database?
Yes. Each car carries anidsuch ascar_e71ff3416a, derived deterministically from the vehicle's own identity rather than from row order, so it survives our periodic data refreshes. Storing that id against a customer's vehicle is the intended pattern. An id only changes if the underlying car's identity genuinely changes, so treat a404from/v2/cars?id=as a prompt to re-resolve from make, model and generation. No other identifiers are needed anywhere in the API - every other lookup takes a plain name.Can I select a car by its chassis or development code, such as E90 or W204?
Yes, where the manufacturer publishes one./v2/cargenerationsreturnschassis_codesfor each generation, and both/v2/cargenerationsand/v2/carsacceptchassis_codeas a filter. Coverage varies sharply by brand: above 70% for BMW, Mercedes-Benz and Audi, around 45-57% for Toyota and Nissan, and close to zero for several volume brands. Where no code exists,chassis_codeis null and theordinalfield carries the generation number instead.What are some use cases for the Cars API?
It powers automotive marketplaces, parts-fitment and vehicle-selection dropdowns, comparison tools, fleet and insurance apps, and research projects needing specs across tens of thousands of models from over four hundred automakers. For EV-specific data see the Electric Vehicle API, or the Motorcycles API for two-wheelers.