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

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:

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

(4.2)

From 9,240 users

2,100+

Applications using this API

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 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

  • 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

A JSON array of objects, or an error if the request is unsuccessful.

Sample Request Live Demo!

make
model
badge

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=320d

Headers

X-Api-KeyLog in or sign up to get your API Key

Sample Response

JSON
[
    {
      id:"car_e71ff3416a",
      make:"BMW",
      model:"3 Series",
      generation:"E90/E91/E92/E93",
      chassis_codes:[
        "E90",
        "E91",
        "E92",
        "E93"
      ],
      year_begin:2004,
      year_end:2010,
      body:"Wagon",
      doors:null,
      body_name:"Touring",
      name:"320d AT (163 hp)",
      badge:"320d",
      engine:"2.0 turbo diesel",
      power_hp:163,
      power_kw:120,
      displacement_l:2,
      cylinders:4,
      transmission:"automatic",
      gearbox:"AT",
      gears:6,
      drive:"rwd",
      fuel:"diesel",
      spec_count:45,
      specs:{
        Capacity:{
          value:1995,
          unit:"cm3"
        },
        Max speed:{
          value:220,
          unit:"km/h"
        },
        Maximum torque:{
          value:340,
          unit:"N*m"
        },
        Acceleration (0-100 km/h):{
          value:8.3,
          unit:"s"
        },
        Curb weight:{
          value:1520,
          unit:"kg"
        },
        Engine type:{
          value:"Diesel"
        },
        ...:{
          value:"..."
        }
      }
    },
    "..."
]

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

  • 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

A JSON object, or an error if the request is unsuccessful.

Sample Request Live Demo!

facets
fuel

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=diesel

Headers

X-Api-KeyLog in or sign up to get your API Key

Sample Response

JSON
{
    make:[
      {
        value:"Mercedes-Benz",
        count:1858
      },
      {
        value:"Volkswagen",
        count:1421
      },
      "..."
    ],
    body:[
      {
        value:"Sedan",
        count:4901
      },
      {
        value:"Wagon",
        count:3812
      },
      "..."
    ]
}

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

  • 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

A JSON array of objects, or an error if the request is unsuccessful.

Sample Request Live Demo!

search

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=BMW

Headers

X-Api-KeyLog in or sign up to get your API Key

Sample Response

JSON
[
    {
      name:"BMW",
      slug:"bmw",
      model_count:64,
      car_count:2111
    },
    "..."
]

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

  • 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

A JSON array of objects, or an error if the request is unsuccessful.

Sample Request Live Demo!

make

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=BMW

Headers

X-Api-KeyLog in or sign up to get your API Key

Sample Response

JSON
[
    {
      make:"BMW",
      name:"3 Series",
      slug:"3-series",
      year_begin:1975,
      year_end:2025,
      generation_count:13,
      car_count:614
    },
    "..."
]

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

  • 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

A JSON array of objects, or an error if the request is unsuccessful.

Sample Request Live Demo!

make
model

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%20Series

Headers

X-Api-KeyLog in or sign up to get your API Key

Sample Response

JSON
[
    {
      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

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

  • 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/carmakes, /v2/carmodels and /v2/carfacets are available on the free tier.
  • 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. 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_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 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.