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
Install the CarsXE PHP library using Composer:
composer require carsxe/carsxe
This will automatically download the library and its dependencies into your project.
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);
try {
$vehicle = $carsxe->specs(['vin' => 'WBAFR7C57CC811956']);
print_r($vehicle);
} catch (Exception $e) {
echo "Error: " . $e->getMessage();
}
Required:
vin
Optional:
deepdata
disableIntVINDecoding
Example:
$vehicle = $carsxe->specs(['vin' => 'WBAFR7C57CC811956']);
Required:
vin
Optional:
- None
Example:
$intVin = $carsxe->intVinDecoder(['vin' => 'WF0MXXGBWM8R43240']);
Required:
plate
country
(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']);
Required:
vin
Optional:
state
Example:
$marketValue = $carsxe->marketValue(['vin' => 'WBAFR7C57CC811956']);
Required:
vin
Optional:
- None
Example:
$history = $carsxe->history(['vin' => 'WBAFR7C57CC811956']);
Required:
make
model
Optional:
year
trim
color
transparent
angle
photoType
size
license
Example:
$images = $carsxe->images(['make' => 'BMW', 'model' => 'X5', 'year' => '2019']);
Required:
vin
Optional:
- None
Example:
$recalls = $carsxe->recalls(['vin' => '1C4JJXR64PW696340']);
Required:
upload_url
Optional:
- None
Example:
$plateImage = $carsxe->plateImageRecognition(['upload_url' => 'https://api.carsxe.com/img/apis/plate_recognition.JPG']);
Required:
upload_url
Optional:
- None
Example:
$vinOcr = $carsxe->vinOcr(['upload_url' => 'https://api.carsxe.com/img/apis/plate_recognition.JPG']);
Required:
year
make
model
Optional:
trim
Example:
$ymm = $carsxe->yearMakeModel(['year' => '2023', 'make' => 'Toyota', 'model' => 'Camry']);
Required:
code
Optional:
- None
Example:
$obdCode = $carsxe->obdCodesDecoder(['code' => 'P0115']);
- 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.
This library is licensed under the MIT License. See the LICENSE file for details.