CarsXE Developer

CLI Quickstart Guide

Query vehicle specs, market value, history, recalls, license plates, OBD codes, and more — directly from your terminal using the CarsXE CLI.


CarsXE CLI

The CarsXE CLI lets you query vehicle data straight from your terminal — no browser, no code, no boilerplate. It works on Linux, macOS, and Windows, and is designed to integrate naturally with shell scripts, AI agents, and developer workflows.

You will need a CarsXE API key before using the CLI. Grab one from your Dashboard → Developer page.

Requirements

Installation

Install the CLI globally with npm:

Install

npm install -g @carsxe/cli

Verify the installation:

Verify

carsxe --version

Setup

Save your API key once — it is stored locally and used automatically for every command:

Save API Key

carsxe config set-key YOUR_API_KEY

The key is saved to a local config file:

OSPath
Linux / macOS~/.carsxe/config.json
WindowsC:\Users\<YourName>\.carsxe\config.json

Using an environment variable instead

If you prefer not to save the key to disk, set the CARSXE_API_KEY environment variable. The environment variable takes precedence over the saved config file.

Linux / macOS

export CARSXE_API_KEY=YOUR_API_KEY

Windows (PowerShell)

$env:CARSXE_API_KEY = "YOUR_API_KEY"

Windows (Command Prompt)

set CARSXE_API_KEY=YOUR_API_KEY

To make the variable permanent on Linux/macOS, add the export line to your ~/.bashrc, ~/.zshrc, or ~/.profile.


Global Options

These options apply to every command:

OptionDescription
--tableOutput as a formatted table instead of JSON
--rawOutput compact single-line JSON (useful with jq)
-v, --versionPrint the version number
-h, --helpDisplay help

Run carsxe <command> --help to see all options for any specific command.


Commands

specs — Vehicle Specifications

Decode a VIN and get full vehicle specifications: make, model, year, engine, trim, equipment, and more.

specs

carsxe specs --vin 1HGBH41JXMN109186
OptionRequiredDescription
--vin <vin>YesVehicle Identification Number
--deep-dataNoEnable deep data (additional equipment details)
--disable-int-vinNoDisable international VIN decoding fallback

market-value — Market Value

Get the current estimated market value of a vehicle.

market-value

carsxe market-value --vin 1HGBH41JXMN109186 --mileage 45000 --state CA --condition clean
OptionRequiredDescription
--vin <vin>YesVehicle Identification Number
--mileage <mileage>NoCurrent odometer reading in miles
--state <state>NoTwo-letter US state code for regional pricing (e.g. CA, TX)
--condition <condition>NoVehicle condition: excellent | clean | average | rough
--country <country>NoCountry code for pricing (default: US)

history — Vehicle History

Get a full vehicle history report including past owners, accidents, title status, and odometer readings.

history

carsxe history --vin 1HGBH41JXMN109186
OptionRequiredDescription
--vin <vin>YesVehicle Identification Number

recalls — Safety Recalls

Check for open safety recalls on a vehicle.

recalls

carsxe recalls --vin 1HGBH41JXMN109186
OptionRequiredDescription
--vin <vin>YesVehicle Identification Number

lien-theft — Lien & Theft Check

Check whether a vehicle has active liens or has been reported stolen.

lien-theft

carsxe lien-theft --vin 1HGBH41JXMN109186
OptionRequiredDescription
--vin <vin>YesVehicle Identification Number

international-vin — International VIN Decoder

Decode a VIN from a non-US vehicle (European, Asian, and other markets).

international-vin

carsxe international-vin --vin WBAFR7C57CC811956
OptionRequiredDescription
--vin <vin>YesVehicle Identification Number

plate-decoder — License Plate Decoder

Look up vehicle information from a license plate number.

plate-decoder

carsxe plate-decoder --plate ABC1234 --country US --state CA
OptionRequiredDescription
--plate <plate>YesLicense plate number
--country <country>YesCountry code (e.g. US, GB, DE, CA)
--state <state>NoState or province code (e.g. CA, TX, ON)
--district <district>NoDistrict or region

plate-image — Plate Image Recognition

Extract and decode a license plate from an image URL.

plate-image

carsxe plate-image --image https://example.com/car-photo.jpg
OptionRequiredDescription
--image <url>YesPublicly accessible URL of the image

vin-ocr — VIN OCR from Image

Extract a VIN from a photo of a VIN plate or dashboard sticker.

vin-ocr

carsxe vin-ocr --image https://example.com/vin-sticker.jpg
OptionRequiredDescription
--image <url>YesPublicly accessible URL of the image

ymm — Year / Make / Model

Look up vehicle data when you don't have a VIN — search by year, make, and model instead.

ymm

carsxe ymm --year 2020 --make Toyota --model Camry --trim LE
OptionRequiredDescription
--year <year>YesModel year (e.g. 2020)
--make <make>YesVehicle make (e.g. Toyota)
--model <model>YesVehicle model (e.g. Camry)
--trim <trim>NoTrim level (e.g. LE, XSE)

images — Vehicle Images

Retrieve photos of a vehicle by make, model, and year.

images

carsxe images --make Toyota --model Camry --year 2020 --angle front --size Large
OptionRequiredDescription
--make <make>YesVehicle make
--model <model>YesVehicle model
--year <year>NoModel year
--trim <trim>NoTrim level
--color <color>NoVehicle color
--angle <angle>NoPhoto angle: front | side | back
--photo-type <type>NoPhoto type: interior | exterior | engine
--size <size>NoImage size: Small | Medium | Large | Wallpaper | All

obd — OBD-II Code Decoder

Decode a diagnostic trouble code (DTC) from your OBD-II scanner.

obd

carsxe obd --code P0300
OptionRequiredDescription
--code <code>YesOBD-II code (e.g. P0300, C1234, B0001, U0100)

config — Configuration

Manage your saved API key.

config

# Save your API key
carsxe config set-key YOUR_API_KEY
# Show active key and its source
carsxe config get-key
# Remove the saved key
carsxe config remove-key

Output Formats

By default all commands return pretty-printed JSON. Two flags change the format:

Table view — human-friendly two-column layout, great for quick inspection:

--table

carsxe --table obd --code P0300

Nested objects are flattened with dot notation (e.g. engine.cylinders). Arrays of primitives are joined on a single line.

Raw JSON — compact single-line output:

--raw

carsxe --raw specs --vin 1HGBH41JXMN109186

What's next?