CarsXE 1.0.3
dotnet add package CarsXE --version 1.0.3
NuGet\Install-Package CarsXE -Version 1.0.3
<PackageReference Include="CarsXE" Version="1.0.3" />
<PackageVersion Include="CarsXE" Version="1.0.3" />
<PackageReference Include="CarsXE" />
paket add CarsXE --version 1.0.3
#r "nuget: CarsXE, 1.0.3"
#:package CarsXE@1.0.3
#addin nuget:?package=CarsXE&version=1.0.3
#tool nuget:?package=CarsXE&version=1.0.3
🚗 CarsXE API (.NET 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 NuGet package:
Run this command in your terminal:
dotnet add package CarsXEImport the CarsXE API into your code:
using carsxe;Initialize the API with your API key:
string API_KEY = "YOUR_API_KEY"; CarsXE carsxe = new CarsXE(API_KEY);Use the various endpoint methods provided by the API to access the data you need.
Usage
string vin = "WBAFR7C57CC811956";
try
{
var specs = carsxe.Specs(new Dictionary<string, string> { { "vin", vin } }).Result;
Console.WriteLine("API Response:");
Console.WriteLine(specs.RootElement.GetProperty("input").GetProperty("vin").ToString());
}
catch (Exception ex)
{
Console.WriteLine($"Error: {ex.Message}");
}
📚 Endpoints
The CarsXE API provides the following endpoint methods:
Specs – Decode VIN & get full vehicle specifications
Required:
vin
Optional:
deepdatadisableIntVINDecoding
Example:
var vehicle = carsxe.Specs(new Dictionary<string, string> { { "vin", "WBAFR7C57CC811956" } }).Result;
InternationalVinDecoder – Decode VIN with worldwide support
Required:
vin
Optional:
- None
Example:
var intvin = carsxe.InternationalVinDecoder(new Dictionary<string, string> { { "vin", "WF0MXXGBWM8R43240" } }).Result;
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)
Note:
- The
stateparameter is required only when applicable (for specific countries such as US, AU, CA, etc.).- For Pakistan (
country='pk'), bothstateanddistrictare required.
Example:
var decodedPlate = carsxe.PlateDecoder(new Dictionary<string, string>
{
{ "plate", "7XER187" },
{ "state", "CA" },
{ "country", "US" }
}).Result;
MarketValue – Estimate vehicle market value based on VIN
Required:
vin
Optional:
state
Example:
var marketvalue = carsxe.MarketValue(new Dictionary<string, string> { { "vin", "WBAFR7C57CC811956" } }).Result;
History – Retrieve vehicle history
Required:
vin
Optional:
- None
Example:
var history = carsxe.History(new Dictionary<string, string> { { "vin", "WBAFR7C57CC811956" } }).Result;
Images – Fetch images by make, model, year, trim
Required:
makemodel
Optional:
yeartrimcolortransparentanglephotoTypesizelicense
Example:
var images = carsxe.Images(new Dictionary<string, string>
{
{ "make", "BMW" },
{ "model", "X5" },
{ "year", "2019" }
}).Result;
Recalls – Get safety recall data for a VIN
Required:
vin
Optional:
- None
Example:
var recalls = carsxe.Recalls(new Dictionary<string, string> { { "vin", "1C4JJXR64PW696340" } }).Result;
PlateImageRecognition – Read & decode plates from images
Required:
imageUrl
Optional:
- None
Example:
var plateimg = carsxe.PlateImageRecognition("https://api.carsxe.com/img/apis/plate_recognition.JPG").Result;
VinOcr – Extract VINs from images using OCR
Required:
imageUrl
Optional:
- None
Example:
var vinocr = carsxe.VinOcr("https://api.carsxe.com/img/apis/plate_recognition.JPG").Result;
YearMakeModel – Query vehicle by year, make, model and trim (optional)
Required:
yearmakemodel
Optional:
trim
Example:
var yymm = carsxe.YearMakeModel(new Dictionary<string, string>
{
{ "year", "2012" },
{ "make", "BMW" },
{ "model", "5 Series" }
}).Result;
ObdCodesDecoder – Decode OBD error/diagnostic codes
Required:
code
Optional:
- None
Example:
var obdcode = carsxe.ObdCodesDecoder(new Dictionary<string, string> { { "code", "P0115" } }).Result;
Async/Await Usage (Recommended)
For better performance and non-blocking operations, use async/await instead of .Result:
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using carsxe;
class Program
{
static async Task Main(string[] args)
{
string API_KEY = "YOUR_API_KEY_HERE";
await using var carsxe = new CarsXE(API_KEY);
try
{
var specs = await carsxe.Specs(new Dictionary<string, string> { { "vin", "WBAFR7C57CC811956" } });
Console.WriteLine("Year: " + specs.RootElement.GetProperty("attributes").GetProperty("year").ToString());
}
catch (Exception ex)
{
Console.WriteLine($"Error: {ex.Message}");
}
}
}
Notes & Best Practices
- Parameter requirements: Each endpoint requires specific parameters—see the Required/Optional fields above.
- Return values: All responses are JsonDocument objects for easy access and manipulation using System.Text.Json.
- Error handling: Use try/catch blocks to gracefully handle API errors.
- Async operations: Use async/await for better performance instead of blocking with .Result.
- Resource management: The CarsXE client implements IAsyncDisposable, so use
await usingor call DisposeAsync() when done. - 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 .NET 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.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net6.0
- No dependencies.
-
net8.0
- No dependencies.
-
net9.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Initial release of CarsXE .NET client