carsxe / carsxe
A powerful, easy-to-use API for vehicle data including specs, market value, license plate decoding, and more.
Requires
- php: ^7.4
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
CarsXE is a powerful and developer-friendly API that gives you instant access to a wide range of vehicle data. From VIN decoding and market value estimation to vehicle history, images, OBD code explanations, and plate recognition, CarsXE provides everything you need to build automotive applications at scale.
🌐 Website: https://api.carsxe.com
📄 Docs: https://api.carsxe.com/docs
📦 All Products: https://api.carsxe.com/all-products
Installation
Install the CarsXE PHP library using Composer:
composer require carsxe/carsxe
This will automatically download the library and its dependencies into your project.
Usage
Initialize the CarsXE Library
To start using the CarsXE API, include Composer's autoloader and create an instance of the Carsxe class with your API key:
require_once __DIR__ . '/vendor/autoload.php'; use CarsxeDeveloper\Carsxe\Carsxe; $API_KEY = 'YOUR_API_KEY'; $carsxe = new Carsxe($API_KEY);
Example: Decode Vehicle Specifications (specs Endpoint)
try { $vehicle = $carsxe->specs(['vin' => 'WBAFR7C57CC811956']); print_r($vehicle); } catch (Exception $e) { echo "Error: " . $e->getMessage(); }
Endpoints
specs – Decode VIN & get full vehicle specifications
Required:
vin
Optional:
deepdatadisableIntVINDecoding
Example:
$vehicle = $carsxe->specs(['vin' => 'WBAFR7C57CC811956']);
intVinDecoder – Decode VIN with worldwide support
Required:
vin
Optional:
- None
Example:
$intVin = $carsxe->intVinDecoder(['vin' => 'WF0MXXGBWM8R43240']);
plateDecoder – Decode license plate info (plate, country)
Required:
platecountry(always required except for US, where it is optional and defaults to 'US')
Optional:
state(required for some countries, e.g. US, AU, CA)district(required for Pakistan)
Example:
$decodedPlate = $carsxe->plateDecoder(['plate' => '7XER187', 'state' => 'CA', 'country' => 'US']);
marketValue – Estimate vehicle market value based on VIN
Required:
vin
Optional:
statemileagecondition
Example:
$marketValue = $carsxe->marketValue(['vin' => 'WBAFR7C57CC811956', 'state' => 'CA', 'mileage' => 50000, 'condition' => 'clean']);
history – Retrieve vehicle history
Required:
vin
Optional:
- None
Example:
$history = $carsxe->history(['vin' => 'WBAFR7C57CC811956']);
images – Fetch images by make, model, year, trim
Required:
makemodel
Optional:
yeartrimcolortransparentanglephotoTypesizelicense
Example:
$images = $carsxe->images(['make' => 'BMW', 'model' => 'X5', 'year' => '2019']);
recalls – Get safety recall data for a VIN
Required:
vin
Optional:
- None
Example:
$recalls = $carsxe->recalls(['vin' => '1C4JJXR64PW696340']);
plateImageRecognition – Read & decode plates from images
Required:
upload_url
Optional:
- None
Example:
$plateImage = $carsxe->plateImageRecognition(['upload_url' => 'https://api.carsxe.com/img/apis/plate_recognition.JPG']);
vinOcr – Extract VINs from images using OCR
Required:
upload_url
Optional:
- None
Example:
$vinOcr = $carsxe->vinOcr(['upload_url' => 'https://api.carsxe.com/img/apis/plate_recognition.JPG']);
yearMakeModel – Query vehicle by year, make, model and trim (optional)
Required:
yearmakemodel
Optional:
trim
Example:
$ymm = $carsxe->yearMakeModel(['year' => '2023', 'make' => 'Toyota', 'model' => 'Camry']);
obdCodesDecoder – Decode OBD error/diagnostic codes
Required:
code
Optional:
- None
Example:
$obdCode = $carsxe->obdCodesDecoder(['code' => 'P0115']);
lienAndTheft – Check lien and theft status by VIN
Required:
vin
Optional:
- None
Example:
$lienTheft = $carsxe->lienAndTheft(['vin' => '2C3CDXFG1FH762860']);
recallsYmm – Get safety recall data by year, make, and model
Required:
yearmakemodel
Optional:
- None
Example:
$recallsYmm = $carsxe->recallsYmm(['year' => '2026', 'make' => 'toyota', 'model' => 'corolla']);
submitBulkRecallBatch – Submit many VINs for async recall checking
Required (at least one):
vins(array of 17-character VIN strings)csv(inline CSV text)csvUrl(HTTPS URL to a CSV file)
Optional:
webhookUrl
Example:
$batch = $carsxe->submitBulkRecallBatch([ 'vins' => ['1HGBH41JXMN109186', '5YJSA1E26HF000001', '1C4JJXR64PW696340'], 'webhookUrl' => 'https://your-server.com/webhook', ]);
getBulkRecallBatchStatus – Poll a recalls batch job
Required:
batchId
Optional:
- None
Example:
$status = $carsxe->getBulkRecallBatchStatus(['batchId' => 'brb_mnablbn7_wvbaqv']);
getBulkRecallBatchResults – Fetch completed recalls batch results as JSON
Required:
batchId
Optional:
- None
Example:
$results = $carsxe->getBulkRecallBatchResults(['batchId' => 'brb_mnablbn7_wvbaqv']);
downloadBulkRecallBatch / getBulkRecallBatchDownloadUrl – Download recalls batch results as CSV
Required:
batchId
Optional:
- None
Example:
$csv = $carsxe->downloadBulkRecallBatch(['batchId' => 'brb_mnablbn7_wvbaqv']); $downloadUrl = $carsxe->getBulkRecallBatchDownloadUrl(['batchId' => 'brb_mnablbn7_wvbaqv']);
ymmOptions – Populate year / make / model / variant dropdowns
Required:
- None (omit filters to list years)
Optional:
dimension(years|makes|models|trims|variants)yearmakemodel
Example:
$years = $carsxe->ymmOptions([]); $makes = $carsxe->ymmOptions(['year' => '2026']); $models = $carsxe->ymmOptions(['make' => 'Toyota']); $variants = $carsxe->ymmOptions(['year' => '2026', 'make' => 'Toyota', 'model' => 'Tacoma']);
ownershipVin – Look up registered owner(s) by VIN
Enterprise-only. Billed per matching owner record.
Required:
vin
Optional:
include(comma-separated:demographics,emails,phones,vehicle_history)
Example:
$owners = $carsxe->ownershipVin(['vin' => '1FT8X3BT0BEA61538']);
ownershipPerson – Look up a person by name and address
Enterprise-only. Billed per matching record.
Required:
first_namelast_nameaddresszip
Optional:
include
Example:
$person = $carsxe->ownershipPerson([ 'first_name' => 'John', 'last_name' => 'Sample', 'address' => '123 Example St', 'zip' => '90210', ]);
ownershipAddress – Look up residents at a street address
Enterprise-only. Billed per matching record.
Required:
addresszip
Optional:
includevariant(legacy; preferinclude)
Example:
$residents = $carsxe->ownershipAddress(['address' => '123 Example St', 'zip' => '90210']);
ownershipZip – Search people in a ZIP code
Enterprise-only. Billed per record on the page.
Required:
zip
Optional:
gendermin_agemax_ageincomepagelimitincludevariant(legacy; preferinclude)
Example:
$area = $carsxe->ownershipZip(['zip' => '90210', 'gender' => 'f', 'min_age' => 45]);
Notes
- Parameter Names: Use parameter names exactly as shown in this README to avoid errors.
- Autoloader: Add
require_once __DIR__ . '/vendor/autoload.php';at the top of your script if not already included by your framework or tool. - Response Format: All API responses are PHP arrays for easy access and manipulation.
License
This library is licensed under the MIT License. See the LICENSE file for details.