← Back to API Ninjas

Find cars, or fetch known cars by id. Always returns full specifications. Premium only.

The main endpoint. Search the whole catalogue by any combination of filters, or fetch cars you already know with id/ids. Every car is returned with its complete specification sheet attached, so no second call is needed. Each row also carries its own make, model, generation, body and engine context. At least one filter, or an id, is required. The total number of matches is returned in the X-Total-Count response header.

API Ninjas·$0.001 per call

Example code

// Using @orth/sdk - The simplest way to call APIs // Install: npm install @orth/sdk import Orthogonal from "@orth/sdk"; const orthogonal = new Orthogonal({ apiKey: process.env.ORTHOGONAL_API_KEY, }); const output = await orthogonal.run({ api: "api-ninjas", path: "/v2/cars" }); console.log(output);

Query parameters

id
string

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

ids
string

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

make
string

Manufacturer, as a word. Case and punctuation are ignored, so bmw, BMW and Bmw all resolve.

model
string

Model, as a word. '3 Series', '3-series' and '3series' all resolve.

generation
string

Generation, as a word, e.g. e90 or 'E90/E91/E92/E93'. Optional -- nothing requires going through a generation.

chassis_code
string

Filter to one chassis code, e.g. E91. Matches anything whose chassis_codes contains it.

body
string

Body style. One of Sedan, Coupe, Convertible, Wagon, Hatchback, Liftback, SUV, MPV, Van, Pickup. (Allowed: Sedan, Coupe, Convertible, Wagon, Hatchback, Liftback, SUV, MPV, Van, Pickup)

doors
number

Number of doors.

badge
string

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

fuel
string

Fuel type. (Allowed: gasoline, diesel, electric, hybrid, plugin_hybrid, lpg, cng, hydrogen, ethanol)

transmission
string

Transmission type. (Allowed: manual, automatic, cvt, dual_clutch, automated_manual, single_speed)

drive
string

Driven wheels. (Allowed: fwd, rwd, awd, 4wd)

cylinders
number

Number of cylinders.

engine_code
string

Manufacturer engine code.

min_power_hp
number

Minimum engine power in horsepower.

max_power_hp
number

Maximum engine power in horsepower.

min_year
number

Cars still in production in or after this year.

max_year
number

Cars in production in or before this year.

year
number

Cars in production in this year. A filter, not a starting point.

sort
string

Sort order. (Allowed: power_hp, -power_hp, year, -year, name, make)

limit
number

How many results to return, between 1 and 100. Default 10 -- each car carries a full specification sheet of roughly 2 KB. A value outside the range is rejected rather than silently clamped. (Default: 10)

offset
number

Number of results to skip, for pagination. Default 0. (Default: 0)

    Orthogonal - Giving AI agents the tools they need.