VIN Lookup API Documentation
Comprehensive documentation for integrating our vehicle data API with your applications
Introduction
The Autoref VIN Lookup API provides access to comprehensive vehicle information by querying different identifiers such as VIN (Vehicle Identification Number), EU Type Approval numbers, and Swiss Type Approval codes.
Our API is designed to integrate seamlessly with your applications, offering detailed technical specifications, environmental data, and official vehicle documentation.
API Features
- ✓VIN-based vehicle lookups
- ✓Legacy VIN support (pre-1981)
- ✓EU Type Approval searches
- ✓Swiss Type Approval (TG code) lookups
- ✓Detailed vehicle specifications
- ✓Multi-language support
Getting Started
Authentication
To use the Autoref API, you'll need an API key. All requests should include your API key as a header parameter.
You don't have an API key? Ask usX-API-Key: your_api_key_here
Base URL
All API requests should be made to the following base URL:
https://api.autoref.eu
Response Format
All responses are returned in JSON format. Successful responses include a status code of 200 OK.
{
"success": true,
"data": [{
"id": 55411,
"VIN": "WBA11AL010",
"BRAND": "BMW",
"BRAND_MODEL": "BMW M235I XDRIVE",
"MODEL": "M235i",
"MODEL2": "xDrive",
"MODEL3": null,
"POWER_KW": 225.0,
"POWER_DIN": 306.0,
"FUEL": "Gasoline",
"DATE_FIRST_CIRCULATION": 2020,
"RECORD_TYPE": "TG"
}]
}
Error Handling
When errors occur, the API will return an appropriate HTTP status code and error message.
{
"success": false,
"error": "not_found",
"message": "Vehicle not found"
}
Important Note:
API rate limits apply based on your subscription plan. Check the Pricing section for details on request limits for your tier.
API Endpoints
Our API offers several endpoints to query vehicle information using different identifiers.
VIN Lookup
Retrieve vehicle information by VIN (Vehicle Identification Number).
Path Parameters
Parameter | Type | Description |
---|---|---|
vin | string | The VIN (Vehicle Identification Number) of the vehicle. Minimum 10 characters. |
Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
lang | string | en | Language code for localized responses (en, fr, de, es, it) |
Example Request
curl -X GET "https://api.autoref.eu/vehicles/WBA11AL0101234567" \
-H "X-API-Key: your_api_key_here"
Example Response
[
{
"id": 55411,
"VIN": "WBA11AL010",
"BRAND": "BMW",
"BRAND_MODEL": "BMW M235I XDRIVE",
"MODEL_COC": null,
"VARIANT": null,
"VERSION": null,
"MODEL": "M235i",
"MODEL2": "xDrive",
"MODEL3": null,
"POWER_KW": 225.0,
"POWER_DIN": 306.0,
"FUEL": "Essence",
"DATE_FIRST_CIRCULATION": 2020,
"RECORD_TYPE": "TG"
}
]
Response Fields
Field | Type | Description |
---|---|---|
id | integer | Unique identifier for the vehicle record |
VIN | string | Vehicle Identification Number |
BRAND | string | Vehicle manufacturer |
BRAND_MODEL | string | Full model name including brand |
MODEL | string | Primary model name |
MODEL2 | string | Secondary model identifier |
MODEL3 | string | Tertiary model identifier |
POWER_KW | number | Engine power in kilowatts |
POWER_DIN | number | Engine power in horsepower (HP) |
FUEL | string | Fuel type (Gasoline, Diesel, Electric, etc.) |
DATE_FIRST_CIRCULATION | integer | Year of first registration |
RECORD_TYPE | string | Source database type (TG, OC, OLD, X) |
Notes:
- VIN lookups are case-insensitive. "WBA11AL010" and "wba11al010" will return the same results.
- Partial VIN matches are supported. The API will return all matching vehicles for the provided VIN prefix.
- For most modern vehicles, a minimum of 10 characters is required for a reliable match.
Legacy VIN Lookup
Retrieve information for pre-1981 vehicles using a shorter VIN/chassis number format along with the brand name.
Path Parameters
Parameter | Type | Description |
---|---|---|
vin | string | The legacy VIN or chassis number of the vehicle. |
Query Parameters
Parameter | Type | Required | Description |
---|---|---|---|
brand | string | Yes | The vehicle manufacturer (e.g., PORSCHE, BMW, MERCEDES-BENZ) |
lang | string | No | Language code for localized responses (en, fr, de, es, it) |
Example Request
curl -X GET "https://api.autoref.eu/legacy-vehicles/9119311194?brand=PORSCHE&lang=en" \
-H "X-API-Key: your_api_key_here"
Example Response
[
{
"id": 11580,
"VIN": "9119311",
"BRAND": "PORSCHE",
"BRAND_MODEL": "PORSCHE 911 SC 3,0 TARGA",
"MODEL_COC": null,
"VARIANT": null,
"VERSION": null,
"MODEL": "911",
"MODEL2": "SC",
"MODEL3": "3,0 Targa",
"POWER_KW": 132.4,
"POWER_DIN": 180.0,
"FUEL": "Gasoline",
"DATE_FIRST_CIRCULATION": 1979,
"RECORD_TYPE": "OLD"
},
{
"id": 11581,
"VIN": "9119311",
"BRAND": "PORSCHE",
"BRAND_MODEL": "PORSCHE 911 SC 3.0",
"MODEL_COC": null,
"VARIANT": null,
"VERSION": null,
"MODEL": "911",
"MODEL2": "SC",
"MODEL3": "3.0",
"POWER_KW": 132.0,
"POWER_DIN": 179.0,
"FUEL": "Gasoline",
"DATE_FIRST_CIRCULATION": 1979,
"RECORD_TYPE": "OLD"
}
]
Response Fields
Same fields as VIN Lookup response, with the following differences:
Field | Description |
---|---|
RECORD_TYPE | Will be "OLD" for legacy vehicles |
Important Note:
Pre-1981 vehicles didn't have standardized VINs. For accurate results:
- The brand parameter is required
- The VIN may be shorter than modern standards (often 3-10 characters)
- Multiple results may be returned for the same VIN/brand combination
Type Approval Lookup
Retrieve vehicles by their EU Type Approval number.
Path Parameters
Parameter | Type | Description |
---|---|---|
approval | string | EU Type Approval number (e.g., e1*2007/46*2064*07) |
Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
lang | string | en | Language code for localized responses (en, fr, de, es, it) |
Example Request
curl -X GET "https://api.autoref.eu/vehicles-by-approval/e1*2007/46*2064*07?lang=en" \
-H "X-API-Key: your_api_key_here"
Example Response
[
{
"id": 55424,
"VIN": "WBA11AL010",
"BRAND": "BMW",
"BRAND_MODEL": "BMW M235I XDRIVE",
"MODEL_COC": null,
"VARIANT": null,
"VERSION": null,
"MODEL": "M235i",
"MODEL2": "xDrive",
"MODEL3": null,
"POWER_KW": 225.0,
"POWER_DIN": 306.0,
"FUEL": "Gasoline",
"DATE_FIRST_CIRCULATION": 2023,
"RECORD_TYPE": "TG"
}
]
Type Approval Number Format
EU Type Approval numbers follow this format: e1*2007/46*2064*07
e1
: Country code where the approval was issued (e1 = Germany)2007/46
: Framework directive number2064
: Base approval number07
: Extension number
Response Fields
Same fields as VIN Lookup response.
Notes:
- Type approval numbers contain special characters such as *, /, etc. Make sure to properly URL encode these characters in your requests.
- This endpoint can return multiple vehicles if several models share the same type approval.
- The RECORD_TYPE will typically be "TG" for type approval matches.
Swiss Type Approval (TG Code) Lookup
Retrieve comprehensive vehicle data by Swiss Type Approval code (TG code).
Path Parameters
Parameter | Type | Description |
---|---|---|
tgcode | string | Swiss Type Approval code (e.g., 1BC170) |
Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
lang | string | en | Language code for localized responses (en, fr, de, es, it) |
Example Request
curl -X GET "https://api.autoref.eu/vehicle/tgcode/1BC170?lang=en" \
-H "X-API-Key: your_api_key_here"
Example Response
{
"VIN_INFO": {
"id": 55424,
"VIN": "WBA11AL010",
"BRAND": "BMW",
"BRAND_MODEL": "BMW M235I XDRIVE",
"POWER_KW": 225.0,
"POWER_DIN": 306.0,
"GEARBOX": ["Manual"],
"CATEGORY": "M1",
"TYPE_VEHICLE": "Passenger car",
"MODEL_FULL": "M235i xDrive",
"MODEL": "M235i",
"MODEL2": "xDrive",
"BODY": "Coupe",
"COLOR": "Black",
"FUEL": "Gasoline",
"DRIVETRAIN": "All-wheel drive",
"DATE_FIRST_CIRCULATION": "2020-05-12"
},
"SPECS": {
"TGCODE": "1BC170",
"DATE_REGISTRAR_START": "2019-03-15",
"DATE_REGISTRAR_END": "2025-12-31",
"CATEGORY": "M1",
"TVV": ["WBA11AL010"],
"MANUFACTURER": "BMW AG, Munich",
"VIN_LOCATION": "lower right windshield, driver's door pillar",
"AXLES_WHEELS": "2/4",
"SUSPENSION_TYPE": "coil springs, shock absorbers",
"STEERING_TYPE": "rack and pinion, electric assistance",
"BRAKE_TYPE": "discs/discs",
"WEIGHT_EMPTY_MIN_MAX": "1655 - 1740",
"LENGTH_MIN_MAX": "4454 - 4454",
"WIDTH_MIN_MAX": "1774 - 1774",
"HEIGHT_MIN_MAX": "1408 - 1408"
},
"CONSUMPTION": [
{
"COMBINED_CONSUMPTION": 7.8,
"COMBINED_CONSUMPTION_WLTP": 8.2,
"URBAN_CONSUMPTION": 10.4,
"COMBINED_CO2_EMISSIONS": 192,
"COMBINED_CO2_EMISSIONS_WLTP": 188,
"ENERGY_EFFICIENCY_CATEGORY": "G"
}
],
"EMISSION": [
{
"COMBINED_CO2_EMISSIONS": 192,
"COMBINED_CO2_EMISSIONS_WLTP": 188,
"NOISE_DRIVING": 72,
"CODE_SWISS_EMISSION": "A7M",
"CATALIZER": true,
"PARTICLE_FILTER": false
}
],
}
Response Structure
Unlike other endpoints, this one returns a much more detailed vehicle record with several sections:
Section | Description |
---|---|
VIN_INFO | Basic vehicle identification information |
SPECS | Detailed technical specifications from type approval |
CONSUMPTION | Fuel consumption data in various test cycles |
EMISSION | Emissions data for various pollutants |
Optional URL to PDF documentation if available |
Notes:
- Swiss TG codes have three format generations: numeric (before 1985), one-letter alphanumeric (1985-1995), and two-letter alphanumeric (after 1995).
- This endpoint returns the most comprehensive vehicle data, including consumption and emission details.
- The response structure is different from other endpoints, containing multiple nested sections.
Vehicle Detail Lookup
Retrieve comprehensive vehicle data by record type and ID.
Path Parameters
Parameter | Type | Description |
---|---|---|
record_type | string | Source database type (TG, OC, OLD, X) |
id | integer | The unique identifier of the vehicle record |
Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
lang | string | en | Language code for localized responses (en, fr, de, es, it) |
Example Request
curl -X GET "https://api.autoref.eu/vehicle/TG/55424?lang=en" \
-H "X-API-Key: your_api_key_here"
Example Response
The response format is similar to the TG Code endpoint, with detailed vehicle information organized into sections.
Notes:
- This endpoint is typically used after finding a vehicle with one of the search endpoints, using the ID and RECORD_TYPE from the initial search results.
- Different record types may return different data structures, with TG (type approval) records containing the most comprehensive information.
- Valid record_type values: TG (Type Approval), OC (Certificate of Conformity), OLD (Legacy), X (Imported)
Vehicle Brands Lookup
Retrieve a list of all vehicle brands available in the database.
Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
lang | string | en | Language code for localized responses (en, fr, de, es, it) |
Example Request
curl -X GET "https://api.autoref.eu/vehicle-brands" \
-H "X-API-Key: your_api_key_here"
Example Response
[
...
{
"id": 490,
"brand": "ALFA ROMEO"
},
{
"id": 551,
"brand": "AUDI"
},
{
"id": 23,
"brand": "BMW"
},
{
"id": 279,
"brand": "CHEVROLET"
},
...
]
Response Fields
Field | Type | Description |
---|---|---|
name | string | Full brand name |
code | string | Brand code (typically 3 letters) |
country | string | ISO country code of manufacturer origin |
Notes:
- This endpoint is useful for populating dropdown menus in applications, especially when working with legacy VIN lookups that require a brand parameter.
- The list is comprehensive and includes all manufacturers present in the database.
- Brand names should be used exactly as they appear in this list when making API calls.
Error Responses
The API uses standard HTTP status codes to indicate the success or failure of requests. Here are the common error responses you may encounter:
Status Code | Error Type | Description |
---|---|---|
400 | Bad Request | The request was invalid or missing required parameters |
401 | Unauthorized | API key is missing or invalid |
403 | Forbidden | API key is valid but lacks permission for the requested resource |
404 | Not Found | The specified vehicle or resource was not found |
429 | Too Many Requests | Rate limit exceeded for your plan |
500 | Internal Server Error | An unexpected error occurred on the server |
Example Error Response
{
"success": false,
"error": "not_found",
"message": "Vehicle not found for VIN: WBA11AL010XXXXXX"
}
Rate Limiting
API requests are subject to rate limiting based on your subscription plan. When you exceed your rate limit, you'll receive a 429 Too Many Requests response.
{
"success": false,
"error": "rate_limit_exceeded",
"message": "Rate limit exceeded. Please upgrade your plan or try again later.",
"reset_at": "2025-04-11T12:30:15Z"
}
Rate Limits & Plans
Our API offers several subscription tiers to meet different usage needs. Each plan has specific rate limits and features.
$0/month
- ✓50 requests / month
- ✓Basic vehicle data
- ✓VIN lookup
- ✗Type approval lookup
- ✗Detailed vehicle specs
$29/month
- ✓5,000 requests / month
- ✓Complete vehicle data
- ✓All lookup methods
- ✓Detailed vehicle specs
- ✓Email support
$99/month
- ✓25,000 requests / month
- ✓Complete vehicle data
- ✓All lookup methods
- ✓Detailed vehicle specs
- ✓Priority support
Need Higher Limits?
If you require higher rate limits or custom features, please contact our sales team for an Enterprise plan tailored to your needs.
Contact SalesSupport & FAQ
How do I get an API key?
Currently, API keys are provided upon request through our contact form. Simply fill out the contact form with your use case details, and our team will respond via email with your unique API key and setup instructions. This manual process allows us to provide personalized onboarding assistance for each integration.
What's the difference between the various VIN lookup methods?
Our API offers several methods to look up vehicle information:
- VIN lookup: Uses a standard 17-character VIN (or minimum 10 characters) for modern vehicles (post-1981)
- Legacy VIN lookup: For older vehicles (pre-1981) using shorter chassis numbers along with the brand name
- Type Approval lookup: Searches by EU Type Approval number
- TG Code lookup: Searches by Swiss Type Approval code
Each method provides access to different levels of detail. TG Code and Type Approval lookups generally provide the most comprehensive technical data.
How accurate is the vehicle data?
Our vehicle data comes directly from official government homologation databases and manufacturer type approvals, providing significantly higher accuracy than typical VIN decoders which often use algorithms to interpret VIN patterns.
For EU and Swiss vehicles, we provide precise specifications as submitted by manufacturers to regulatory authorities. For legacy vehicles, data completeness may vary based on available historical records.
What languages does the API support?
The API supports multiple languages for localized responses. Currently supported languages:
en
- English (default)fr
- Frenchde
- Germanes
- Spanishit
- Italian
Specify your preferred language using the lang
query parameter with any API request.
How do I handle errors from the API?
All API responses include HTTP status codes that indicate the success or failure of the request. For errors, we also provide a structured JSON response with:
success
: Alwaysfalse
for error responseserror
: A machine-readable error codemessage
: A human-readable description of what went wrong
We recommend implementing proper error handling in your code to gracefully handle different error types, especially "not_found" errors for VIN searches and rate limiting responses.
Need More Help?
If you can't find the answer to your question here, our support team is ready to assist you.
Code Samples
Here are some code examples to help you integrate our API with your application in different programming languages.
JavaScript / Node.js
// Example using fetch in Node.js (with node-fetch package)
const fetch = require('node-fetch');
async function getVehicleByVin(vin) {
try {
const response = await fetch(`https://api.autoref.eu/vehicles/${vin}`, {
headers: {
'X-API-Key': 'your_api_key_here'
}
});
if (!response.ok) {
const errorData = await response.json();
throw new Error(errorData.message || 'Failed to fetch vehicle data');
}
const data = await response.json();
return data;
} catch (error) {
console.error('Error fetching vehicle data:', error);
throw error;
}
}
// Usage
getVehicleByVin('WBA11AL010')
.then(data => console.log(data))
.catch(error => console.error(error));
Python
import requests
def get_vehicle_by_vin(vin, api_key, lang='en'):
"""
Fetch vehicle data by VIN
Args:
vin: Vehicle Identification Number
api_key: Your API key
lang: Language code for response (en, fr, de, es, it)
Returns:
Dictionary with vehicle data
"""
url = f"https://api.autoref.eu/vehicles/{vin}"
headers = {
"X-API-Key": api_key
}
params = {
"lang": lang
}
response = requests.get(url, headers=headers, params=params)
# Check for errors
if response.status_code != 200:
try:
error_data = response.json()
error_message = error_data.get('message', 'Unknown error')
except:
error_message = f"HTTP Error: {response.status_code}"
raise Exception(f"API Error: {error_message}")
return response.json()
# Usage
try:
api_key = "your_api_key_here"
vehicle_data = get_vehicle_by_vin("WBA11AL010", api_key)
print(vehicle_data)
except Exception as e:
print(f"Error: {e}")
PHP
<?php
/**
* Function to fetch vehicle data by VIN
*
* @param string $vin Vehicle Identification Number
* @param string $apiKey Your API key
* @param string $lang Language code for response
*
* @return array|null Vehicle data or null on error
*/
function getVehicleByVin($vin, $apiKey, $lang = 'en') {
$url = "https://api.autoref.eu/vehicles/" . urlencode($vin) . "?lang=" . urlencode($lang);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'X-API-Key: ' . $apiKey
]);
$response = curl_exec($ch);
$statusCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
if ($statusCode !== 200) {
$errorData = json_decode($response, true);
$errorMessage = isset($errorData['message']) ? $errorData['message'] : 'Unknown error';
error_log("API Error ($statusCode): $errorMessage");
return null;
}
return json_decode($response, true);
}
// Usage
$apiKey = 'your_api_key_here';
$vehicleData = getVehicleByVin('WBA11AL010', $apiKey);
if ($vehicleData) {
print_r($vehicleData);
} else {
echo "Failed to retrieve vehicle data";
}
?>
Java
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.net.http.HttpResponse.BodyHandlers;
import java.time.Duration;
public class VinLookupExample {
private static final String API_BASE_URL = "https://api.autoref.eu";
private static final String API_KEY = "your_api_key_here";
public static void main(String[] args) {
try {
String vin = "WBA11AL010";
String vehicleData = getVehicleByVin(vin);
System.out.println(vehicleData);
} catch (Exception e) {
System.err.println("Error: " + e.getMessage());
}
}
public static String getVehicleByVin(String vin) throws Exception {
HttpClient client = HttpClient.newBuilder()
.connectTimeout(Duration.ofSeconds(10))
.build();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create(API_BASE_URL + "/vehicles/" + vin))
.header("X-API-Key", API_KEY)
.GET()
.build();
HttpResponse<String> response = client.send(request, BodyHandlers.ofString());
if (response.statusCode() != 200) {
throw new Exception("API Error: HTTP " + response.statusCode() + " - " + response.body());
}
return response.body();
}
}
Ready to Get Started?
Integrate our powerful vehicle data API with your applications today and unlock comprehensive technical specifications for millions of vehicles.