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 Go package:
Run this command in your terminal:
go get -u github.com/carsxe/carsxe-go-package
-
Import the CarsXE API into your code:
import "github.com/carsxe/carsxe-go-package"
-
Initialize the API with your API key:
client := carsxe.New("YOUR_API_KEY")
-
Use the various endpoint methods provided by the API to access the data you need.
package main
import (
"fmt"
"github.com/carsxe/carsxe-go-package"
)
func main() {
client := carsxe.New("YOUR_API_KEY")
vin := "WBAFR7C57CC811956"
vehicle := client.Specs(map[string]string{"vin": vin})
fmt.Println(vehicle["input"].(map[string]interface{})["vin"])
}
The CarsXE API provides the following endpoint methods:
Required:
vin
Optional:
deepdata
disableIntVINDecoding
Example:
vehicle := client.Specs(map[string]string{"vin": "WBAFR7C57CC811956"})
Required:
vin
Optional:
- None
Example:
intvin := client.InternationalVINDecoder(map[string]string{"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)
Note:
- The
state
parameter is required only when applicable (for specific countries such as US, AU, CA, etc.).- For Pakistan (
country='pk'
), bothstate
anddistrict
are required.
Example:
decodedPlate := client.PlateDecoder(map[string]string{"plate": "7XER187", "state": "CA", "country": "US"})
Required:
vin
Optional:
state
Example:
marketvalue := client.MarketValue(map[string]string{"vin": "WBAFR7C57CC811956"})
Required:
vin
Optional:
- None
Example:
history := client.History(map[string]string{"vin": "WBAFR7C57CC811956"})
Required:
make
model
Optional:
year
trim
color
transparent
angle
photoType
size
license
Example:
images := client.Images(map[string]string{"make": "BMW", "model": "X5", "year": "2019"})
Required:
vin
Optional:
- None
Example:
recalls := client.Recalls(map[string]string{"vin": "1C4JJXR64PW696340"})
Required:
imageURL
Optional:
- None
Example:
plateimg := client.PlateImageRecognition("https://api.carsxe.com/img/apis/plate_recognition.JPG")
Required:
imageURL
Optional:
- None
Example:
vinocr := client.VinOCR("https://api.carsxe.com/img/apis/plate_recognition.JPG")
Required:
year
make
model
Optional:
trim
Example:
yymm := client.YearMakeModel(map[string]string{"year": "2012", "make": "BMW", "model": "5 Series"})
Required:
code
Optional:
- None
Example:
obdcode := client.ObdCodesDecoder(map[string]string{"code": "P0115"})
- Parameter requirements: Each endpoint requires specific parameters—see the Required/Optional fields above.
- Return values: All responses are Go maps (
map[string]any
) for easy access and manipulation. - Error handling: The client currently panics on network or JSON decode errors. Consider wrapping calls with
recover
or modifying the client to return errors for production use. - More info: For advanced usage and full details, visit the official API documentation.
The CarsXE Go package 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.