A powerful, easy-to-use API for vehicle data including specs, market value, license plate decoding, and more.
Project description
🚗 CarsXE API (Python Package)
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
To get started with the CarsXE API, follow these steps:
-
Sign up for a CarsXE account:
- Register here
- Add a payment method to activate your subscription and get your API key.
-
Install the CarsXE pip package:
Run this command in your terminal:
pip install carsxe
-
Import the CarsXE API into your code:
from carsxe_api import CarsXE
-
Initialize the API with your API key:
API_KEY = 'YOUR_API_KEY' carsxe = CarsXE(API_KEY)
-
Use the various endpoint methods provided by the API to access the data you need.
Usage
vin = 'WBAFR7C57CC811956'
try:
vehicle = carsxe.specs({"vin": vin})
print(vehicle["input"]["vin"])
except Exception as error:
print(f"Error: {error}")
📚 Endpoints
The CarsXE API provides the following endpoint methods:
specs – Decode VIN & get full vehicle specifications
Required:
vin
Optional:
deepdatadisableIntVINDecoding
Example:
vehicle = carsxe.specs({"vin": "WBAFR7C57CC811956"})
int_vin_decoder – Decode VIN with worldwide support
Required:
vin
Optional:
- None
Example:
intvin = carsxe.int_vin_decoder({"vin": "WF0MXXGBWM8R43240"})
plate_decoder – 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)
Note:
- The
stateparameter is required only when applicable (for specific countries such as US, AU, CA, etc.).- For Pakistan (
country='pk'), bothstateanddistrictare required.
Example:
decoded_plate = carsxe.plate_decoder({"plate": "7XER187", "state": "CA", "country": "US"})
market_value – Estimate vehicle market value based on VIN
Required:
vin
Optional:
state
Example:
marketvalue = carsxe.market_value({"vin": "WBAFR7C57CC811956"})
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"})
plate_image_recognition – Read & decode plates from images
Required:
upload_url
Optional:
- None
Example:
plateimg = carsxe.plate_image_recognition({"upload_url": "https://api.carsxe.com/img/apis/plate_recognition.JPG"})
vin_ocr – Extract VINs from images using OCR
Required:
upload_url
Optional:
- None
Example:
vinocr = carsxe.vin_ocr({"upload_url": "https://api.carsxe.com/img/apis/plate_recognition.JPG"})
year_make_model – Query vehicle by year, make, model and trim (optional)
Required:
yearmakemodel
Optional:
trim
Example:
yymm = carsxe.year_make_model({"year": "2012", "make": "BMW", "model": "5 Series"})
obd_codes_decoder – Decode OBD error/diagnostic codes
Required:
code
Optional:
- None
Example:
obdcode = carsxe.obd_codes_decoder({"code": "P0115"})
Notes & Best Practices
- Parameter requirements: Each endpoint requires specific parameters—see the Required/Optional fields above.
- Return values: All responses are Python dictionaries for easy access and manipulation.
- Error handling: Use try/except blocks to gracefully handle API errors.
- More info: For advanced usage and full details, visit the official API documentation.
Overall
CarsXE API provides a wide range of powerful, easy-to-use tools for accessing and integrating vehicle data into your applications and services. Whether you're a developer or a business owner, you can quickly get the information you need to take your projects to the next level—without hassle or inconvenience.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file carsxe-1.0.2-py3-none-any.whl.
File metadata
- Download URL: carsxe-1.0.2-py3-none-any.whl
- Upload date:
- Size: 6.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d3c21233ea3fbffc4f311da70858948705170eba2b22a3810d9f7b0f7e2275fd
|
|
| MD5 |
f41df3591a941d9dbe91db59fe0c1005
|
|
| BLAKE2b-256 |
c7a834f4299caa6b28970cfb5d3e717a6b65490693edab9ee6c0215096dfe754
|