NewConnect Claude, Gemini, ChatGPT, and other AI agents to API Ninjas via our MCP server →

Cars API

The Cars API provides detailed information on cars from over 400 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.

For electric vehicle (EV)-specific data, see the Electric Vehicle API.

Online
(4.2)

From 9,240 users

2,100+

Application used this API in the last 28 days.

API Status

Online - All Systems Operational

API Response Times

Average
P50
P75
P90
P95
379ms404ms479ms876ms1265ms

Didn't find what you were looking for? Suggest an improvement


5 endpoints

Premium only

https://api.api-ninjas.com/v2/cars

The main endpoint. Search all 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

  • id  optional

    A car handle, e.g. car_e71ff3416a. Safe to store — it is derived from the car's identity and survives data refreshes.

  • ids  optional

    Comma-separated handles, at most 50. Request order is preserved, and a handle matching nothing comes back as null.

  • make  optional

    Manufacturer, e.g. bmw. Case and punctuation are ignored.

  • model  optional

    Model, e.g. 3-series.

  • generation  optional

    Generation, e.g. e90-e91-e92-e93.

  • chassis_code  optional

    Chassis code, e.g. E91. Matches any code in the generation's set.

  • body  optional

    Sedan, Coupe, Convertible, Wagon, Hatchback, Liftback, SUV, MPV, Van or Pickup.

  • doors  optional

    Number of doors.

  • badge  optional

    Model designation, e.g. 320d. Spacing and case are ignored.

  • fuel  optional

    gasoline, diesel, electric, hybrid, plugin_hybrid, lpg, cng, hydrogen or ethanol.

  • transmission  optional

    manual, automatic, cvt, dual_clutch, automated_manual or single_speed.

  • drive  optional

    fwd, rwd, awd or 4wd.

  • cylinders  optional

    Number of cylinders.

  • engine_code  optional

    Manufacturer engine code, e.g. OM646.962.

  • min_power_hp  optional

    Minimum engine power in horsepower.

  • max_power_hp  optional

    Maximum engine power in horsepower.

  • min_year  optional

    Cars still in production in or after this year.

  • max_year  optional

    Cars in production in or before this year.

  • year  optional

    Cars in production in this year.

  • sort  optional

    power_hp, -power_hp, year, -year, name or make.

  • limit  optional

    How many results to return. Must be between 1 and 100. Default is 10. A value outside that range is rejected rather than silently clamped.

  • offset  optional

    Number of results to skip. Used for pagination. Default is 0.

Headers

  • X-Api-Key  required

    API Key associated with your account.

Response

The /v2/cars endpoint returns a JSON array of objects, or an error if the request is unsuccessful.

  • id  

    Car handle, e.g. car_e71ff3416a. Pass it back as id or ids to fetch this car again. Safe to store: it survives data refreshes.

  • make  

    Manufacturer, e.g. BMW.

  • model  

    Model, e.g. 3 Series.

  • image_url  Business tier and above

    URL of an image of the car.

  • generation  

    Generation, e.g. E90/E91/E92/E93.

  • chassis_codes  

    Every chassis code of the car's generation, e.g. ["E90", "E91", "E92", "E93"]. Empty when the generation has no chassis code.

  • year_begin  

    First production year.

  • year_end  

    Last production year.

  • body  

    Body style: Sedan, Coupe, Convertible, Wagon, Hatchback, Liftback, SUV, MPV, Van or Pickup.

  • doors  

    Number of doors.

  • body_name  

    Manufacturer's name for the body, e.g. Touring or Avant.

  • trim_line  

    Performance line, e.g. AMG or GTI.

  • market  

    Market, for a car built for one region.

  • name  

    Full name, e.g. 320d AT (177 hp).

  • badge  

    Model designation, e.g. 320d.

  • edition  

    Edition, e.g. EfficientDynamics Edition.

  • engine  

    Short engine summary, e.g. 2.0 turbo diesel.

  • power_hp  

    Engine power in horsepower.

  • power_kw  

    Engine power in kilowatts.

  • displacement_l  

    Engine displacement in litres.

  • cylinders  

    Number of cylinders.

  • transmission  

    manual, automatic, cvt, dual_clutch, automated_manual or single_speed.

  • gearbox  

    Manufacturer's name for the gearbox, e.g. Steptronic.

  • gears  

    Number of gears.

  • drive  

    fwd, rwd, awd or 4wd.

  • fuel  

    gasoline, diesel, electric, hybrid, plugin_hybrid, lpg, cng, hydrogen or ethanol.

  • engine_code  

    Manufacturer engine code, e.g. OM646.962.

  • spec_count  

    Number of entries in specs.

  • specs  

    Full specification sheet. Each key is a specification name, e.g. Curb weight or Maximum torque, and each value is an object with value and, for measurements, unit, e.g. {"value": 1570, "unit": "kg"}.

Live Demo

Live demo
Query parameters
make
model
generation
year
limit

Get a free API key to get started — no credit card required.

Headers
X-Api-KeyLog in or sign up to get your API key
GET
https://api.api-ninjas.com/v2/cars?make=toyota&model=camry&generation=xv70&year=2018&limit=1
Sample response
[
{
"id": "car_1e269c6076",
"make": "Toyota",
"model": "Camry",
"image_url": "https://media.api-ninjas.com/cars/images/front-right-v1/toyota/camry/toyota-camry-dc72f34561f906afc2b1bd36.png",
"generation": "XV70",
"chassis_codes": [
"XV70"
],
"year_begin": 2017,
"year_end": 2021,
"body": "Sedan",
"doors": null,
"body_name": null,
"trim_line": null,
"market": null,
"name": "2.0 AT (150 hp)",
"badge": "2.0",
"edition": null,
"engine": "2.0 gasoline",
"power_hp": 150,
"power_kw": 110,
"displacement_l": 2,
"cylinders": 4,
"transmission": "automatic",
"gearbox": "AT",
"gears": 6,
"drive": "fwd",
"fuel": "gasoline",
"engine_code": null,
"spec_count": 42,
"specs": {
"Acceleration (0-100 km/h)": {
"value": 10.4,
"unit": "s"
},
"Back suspension": {
"value": "Independent, Double wishbone, spring, Stabilizer bar"
},
"Body type": {
"value": "Sedan"
},
"Capacity": {
"value": 1998,
"unit": "cm3"
},
"City driving fuel consumption per 100 km": {
"value": 10.7,
"unit": "l"
},
"Cruising range": {
"value": "from 560 to 1 000",
"unit": "km"
},
"Curb weight": {
"value": 1570,
"unit": "kg"
},
"Cylinder bore": {
"value": 86,
"unit": "mm"
},
"Cylinder layout": {
"value": "Inline"
},
"Drive wheels": {
"value": "Front wheel drive"
},
"Emission standards": {
"value": "EURO VI"
},
"Engine power": {
"value": 150,
"unit": "hp"
},
"Engine type": {
"value": "Gasoline"
},
"Front brakes": {
"value": "ventilated disc"
},
"Front suspension": {
"value": "Independent, McPherson Struts, spring, Stabilizer bar"
},
"Front track": {
"value": 1580,
"unit": "mm"
},
"Fuel": {
"value": 95
},
"Fuel tank capacity": {
"value": 60,
"unit": "l"
},
"Full weight": {
"value": 2030,
"unit": "kg"
},
"Gearbox type": {
"value": "Automatic"
},
"Ground clearance": {
"value": 155,
"unit": "mm"
},
"Height": {
"value": 1445,
"unit": "mm"
},
"Highway driving fuel consumption per 100 km": {
"value": 6,
"unit": "l"
},
"Injection type": {
"value": "Multi-point fuel injection"
},
"Length": {
"value": 4885,
"unit": "mm"
},
"Max power at RPM": {
"value": "to 6 500",
"unit": "RPM"
},
"Max speed": {
"value": 210,
"unit": "km/h"
},
"Max trunk capacity": {
"value": 493,
"unit": "l"
},
"Maximum torque": {
"value": 192,
"unit": "N*m"
},
"Min trunk capacity": {
"value": 469,
"unit": "l"
},
"Mixed driving fuel consumption per 100 km": {
"value": 7.2,
"unit": "l"
},
"Number of cylinders": {
"value": 4
},
"Number of gear": {
"value": 6
},
"Number of seater": {
"value": 5
},
"Rear brakes": {
"value": "Disc"
},
"Rear track": {
"value": 1600,
"unit": "mm"
},
"Stroke cycle": {
"value": 86,
"unit": "mm"
},
"Turning circle": {
"value": 11.4,
"unit": "m"
},
"Turnover of maximum torque": {
"value": "to 4 700",
"unit": "RPM"
},
"Valves per cylinder": {
"value": 4
},
"Wheelbase": {
"value": 2825,
"unit": "mm"
},
"Width": {
"value": 1840,
"unit": "mm"
}
}
}
]

Code Examples

curl -X GET "https://api.api-ninjas.com/v2/cars?make=toyota&model=camry&generation=xv70&year=2018&limit=1" \ -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

  • facets  required

    Comma-separated dimensions to count, at most 6. One of make, model, generation, chassis_code, body, doors, fuel, transmission, drive, cylinders, year, badge.

  • make  optional

    Narrow the counts to one manufacturer.

  • model  optional

    Narrow the counts to one model.

  • generation  optional

    Narrow the counts to one generation.

  • body  optional

    Narrow the counts to one body style.

  • fuel  optional

    Narrow the counts to one fuel type.

  • transmission  optional

    Narrow the counts to one transmission.

  • drive  optional

    Narrow the counts to one drive type.

  • year  optional

    Narrow the counts to one production year.

Headers

  • X-Api-Key  required

    API Key associated with your account.

Response

The /v2/carfacets endpoint returns a JSON object, or an error if the request is unsuccessful.

One key per requested facet, e.g. make, holding an array of objects with these fields, most common first:

  • value  

    One available value, e.g. BMW or Wagon. For year, a first production year.

  • count  

    Number of cars in the current selection with this value.

Live Demo

Live demo · no API key required
Query parameters
facets
fuel

Get a free API key to get started — no credit card required.

Headers
X-Api-KeyLog in or sign up to get your API key
GET
https://api.api-ninjas.com/v2/carfacets?facets=make%2Cbody&fuel=diesel
Sample response
{
"make": [
{
"value": "Mercedes-Benz",
"count": 1858
},
{
"value": "Volkswagen",
"count": 1421
},
"..."
],
"body": [
{
"value": "Sedan",
"count": 4901
},
{
"value": "Wagon",
"count": 3812
},
"..."
]
}

Code Examples

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

  • search  optional

    Case-insensitive substring match on the manufacturer name.

  • year  optional

    Only manufacturers with a car in production in this year.

  • limit  optional

    How many results to return. Must be between 1 and 100. Default is 10. A value outside that range is rejected rather than silently clamped.

  • offset  optional

    Number of results to skip. Used for pagination. Default is 0.

Headers

  • X-Api-Key  required

    API Key associated with your account.

Response

The /v2/carmakes endpoint returns a JSON array of objects, or an error if the request is unsuccessful.

  • name  

    Manufacturer, e.g. BMW.

  • slug  

    URL-safe name, e.g. bmw. Accepted as make by the other endpoints.

  • model_count  

    Number of models.

  • car_count  

    Number of cars.

Live Demo

Live demo
Query parameters
search

Get a free API key to get started — no credit card required.

Headers
X-Api-KeyLog in or sign up to get your API key
GET
https://api.api-ninjas.com/v2/carmakes?search=BMW
Sample response
[
{
"name": "BMW",
"slug": "bmw",
"model_count": 64,
"car_count": 2111
},
"..."
]

Code Examples

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 and 3-series.

Parameters

  • make  required

    Manufacturer, e.g. bmw.

  • search  optional

    Case-insensitive substring match on the model name.

  • year  optional

    Only models with a car in production in this year.

  • limit  optional

    How many results to return. Must be between 1 and 100. Default is 10. A value outside that range is rejected rather than silently clamped.

  • offset  optional

    Number of results to skip. Used for pagination. Default is 0.

Headers

  • X-Api-Key  required

    API Key associated with your account.

Response

The /v2/carmodels endpoint returns a JSON array of objects, or an error if the request is unsuccessful.

  • make  

    Manufacturer, e.g. BMW.

  • name  

    Model, e.g. 3 Series.

  • slug  

    URL-safe name, e.g. 3-series. Accepted as model by /v2/cars, /v2/carfacets and /v2/cargenerations.

  • year_begin  

    First production year of the model.

  • year_end  

    Last production year of the model.

  • generation_count  

    Number of generations.

  • car_count  

    Number of cars.

Live Demo

Live demo
Query parameters
make

Get a free API key to get started — no credit card required.

Headers
X-Api-KeyLog in or sign up to get your API key
GET
https://api.api-ninjas.com/v2/carmodels?make=BMW
Sample response
[
{
"make": "BMW",
"name": "3 Series",
"slug": "3-series",
"year_begin": 1975,
"year_end": 2025,
"generation_count": 13,
"car_count": 614
},
"..."
]

Code Examples

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

  • make  required

    Manufacturer, e.g. bmw.

  • model  required

    Model, e.g. 3-series.

  • chassis_code  optional

    Filter to one code, e.g. E91. Matches any generation whose chassis_codes contains it.

  • year  optional

    Only generations in production in this year.

  • has_cars  optional

    Set true to omit generations that have no cars.

  • limit  optional

    How many results to return. Must be between 1 and 100. Default is 10. A value outside that range is rejected rather than silently clamped.

  • offset  optional

    Number of results to skip. Used for pagination. Default is 0.

Headers

  • X-Api-Key  required

    API Key associated with your account.

Response

The /v2/cargenerations endpoint returns a JSON array of objects, or an error if the request is unsuccessful.

  • make  

    Manufacturer, e.g. BMW.

  • model  

    Model, e.g. 3 Series.

  • name  

    Generation, e.g. E90/E91/E92/E93.

  • slug  

    URL-safe name, e.g. e90-e91-e92-e93. Accepted as generation by /v2/cars and /v2/carfacets.

  • chassis_codes  

    Every chassis code the generation covers, e.g. ["E90", "E91", "E92", "E93"]. Empty when it has none.

  • ordinal  

    Generation number, for manufacturers that number their generations.

  • facelift  

    true for a facelifted version of a generation.

  • market  

    Market, for a generation built for one region.

  • year_begin  

    First production year.

  • year_end  

    Last production year.

  • car_count  

    Number of cars in the generation.

Live Demo

Live demo · no API key required
Query parameters
make
model

Get a free API key to get started — no credit card required.

Headers
X-Api-KeyLog in or sign up to get your API key
GET
https://api.api-ninjas.com/v2/cargenerations?make=BMW&model=3%20Series
Sample response
[
{
"make": "BMW",
"model": "3 Series",
"name": "E90/E91/E92/E93",
"slug": "e90-e91-e92-e93",
"chassis_codes": [
"E90",
"E91",
"E92",
"E93"
],
"ordinal": null,
"facelift": false,
"market": null,
"year_begin": 2004,
"year_end": 2010,
"car_count": 144
},
"..."
]

Code Examples

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

  • 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.
  • Sign up for a free account to instantly get your API key, then pass it in the X-Api-Key header on every request. The documentation above includes ready-to-run examples in cURL, Python, JavaScript, Node.js, and more.
  • 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.
  • 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.
  • Two ways. For a classic cascade, call /v2/carmakes, then /v2/carmodels with a make, then /v2/cargenerations for the generation or chassis code (for example E90 on 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/carfacets is available on the free tier; /v2/carmakes and /v2/carmodels require a premium plan.
  • 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=2010 returns every diesel wagon between 150 and 200 hp still in production from 2010. Filters include make, model, generation, chassis_code, body, doors, badge, fuel, transmission, drive, cylinders, engine_code, power and year ranges, plus sort, limit and offset. The total number of matches is returned in the X-Total-Count response header.
  • Because a model designation is not unique within a generation. In the BMW E90 alone, 320d covers both 163 hp and 177 hp engines in manual and automatic, across four body styles. /v2/cars therefore returns each car separately, with badge, power_hp, transmission, drive, fuel, body and displacement_l as separate fields, so every result is distinguishable on sight. Use /v2/carfacets?facets=badge to get one row per designation with a count when you want a compact dropdown.
  • Because a generation genuinely covers several codes. BMW uses E90 for the saloon, E91 for the Touring, E92 for the coupe and E93 for the convertible, and the source data does not record which code belongs to which body - Mercedes ships three codes across seven bodies, and Volkswagen's Mk5 and A5 are 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 by chassis_code=E91 still works: it matches any generation whose set contains that code.
  • No. /v2/cars returns the full specification sheet with every car, whether you searched for it or fetched it by id - 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 default limit is 10; raise it up to 100 when you need more. Pass ids to fetch up to 50 known cars at once - request order is preserved and a handle matching nothing comes back as null.
  • Yes. Each car carries an id such as car_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 a 404 from /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.
  • Yes, where the manufacturer publishes one. /v2/cargenerations returns chassis_codes for each generation, and both /v2/cargenerations and /v2/cars accept chassis_code as a filter. Where no code exists, chassis_code is null and the ordinal field carries the generation number instead.
  • It powers automotive marketplaces, parts-fitment and vehicle-selection dropdowns, comparison tools, fleet and insurance apps, and research projects needing specs for cars from over 400 automakers. For EV-specific data see the Electric Vehicle API, or the Motorcycles API for two-wheelers.