Archive

Archive for September, 2025

Enhanced Italian Vehicle #API: VIN Numbers Now Available for Motorcycles

We’re excited to announce a significant enhancement to the Italian vehicle data API available through Targa.co.it. Starting today, our API responses now include Vehicle Identification Numbers (VIN) for motorcycle lookups, providing developers and businesses with more comprehensive vehicle data than ever before.

What’s New

The Italian vehicle API has been upgraded to return VIN numbers alongside existing motorcycle data. This enhancement brings motorcycle data parity with our car lookup service, ensuring consistent and complete vehicle information across all vehicle types.

Sample Response Structure

Here’s what you can expect from the enhanced API response for a motorcycle lookup:

json

{
  "Description": "Yamaha XT 1200 Z Super Ténéré",
  "RegistrationYear": "2016",
  "CarMake": {
    "CurrentTextValue": "Yamaha"
  },
  "CarModel": {
    "CurrentTextValue": "XT 1200 Z Super Ténéré"
  },
  "EngineSize": {
    "CurrentTextValue": "1199"
  },
  "FuelType": {
    "CurrentTextValue": ""
  },
  "MakeDescription": {
    "CurrentTextValue": "Yamaha"
  },
  "ModelDescription": {
    "CurrentTextValue": "XT 1200 Z Super Ténéré"
  },
  "Immobiliser": {
    "CurrentTextValue": ""
  },
  "Version": "ABS (2014-2016) 1199cc",
  "ABS": "",
  "AirBag": "",
  "Vin": "JYADP041000002470",
  "KType": "",
  "PowerCV": "",
  "PowerKW": "",
  "PowerFiscal": "",
  "ImageUrl": "http://www.targa.co.it/image.aspx/@WWFtYWhhIFhUIDEyMDAgWiBTdXBlciBUw6luw6lyw6l8bW90b3JjeWNsZQ=="
}

Why VIN Numbers Matter

Vehicle Identification Numbers serve as unique fingerprints for every vehicle, providing several key benefits:

Enhanced Vehicle Verification: VINs offer the most reliable method to verify a vehicle’s authenticity and specifications, reducing fraud in motorcycle transactions.

Complete Vehicle History: Access to VIN enables comprehensive history checks, insurance verification, and recall information lookup.

Improved Business Applications: Insurance companies, dealerships, and fleet management services can now build more robust motorcycle-focused applications with complete vehicle identification.

Regulatory Compliance: Many automotive business processes require VIN verification for legal and regulatory compliance.

Technical Implementation

The VIN field has been seamlessly integrated into existing API responses without breaking changes. The new "Vin" field appears alongside existing motorcycle data, maintaining backward compatibility while extending functionality.

Key Features:

  • No Breaking Changes: Existing integrations continue to work unchanged
  • Consistent Data Structure: Same JSON structure across all vehicle types
  • Comprehensive Coverage: VIN data available for motorcycles registered in the Italian vehicle database
  • Real-time Updates: VIN information reflects the most current data from official Italian vehicle registries

Getting Started

Developers can immediately begin utilizing VIN data in their applications. The API endpoint remains unchanged, and VIN information is automatically included in all motorcycle lookup responses where available.

For businesses already integrated with our Italian vehicle API, this enhancement provides immediate additional value without requiring any code changes. New integrations can take full advantage of complete motorcycle identification data from day one.

Use Cases

This enhancement opens up new possibilities for motorcycle-focused applications:

  • Insurance Platforms: Accurate risk assessment and policy management
  • Marketplace Applications: Enhanced listing verification and buyer confidence
  • Fleet Management: Complete motorcycle inventory tracking
  • Service Centers: Precise parts identification and service history management
  • Regulatory Reporting: Compliance with Italian vehicle registration requirements

Looking Forward

This VIN integration for motorcycles represents our continued commitment to providing comprehensive Italian vehicle data. We’re constantly working to enhance our API capabilities and expand data coverage to better serve the automotive technology ecosystem.

The addition of VIN numbers to motorcycle data brings our Italian API to feature parity with leading international vehicle data providers, while maintaining the accuracy and reliability that Italian businesses have come to expect from Targa.co.it.


Ready to integrate enhanced motorcycle data into your application? Visit Targa.co.it to explore our Italian vehicle API documentation and get started with VIN-enabled motorcycle lookups today.

Can We Train Large Language Models in Independent Modules?

One of the biggest challenges in scaling AI is that large language models (LLMs) are monolithic. Training them requires vast clusters of GPUs working in lockstep, because the model is a single, dense network where every weight can, in principle, interact with every other. That makes it hard to imagine breaking down training into smaller jobs that could run independently on, say, thousands of consumer-grade GPUs scattered around the world.

But is that strictly necessary? If a model generates Shakespearean sonnets and also writes Python code, do the “Shakespeare neurons” really need to interact with the “Python neurons”? Or could we identify relatively independent regions of the network and train them separately?

Why LLMs Are So Entangled

Modern transformers are designed around dense connectivity. The input embeddings, attention layers, and feedforward blocks are all built so that any token can, at least in theory, influence any other. Add to that the fact that natural language and code often overlap (think “explain this function in English”), and you start to see why training is typically done as a single, inseparable job.

Where Modularity Does Appear

Despite this apparent entanglement, modularity emerges naturally:

Specialized attention heads. Researchers have found heads that reliably focus on tasks like copying, punctuation, or number tracking. Sparse activations. For any given prompt, only a small fraction of neurons fire strongly. A Python snippet activates a different pattern than a sonnet. Mixture of Experts (MoE). Some modern models explicitly enforce modularity: instead of one giant dense block, they maintain a collection of “experts,” and only a handful are activated per token. This allows scaling up the number of parameters without scaling up the compute proportionally.

In other words, while transformers are dense by design, their behavior is often sparse and task-specific.

Could We Train Modules Independently?

Here’s the big idea: if we could reliably identify which parts of a model specialize in poetry versus code versus math, we might be able to train those modules separately and then stitch them together. Some possible approaches:

Activation clustering. Track which neurons/heads fire for certain types of data, and group them into “modules.” Progressive freezing. Train one module on code, freeze it, then train another on poetry. Orthogonal subspaces. Regularize the network so that different domains live in distinct representational spaces.

This would make it feasible to break training into smaller jobs, perhaps even distributed across heterogeneous compute.

The Catch

The problem is that language domains aren’t truly separate. Shakespearean sonnets and Python functions both require reasoning about syntax, analogy, and structure. If we isolate them too aggressively, we risk losing valuable cross-domain synergies. Coordination between modules—deciding which to use at inference time—is also non-trivial. That’s why today’s modular approaches (like MoE or adapters) still rely on a shared backbone and careful routing.

Where Research Is Headed

Instead of trying to cut apart existing dense models, most progress is happening in designing modular architectures from the ground up:

Mixture of Experts for scalable modularity. Adapters and LoRA for lightweight, domain-specific fine-tuning. Compositional networks where different modules explicitly handle different domains and a top-level router decides which to use.

These ideas all echo the same insight: giant monolithic models are powerful but inefficient, and the future likely lies in more modular, sparse, and independently trainable systems.

Closing Thought

The dream of distributing LLM training across a swarm of consumer GPUs hinges on finding the right balance between shared generalization and domain-specific modularity. We’re not quite there yet, but the direction is clear: the next generation of AI systems won’t be monoliths. They’ll be federations of specialized experts, stitched together into something greater than the sum of their parts.

Categories: Uncategorized

Generate PDFs from HTML in the Browser: A Developer’s Guide to Client-Side PDF Creation

Have you ever needed to let users download a webpage as a PDF without setting up server-side PDF generation? Whether it’s invoices, reports, or certificates, client-side PDF generation can be a game-changer for web applications. In this post, I’ll show you how to implement reliable PDF generation using JavaScript libraries that work entirely in the browser.

Why Client-Side PDF Generation?

Before diving into the technical implementation, let’s consider why you might choose client-side PDF generation:

Advantages:

  • No server load – Processing happens on the user’s device
  • Instant results – No network round trips for PDF generation
  • Privacy – Sensitive data never leaves the user’s browser
  • Cost effective – No additional server resources needed
  • Works offline – Once the page loads, PDF generation works without internet

Trade-offs:

  • Limited to what the browser can render
  • File sizes may be larger than server-generated PDFs
  • Dependent on the user’s device performance

The Two Main Approaches

Option 1: html2pdf.js (The Simple Approach)

html2pdf.js is a wrapper library that combines html2canvas and jsPDF into an easy-to-use package:// Include the library https://cdnjs.cloudflare.com/ajax/libs/html2pdf.js/0.10.1/html2pdf.bundle.min.js function generatePDF() { const element = document.querySelector('.content-to-convert'); const options = { margin: 1, filename: 'document.pdf', image: { type: 'jpeg', quality: 0.98 }, html2canvas: { scale: 2 }, jsPDF: { unit: 'in', format: 'letter', orientation: 'portrait' } }; html2pdf().set(options).from(element).save(); }

When to use html2pdf.js:

  • Quick prototypes
  • Simple layouts
  • When you need minimal code

Potential issues:

  • Can struggle with localhost development
  • Less control over the conversion process
  • Sometimes has CORS-related problems

Option 2: jsPDF + html2canvas (The Reliable Approach)

For more control and better localhost support, combining jsPDF and html2canvas directly is often more reliable:// Include both libraries https://cdnjs.cloudflare.com/ajax/libs/html2canvas/1.4.1/html2canvas.min.js https://cdnjs.cloudflare.com/ajax/libs/jspdf/2.5.1/jspdf.umd.min.js function generatePDF() { const element = document.querySelector('.content-to-convert'); // Configure html2canvas const canvasOptions = { scale: 2, useCORS: true, allowTaint: true, backgroundColor: '#ffffff' }; html2canvas(element, canvasOptions).then(canvas => { const { jsPDF } = window.jspdf; const pdf = new jsPDF({ orientation: 'portrait', unit: 'mm', format: 'a4' }); // Calculate dimensions to fit the page const imgData = canvas.toDataURL('image/png'); const pdfWidth = pdf.internal.pageSize.getWidth(); const pdfHeight = pdf.internal.pageSize.getHeight(); const imgWidth = canvas.width; const imgHeight = canvas.height; const ratio = Math.min(pdfWidth / imgWidth, pdfHeight / imgHeight); // Center the image on the page const imgX = (pdfWidth - imgWidth * ratio) / 2; const imgY = 0; pdf.addImage(imgData, 'PNG', imgX, imgY, imgWidth * ratio, imgHeight * ratio); pdf.save('document.pdf'); }).catch(error => { console.error('PDF generation failed:', error); }); }

Real-World Example: Invoice Generation

Let’s walk through a practical example – generating PDF invoices from an ASP.NET Web Forms page. Here’s how I implemented it for a client billing system:

The HTML Structure

<div class="invoice-container"> <table class="header-table"> <tr> <td class="company-info"> <strong>Company Name</strong><br/> Address Line 1<br/> Address Line 2 </td> <td class="invoice-title"> # INVOICE<br/> Invoice #<span id="invoiceId">001</span><br/> Date: <span id="invoiceDate">2025-09-19</span> </td> </tr> </table> <table class="items-table"> <thead> <tr> <th>Description</th> <th>Amount</th> </tr> </thead> <tbody> <tr> <td>Software Development</td> <td>$1,500.00</td> </tr> <tr class="total-row"> <td><strong>Total</strong></td> <td><strong>$1,500.00</strong></td> </tr> </tbody> </table> </div>

The PDF Generation Function

function downloadInvoiceAsPDF() { // Hide UI elements that shouldn't appear in PDF const buttons = document.querySelectorAll('button, input[type="button"]'); buttons.forEach(btn => btn.style.display = 'none'); const element = document.querySelector('.invoice-container'); html2canvas(element, { scale: 2, useCORS: true, allowTaint: true, backgroundColor: '#ffffff' }).then(canvas => { const { jsPDF } = window.jspdf; const pdf = new jsPDF('portrait', 'mm', 'a4'); const imgData = canvas.toDataURL('image/png'); const pdfWidth = pdf.internal.pageSize.getWidth(); const pdfHeight = pdf.internal.pageSize.getHeight(); const imgWidth = canvas.width; const imgHeight = canvas.height; const ratio = Math.min(pdfWidth / imgWidth, pdfHeight / imgHeight); pdf.addImage(imgData, 'PNG', 0, 0, imgWidth * ratio, imgHeight * ratio); // Generate dynamic filename const invoiceId = document.getElementById('invoiceId').textContent; pdf.save(`invoice-${invoiceId}.pdf`); // Restore hidden elements buttons.forEach(btn => btn.style.display = ''); }); }

Best Practices and Tips

1. Optimize for PDF Output

CSS Considerations:/* Use print-friendly styles */ .invoice-container { font-family: Arial, sans-serif; color: #000; background: #fff; } /* Avoid these in PDF content */ .no-pdf { box-shadow: none; border-radius: 0; background-image: none; }

2. Handle Multi-Page Content

For content that spans multiple pages:function generateMultiPagePDF(element) { html2canvas(element, { scale: 2 }).then(canvas => { const { jsPDF } = window.jspdf; const pdf = new jsPDF(); const imgData = canvas.toDataURL('image/png'); const imgWidth = 210; // A4 width in mm const pageHeight = 295; // A4 height in mm const imgHeight = (canvas.height * imgWidth) / canvas.width; let heightLeft = imgHeight; let position = 0; // Add first page pdf.addImage(imgData, 'PNG', 0, position, imgWidth, imgHeight); heightLeft -= pageHeight; // Add additional pages if needed while (heightLeft >= 0) { position = heightLeft - imgHeight; pdf.addPage(); pdf.addImage(imgData, 'PNG', 0, position, imgWidth, imgHeight); heightLeft -= pageHeight; } pdf.save('multi-page-document.pdf'); }); }

3. Error Handling and User Feedback

Always provide feedback to users:async function generatePDFWithFeedback() { try { // Show loading indicator showLoadingSpinner(); const element = document.querySelector('.content'); const canvas = await html2canvas(element, { scale: 2 }); const { jsPDF } = window.jspdf; const pdf = new jsPDF(); const imgData = canvas.toDataURL('image/png'); pdf.addImage(imgData, 'PNG', 10, 10, 190, 0); pdf.save('document.pdf'); showSuccessMessage('PDF downloaded successfully!'); } catch (error) { console.error('PDF generation failed:', error); showErrorMessage('Failed to generate PDF. Please try again.'); } finally { hideLoadingSpinner(); } }

4. Testing Across Browsers

Different browsers may render content slightly differently. Test your PDF generation across:

  • Chrome/Chromium-based browsers
  • Firefox
  • Safari
  • Edge

Performance Considerations

Optimize image processing:

  • Use appropriate canvas scale (2x is usually sufficient)
  • Consider compressing images before PDF generation
  • For large documents, implement progress indicators

Memory management:

  • Clean up canvas elements after use
  • Consider breaking very large documents into smaller chunks

Troubleshooting Common Issues

Problem: PDF is blank or elements are missing

  • Check console for errors
  • Ensure all external resources (fonts, images) are loaded
  • Try reducing the canvas scale

Problem: Poor quality output

  • Increase the canvas scale
  • Use vector-friendly fonts
  • Avoid complex CSS effects

Problem: CORS errors

  • Use useCORS: true and allowTaint: true options
  • Ensure all resources are served from the same domain or have proper CORS headers

Conclusion

Client-side PDF generation is a powerful technique that can enhance user experience while reducing server complexity. The jsPDF + html2canvas approach provides the best balance of reliability and control, especially during development on localhost.

While there are trade-offs compared to server-side solutions, the benefits of instant generation, privacy, and reduced infrastructure costs make it an excellent choice for many web applications.

Whether you’re building invoicing systems, generating reports, or creating certificates, these techniques will help you implement robust PDF generation that works reliably across different environments.

Have you implemented client-side PDF generation in your projects? What challenges did you face, and how did you solve them? Share your experiences in the comments below!

Categories: Uncategorized

How to Check Polish Vehicle History Using Python and RapidAPI

When buying a used car in Poland, one of the most important steps is verifying the vehicle’s history. Thanks to modern APIs, you can now programmatically access official vehicle registration data from the CEPiK (Central Register of Vehicles and Drivers) system. In this tutorial, we’ll show you how to use Python to check a vehicle’s complete history using the Polish Vehicle History API on RapidAPI.

What Information Can You Get?

The Polish Vehicle History API provides comprehensive data about any registered vehicle in Poland:

Technical Specifications

  • Make, model, year of manufacture
  • Engine capacity and power
  • Fuel type and emission standards
  • Weight specifications and seating capacity

Ownership History

  • Complete ownership timeline
  • Number of previous owners
  • Registration provinces
  • Corporate vs. private ownership

Technical Inspections

  • All periodic technical inspections with dates and results
  • Odometer readings at each inspection
  • Detection of rolled-back odometers

Legal Status

  • Current registration status
  • Valid insurance information
  • Stolen or withdrawn vehicle alerts

Risk Assessment

  • Accident history indicators
  • Damage reports
  • Taxi usage history
  • Odometer tampering detection

Getting Started

Prerequisites

First, install the required Python library:

pip install requests

Basic Implementation

Here’s a simple example to get you started:

import requests

# API configuration
url = "https://historia-pojazdow-polskich.p.rapidapi.com/EL6574U/YS3DD55C622039715/2002-06-04"

headers = {
    "x-rapidapi-host": "historia-pojazdow-polskich.p.rapidapi.com",
    "x-rapidapi-key": "YOUR_API_KEY_HERE"
}

# Make the request
response = requests.get(url, headers=headers)

# Check if request was successful
if response.status_code == 200:
    data = response.json()
    print("Data retrieved successfully!")
    print(data)
else:
    print(f"Error: {response.status_code}")
    print(response.text)

Advanced Implementation with Error Handling

For production use, you’ll want a more robust implementation:

import requests
import json
from typing import Optional, Dict, Any

class PolishVehicleHistoryAPI:
    def __init__(self, api_key: str):
        self.base_url = "https://historia-pojazdow-polskich.p.rapidapi.com"
        self.headers = {
            "x-rapidapi-host": "historia-pojazdow-polskich.p.rapidapi.com",
            "x-rapidapi-key": api_key
        }
    
    def check_vehicle(self, license_plate: str, vin: str, first_registration_date: str) -> Optional[Dict[Any, Any]]:
        """
        Check vehicle history
        
        Args:
            license_plate: License plate number (e.g., "EL6574U")
            vin: Vehicle identification number
            first_registration_date: Date in YYYY-MM-DD format
            
        Returns:
            Dictionary with vehicle data or None on error
        """
        url = f"{self.base_url}/{license_plate}/{vin}/{first_registration_date}"
        
        try:
            response = requests.get(url, headers=self.headers, timeout=10)
            
            if response.status_code == 200:
                return response.json()
            elif response.status_code == 404:
                print("Vehicle not found with provided parameters")
                return None
            elif response.status_code == 429:
                print("API rate limit exceeded")
                return None
            else:
                print(f"API error: {response.status_code} - {response.text}")
                return None
                
        except requests.exceptions.Timeout:
            print("Timeout - API not responding")
            return None
        except requests.exceptions.RequestException as e:
            print(f"Connection error: {e}")
            return None

def main():
    # IMPORTANT: Insert your RapidAPI key here
    API_KEY = "YOUR_API_KEY_HERE"
    
    # Create API instance
    api = PolishVehicleHistoryAPI(API_KEY)
    
    # Vehicle parameters
    license_plate = "EL6574U"
    vin = "YS3DD55C622039715"
    registration_date = "2002-06-04"
    
    print(f"Checking vehicle: {license_plate}")
    
    # Retrieve data
    data = api.check_vehicle(license_plate, vin, registration_date)
    
    if data:
        print("\n=== VEHICLE HISTORY RESULTS ===")
        
        # Display basic information
        if len(data) > 0 and "technicalData" in data[0]:
            basic_data = data[0]["technicalData"]["basicData"]
            print(f"Make: {basic_data.get('make')}")
            print(f"Model: {basic_data.get('model')}")
            print(f"Year: {basic_data.get('yearOfManufacture')}")
            print(f"Registration status: {basic_data.get('registrationStatus')}")
            
            # Odometer reading
            if basic_data.get('odometerReadings'):
                reading = basic_data['odometerReadings'][0]
                rolled_back = " (ODOMETER ROLLED BACK!)" if reading.get('rolledBack') else ""
                print(f"Mileage: {reading.get('value')} {reading.get('unit')}{rolled_back}")
        
        # Risk analysis (if available)
        if len(data) > 2 and "carfaxData" in data[2]:
            risk = data[2]["carfaxData"]["risk"]
            print("\n=== RISK ANALYSIS ===")
            print(f"Stolen: {'YES' if risk.get('stolen') else 'NO'}")
            print(f"Post-accident: {'YES' if risk.get('postAccident') else 'NO'}")
            print(f"Odometer tampering: {'YES' if risk.get('odometerTampering') else 'NO'}")
            print(f"Taxi: {'YES' if risk.get('taxi') else 'NO'}")
        
        # Save complete data to file
        with open(f"vehicle_history_{license_plate}.json", "w", encoding="utf-8") as f:
            json.dump(data, f, ensure_ascii=False, indent=2)
        print(f"\nComplete data saved to: vehicle_history_{license_plate}.json")
    
    else:
        print("Failed to retrieve vehicle data")

if __name__ == "__main__":
    main()

Understanding the API Response

The API returns data in three main sections:

1. Technical Data

Contains all technical specifications and current vehicle status:

technical_data = data[0]["technicalData"]["basicData"]
print(f"Make: {technical_data['make']}")
print(f"Model: {technical_data['model']}")
print(f"Engine capacity: {technical_data['engineCapacity']} cc")

2. Timeline Data

Provides complete ownership and inspection history:

timeline = data[1]["timelineData"]
print(f"Total owners: {timeline['totalOwners']}")
print(f"Current registration province: {timeline['registrationProvince']}")

# Loop through all events
for event in timeline["events"]:
    print(f"{event['eventDate']}: {event['eventName']}")

3. Risk Assessment

Carfax-style risk indicators:

risk_data = data[2]["carfaxData"]["risk"]
if risk_data["odometerTampering"]:
    print("⚠️ Warning: Possible odometer tampering detected!")

Real-World Use Cases

1. Used Car Marketplace Integration

def evaluate_vehicle_for_listing(license_plate, vin, registration_date):
    api = PolishVehicleHistoryAPI("YOUR_API_KEY")
    data = api.check_vehicle(license_plate, vin, registration_date)
    
    if not data:
        return {"status": "error", "message": "Cannot verify vehicle"}
    
    # Extract risk factors
    risk = data[2]["carfaxData"]["risk"] if len(data) > 2 else {}
    
    risk_score = sum([
        risk.get("stolen", False),
        risk.get("postAccident", False), 
        risk.get("odometerTampering", False),
        risk.get("taxi", False)
    ])
    
    return {
        "status": "success",
        "risk_level": "high" if risk_score > 1 else "low",
        "owners_count": data[1]["timelineData"]["totalOwners"],
        "mileage_verified": not data[0]["technicalData"]["basicData"]["odometerReadings"][0]["rolledBack"]
    }

2. Insurance Risk Assessment

def calculate_insurance_risk(vehicle_data):
    if not vehicle_data:
        return "unknown"
    
    timeline = vehicle_data[1]["timelineData"]
    risk_data = vehicle_data[2]["carfaxData"]["risk"]
    
    # High risk indicators
    if (timeline["totalOwners"] > 5 or 
        risk_data.get("postAccident") or 
        risk_data.get("taxi")):
        return "high_risk"
    
    return "standard_risk"

Getting Your API Key

  1. Sign up at RapidAPI.com
  2. Search for “Polish Vehicle History” or “Historia Pojazdów Polskich”
  3. Subscribe to an appropriate plan
  4. Copy your API key from the “Headers” section
  5. Replace "YOUR_API_KEY_HERE" with your actual key

API Parameters Explained

The API endpoint requires three parameters:

  • license_plate: The Polish license plate number (e.g., “EL6574U”)
  • vin: The 17-character Vehicle Identification Number
  • first_registration_date: Date when the vehicle was first registered in Poland (YYYY-MM-DD format)

Best Practices and Security

1. Secure API Key Management

Never hardcode your API key. Use environment variables instead:

import os

API_KEY = os.environ.get('RAPIDAPI_KEY')
if not API_KEY:
    raise ValueError("Please set RAPIDAPI_KEY environment variable")

2. Rate Limiting and Caching

Implement proper rate limiting to avoid exceeding API quotas:

import time
from functools import wraps

def rate_limit(max_calls_per_minute=60):
    min_interval = 60.0 / max_calls_per_minute
    last_called = [0.0]
    
    def decorator(func):
        @wraps(func)
        def wrapper(*args, **kwargs):
            elapsed = time.time() - last_called[0]
            left_to_wait = min_interval - elapsed
            if left_to_wait > 0:
                time.sleep(left_to_wait)
            ret = func(*args, **kwargs)
            last_called[0] = time.time()
            return ret
        return wrapper
    return decorator

@rate_limit(max_calls_per_minute=50)
def check_vehicle_with_rate_limit(api, license_plate, vin, date):
    return api.check_vehicle(license_plate, vin, date)

3. Error Handling and Retries

Implement exponential backoff for transient errors:

import time
import random

def check_vehicle_with_retry(api, license_plate, vin, date, max_retries=3):
    for attempt in range(max_retries):
        try:
            result = api.check_vehicle(license_plate, vin, date)
            if result is not None:
                return result
        except requests.exceptions.RequestException:
            if attempt < max_retries - 1:
                wait_time = (2 ** attempt) + random.random()
                time.sleep(wait_time)
            else:
                raise
    
    return None

Conclusion

The Polish Vehicle History API provides a powerful way to programmatically access comprehensive vehicle data directly from official government sources. Whether you’re building a used car marketplace, developing an insurance application, or creating tools for automotive professionals, this API offers reliable and up-to-date information about any vehicle registered in Poland.

The examples in this guide provide a solid foundation for integrating vehicle history checks into your Python applications. Remember to handle errors gracefully, respect rate limits, and keep your API credentials secure.

With this integration, you can help users make informed decisions when buying used cars, reduce fraud in automotive transactions, and build more trustworthy platforms for the Polish automotive market.
https://www.tablicarejestracyjnaapi.pl/

Italian Vehicle Registration API: Complete Guide to Vehicle Data Lookup in Italy

https://www.targa.co.it/

Italy operates a sophisticated vehicle registration system managed by the Ministry of Transport, covering over 39 million registered vehicles across the country’s 20 regions. The Italian Vehicle Registration API provides developers and businesses with access to comprehensive vehicle specifications, technical data, and insurance information for vehicles registered throughout Italy, from the industrial north to the southern regions.

Overview of Italian Vehicle Registration System

Italy’s vehicle registration system is centralized under the Motorizzazione Civile (Department of Motor Vehicles) and integrated with the PRA (Pubblico Registro Automobilistico – Public Automotive Registry). The system maintains detailed records for all vehicle types, from traditional cars to motorcycles, providing standardized identification across all Italian provinces.

The Italian license plate system has evolved over time:

  • Current format (1994-present): Two letters + three numbers + two letters (AB 123 CD)
  • Regional identification: Letters indicate the province of registration
  • Special formats: Diplomatic, military, and temporary plates with distinct patterns

Italian Vehicle API Features

The Italy endpoint provides comprehensive vehicle information with focus on technical specifications and power ratings:

Available Data for Cars

When querying Italian car registrations, you can retrieve:

  • Make and Model – Complete manufacturer and vehicle model identification
  • Registration Year – Year when the vehicle was first registered in Italy
  • Engine Specifications – Engine displacement and detailed power ratings
  • Fuel Type – Fuel classification (Diesel, Benzina/Petrol, GPL, Metano, Electric)
  • Technical Details – Version information, number of doors, ABS and airbag status
  • Power Ratings – Multiple power measurements (CV, KW, Fiscal Power)
  • VIN Number – Vehicle Identification Number when available
  • K-Type Code – European vehicle type approval identifier

Sample Car Response Format

{
  "Description": "MINI Mini 2.0 Cooper SD Countryman ALL4 Automatica",
  "RegistrationYear": "2017",
  "CarMake": {
    "CurrentTextValue": "MINI"
  },
  "CarModel": {
    "CurrentTextValue": "Mini Countryman F60"
  },
  "EngineSize": {
    "CurrentTextValue": "2.0"
  },
  "FuelType": {
    "CurrentTextValue": "Diesel"
  },
  "MakeDescription": {
    "CurrentTextValue": "MINI"
  },
  "ModelDescription": {
    "CurrentTextValue": "Mini Countryman F60"
  },
  "NumberOfDoors": "5",
  "Version": "Mini 2.0 Cooper SD Countryman ALL4 Automatica",
  "ABS": "",
  "AirBag": "",
  "Vin": "",
  "KType": "",
  "PowerCV": "190",
  "PowerKW": "140",
  "PowerFiscal": "20"
}

Motorcycle Support

Italy also provides dedicated motorcycle data through the CheckItalyMotorbike endpoint:

{
  "Description": "Ducati Monster 600 25KW - 34 CV",
  "RegistrationYear": "1999",
  "CarMake": {
    "CurrentTextValue": "Ducati"
  },
  "CarModel": {
    "CurrentTextValue": "Monster 600"
  },
  "MakeDescription": {
    "CurrentTextValue": "Ducati"
  },
  "ModelDescription": {
    "CurrentTextValue": "Monster 600"
  },
  "Version": "25KW - 34 CV"
}

Insurance Information Support

The Italian system also provides access to current insurance information through the CheckInsuranceStatusItaly endpoint:

<InsuranceDetails>
  <Company>IPTIQ EMEA P&C SA</Company>
  <Expiry>2025-01-23T00:00:00</Expiry>
  <IsInsured>true</IsInsured>
  <Region>VE</Region>
</InsuranceDetails>

API Implementation

Endpoint Usage

The Italian Vehicle API uses multiple endpoints:

  1. Cars: /CheckItaly – For passenger vehicles and commercial vehicles
  2. Motorcycles: /CheckItalyMotorbike – For motorcycles and scooters
  3. Insurance: /CheckInsuranceStatusItaly – For insurance verification

All endpoints require:

  • Registration Number – The complete Italian license plate number
  • Username – Your API authentication credentials

Basic Implementation Example

// JavaScript example for Italian vehicle lookup
class ItalianVehicleAPI {
  constructor(username) {
    this.username = username;
    this.baseUrl = "https://www.targa.co.it/api/bespokeapi.asmx";
  }
  
  async lookupCar(registrationNumber) {
    const apiUrl = `${this.baseUrl}/CheckItaly?RegistrationNumber=${registrationNumber}&username=${this.username}`;
    
    try {
      const response = await fetch(apiUrl);
      const xmlText = await response.text();
      
      // Parse XML response
      const parser = new DOMParser();
      const xmlDoc = parser.parseFromString(xmlText, "text/xml");
      const jsonData = xmlDoc.getElementsByTagName("vehicleJson")[0].textContent;
      const vehicleInfo = JSON.parse(jsonData);
      
      return {
        make: vehicleInfo.MakeDescription.CurrentTextValue,
        model: vehicleInfo.ModelDescription.CurrentTextValue,
        year: vehicleInfo.RegistrationYear,
        engineSize: vehicleInfo.EngineSize.CurrentTextValue,
        fuel: vehicleInfo.FuelType.CurrentTextValue,
        powerCV: vehicleInfo.PowerCV,
        powerKW: vehicleInfo.PowerKW,
        powerFiscal: vehicleInfo.PowerFiscal,
        doors: vehicleInfo.NumberOfDoors,
        version: vehicleInfo.Version,
        vin: vehicleInfo.Vin,
        kType: vehicleInfo.KType
      };
    } catch (error) {
      console.error('Italian car lookup failed:', error);
      return null;
    }
  }
  
  async lookupMotorcycle(registrationNumber) {
    const apiUrl = `${this.baseUrl}/CheckItalyMotorbike?RegistrationNumber=${registrationNumber}&username=${this.username}`;
    
    try {
      const response = await fetch(apiUrl);
      const jsonData = await response.json();
      
      return {
        make: jsonData.MakeDescription.CurrentTextValue,
        model: jsonData.ModelDescription.CurrentTextValue,
        year: jsonData.RegistrationYear,
        version: jsonData.Version
      };
    } catch (error) {
      console.error('Italian motorcycle lookup failed:', error);
      return null;
    }
  }
  
  async checkInsurance(registrationNumber) {
    const apiUrl = `${this.baseUrl}/CheckInsuranceStatusItaly?RegistrationNumber=${registrationNumber}&username=${this.username}`;
    
    try {
      const response = await fetch(apiUrl);
      const xmlText = await response.text();
      
      // Parse XML response
      const parser = new DOMParser();
      const xmlDoc = parser.parseFromString(xmlText, "text/xml");
      
      const company = xmlDoc.getElementsByTagName("Company")[0]?.textContent;
      const expiry = xmlDoc.getElementsByTagName("Expiry")[0]?.textContent;
      const isInsured = xmlDoc.getElementsByTagName("IsInsured")[0]?.textContent === "true";
      const region = xmlDoc.getElementsByTagName("Region")[0]?.textContent;
      
      return {
        company,
        expiry,
        isInsured,
        region
      };
    } catch (error) {
      console.error('Italian insurance lookup failed:', error);
      return null;
    }
  }
}

// Usage examples
const api = new ItalianVehicleAPI("your_username");

// Car lookup
api.lookupCar("BN071VN").then(data => {
  if (data) {
    console.log(`Car: ${data.make} ${data.model} (${data.year})`);
    console.log(`Engine: ${data.engineSize}L ${data.fuel}`);
    console.log(`Power: ${data.powerCV}CV / ${data.powerKW}KW`);
  }
});

// Motorcycle lookup
api.lookupMotorcycle("AA123BB").then(data => {
  if (data) {
    console.log(`Motorcycle: ${data.make} ${data.model} (${data.year})`);
    console.log(`Version: ${data.version}`);
  }
});

// Insurance check
api.checkInsurance("BN071VN").then(data => {
  if (data) {
    console.log(`Insurance: ${data.company}`);
    console.log(`Expiry: ${data.expiry}`);
    console.log(`Status: ${data.isInsured ? 'Insured' : 'Not insured'}`);
  }
});

Python Implementation

import requests
import xml.etree.ElementTree as ET
import json
from datetime import datetime

class ItalianVehicleAPI:
    def __init__(self, username):
        self.username = username
        self.base_url = "https://www.targa.co.it/api/bespokeapi.asmx"
    
    def validate_italian_registration(self, registration):
        """Validate Italian registration number format"""
        if not registration:
            return False, "Registration number is required"
        
        # Remove spaces and convert to uppercase
        reg = registration.replace(" ", "").upper()
        
        # Basic Italian format validation
        if len(reg) < 6 or len(reg) > 7:
            return False, "Invalid registration length"
        
        return True, reg
    
    def lookup_car(self, registration_number):
        """Lookup Italian car with comprehensive error handling"""
        is_valid, processed_reg = self.validate_italian_registration(registration_number)
        if not is_valid:
            return {"error": processed_reg}
        
        try:
            url = f"{self.base_url}/CheckItaly"
            params = {
                'RegistrationNumber': processed_reg,
                'username': self.username
            }
            
            response = requests.get(url, params=params, timeout=15)
            response.raise_for_status()
            
            # Parse XML response
            root = ET.fromstring(response.content)
            json_element = root.find('.//vehicleJson')
            
            if json_element is None or not json_element.text:
                return {"error": "No car data found for this registration number"}
            
            vehicle_data = json.loads(json_element.text)
            
            return {
                'success': True,
                'type': 'car',
                'description': vehicle_data.get('Description'),
                'make': vehicle_data.get('MakeDescription', {}).get('CurrentTextValue'),
                'model': vehicle_data.get('ModelDescription', {}).get('CurrentTextValue'),
                'registration_year': vehicle_data.get('RegistrationYear'),
                'engine_size': vehicle_data.get('EngineSize', {}).get('CurrentTextValue'),
                'fuel_type': vehicle_data.get('FuelType', {}).get('CurrentTextValue'),
                'power_cv': vehicle_data.get('PowerCV'),
                'power_kw': vehicle_data.get('PowerKW'),
                'power_fiscal': vehicle_data.get('PowerFiscal'),
                'doors': vehicle_data.get('NumberOfDoors'),
                'version': vehicle_data.get('Version'),
                'vin': vehicle_data.get('Vin'),
                'k_type': vehicle_data.get('KType'),
                'abs': vehicle_data.get('ABS'),
                'airbag': vehicle_data.get('AirBag'),
                'raw_data': vehicle_data
            }
            
        except Exception as e:
            return {"error": f"Car lookup failed: {str(e)}"}
    
    def lookup_motorcycle(self, registration_number):
        """Lookup Italian motorcycle"""
        is_valid, processed_reg = self.validate_italian_registration(registration_number)
        if not is_valid:
            return {"error": processed_reg}
        
        try:
            url = f"{self.base_url}/CheckItalyMotorbike"
            params = {
                'RegistrationNumber': processed_reg,
                'username': self.username
            }
            
            response = requests.get(url, params=params, timeout=15)
            response.raise_for_status()
            
            motorcycle_data = response.json()
            
            return {
                'success': True,
                'type': 'motorcycle',
                'description': motorcycle_data.get('Description'),
                'make': motorcycle_data.get('MakeDescription', {}).get('CurrentTextValue'),
                'model': motorcycle_data.get('ModelDescription', {}).get('CurrentTextValue'),
                'registration_year': motorcycle_data.get('RegistrationYear'),
                'version': motorcycle_data.get('Version'),
                'raw_data': motorcycle_data
            }
            
        except Exception as e:
            return {"error": f"Motorcycle lookup failed: {str(e)}"}
    
    def check_insurance(self, registration_number):
        """Check Italian vehicle insurance status"""
        is_valid, processed_reg = self.validate_italian_registration(registration_number)
        if not is_valid:
            return {"error": processed_reg}
        
        try:
            url = f"{self.base_url}/CheckInsuranceStatusItaly"
            params = {
                'RegistrationNumber': processed_reg,
                'username': self.username
            }
            
            response = requests.get(url, params=params, timeout=15)
            response.raise_for_status()
            
            # Parse XML response
            root = ET.fromstring(response.content)
            
            company = root.find('.//Company')
            expiry = root.find('.//Expiry')
            is_insured = root.find('.//IsInsured')
            region = root.find('.//Region')
            
            return {
                'success': True,
                'company': company.text if company is not None else None,
                'expiry': expiry.text if expiry is not None else None,
                'is_insured': is_insured.text == 'true' if is_insured is not None else False,
                'region': region.text if region is not None else None
            }
            
        except Exception as e:
            return {"error": f"Insurance check failed: {str(e)}"}

# Usage examples
api = ItalianVehicleAPI("your_username")

# Car lookup
car_result = api.lookup_car("BN071VN")
if car_result.get('success'):
    print(f"Car: {car_result['make']} {car_result['model']}")
    print(f"Year: {car_result['registration_year']}")
    print(f"Engine: {car_result['engine_size']}L {car_result['fuel_type']}")
    print(f"Power: {car_result['power_cv']}CV / {car_result['power_kw']}KW")
    print(f"Doors: {car_result['doors']}")
    print(f"Version: {car_result['version']}")

# Motorcycle lookup
bike_result = api.lookup_motorcycle("AA123BB")
if bike_result.get('success'):
    print(f"Motorcycle: {bike_result['make']} {bike_result['model']}")
    print(f"Version: {bike_result['version']}")

# Insurance check
insurance_result = api.check_insurance("BN071VN")
if insurance_result.get('success'):
    print(f"Insurance Company: {insurance_result['company']}")
    print(f"Expiry: {insurance_result['expiry']}")
    print(f"Status: {'Insured' if insurance_result['is_insured'] else 'Not insured'}")
    print(f"Region: {insurance_result['region']}")

Italian Vehicle Registration Format

Current Format (1994-Present)

Italian license plates use the format: AA 123 BB

  • First two letters: Province of registration
  • Three numbers: Sequential numbering
  • Last two letters: Progressive alphabetical sequence

Provincial Codes

Italy’s 107 provinces each have specific letter combinations:

Major Cities:

  • MI – Milano (Milan)
  • RM – Roma (Rome)
  • TO – Torino (Turin)
  • NA – Napoli (Naples)
  • PA – Palermo
  • GE – Genova (Genoa)
  • BO – Bologna
  • FI – Firenze (Florence)
  • BA – Bari
  • CT – Catania

Northern Regions:

  • BG – Bergamo, BS – Brescia, CO – Como, CR – Cremona
  • MN – Mantova, PV – Pavia, SO – Sondrio, VA – Varese

Central Regions:

  • AN – Ancona, AR – Arezzo, FR – Frosinone, LT – Latina
  • PE – Pescara, PG – Perugia, PI – Pisa, SI – Siena

Southern Regions:

  • AV – Avellino, BN – Benevento, CE – Caserta, SA – Salerno
  • CZ – Catanzaro, RC – Reggio Calabria, AG – Agrigento

Understanding Italian Vehicle Data

Power Ratings Explained

Italian vehicle data includes multiple power measurements:

  • PowerCV – Cavalli Vapore (Steam Horsepower) – Traditional Italian power measurement
  • PowerKW – Kilowatts – Standard European power measurement
  • PowerFiscal – Fiscal horsepower for taxation and insurance purposes

Fuel Type Classifications

  • Benzina – Petrol/Gasoline
  • Diesel – Diesel fuel
  • GPL – Liquefied Petroleum Gas (Autogas)
  • Metano – Compressed Natural Gas (CNG)
  • Elettrica – Electric vehicle
  • Ibrida – Hybrid vehicle

Safety Features

  • ABS – Anti-lock Braking System status
  • AirBag – Airbag system information
  • Additional safety features when available in database

Use Cases for Italian Vehicle API

Insurance Industry

  • Premium Calculations – Multiple power ratings for accurate risk assessment
  • Claims Processing – Verify vehicle specifications and safety features
  • Insurance Verification – Real-time insurance status checking
  • Fraud Prevention – Cross-reference vehicle data with insurance records

Automotive Industry

  • Dealership Operations – Verify trade-in vehicle specifications
  • Parts and Service – K-Type codes for parts compatibility
  • Vehicle History – Registration and technical verification
  • Import/Export – Compliance verification for international trade

Fleet Management

  • Asset Tracking – Comprehensive vehicle identification and specs
  • Insurance Management – Monitor insurance status across fleet
  • Maintenance Scheduling – Engine specifications for service planning
  • Compliance Monitoring – Ensure all fleet vehicles are properly insured

Law Enforcement

  • Vehicle Identification – Quick lookups during traffic stops
  • Insurance Verification – Instant insurance status checking
  • Investigation Support – Vehicle history and ownership verification
  • Motorcycle Tracking – Dedicated motorcycle identification system

Mobile Applications

  • Insurance Apps – Instant vehicle data and insurance verification
  • Service Booking – Technical specifications for maintenance
  • Parking Apps – Vehicle verification and permit validation
  • Car Sharing – Vehicle identification and specification display

Italian Automotive Market Context

Major Italian Manufacturers

Fiat Chrysler Automobiles (Stellantis):

  • Fiat – Italy’s largest automaker, known for compact cars
  • Alfa Romeo – Premium sports and luxury vehicles
  • Lancia – Luxury and performance vehicles
  • Maserati – Luxury sports cars and sedans
  • Ferrari – World-renowned supercars and racing vehicles

Motorcycle Manufacturers:

  • Ducati – High-performance motorcycles
  • Aprilia – Sports and racing motorcycles
  • Moto Guzzi – Traditional Italian motorcycles
  • Benelli – Classic and modern motorcycle designs

Regional Variations

Italy’s diverse geography creates distinct automotive preferences:

Northern Italy: Higher concentration of luxury vehicles and motorcycles Central Italy: Mix of urban compact cars and touring vehicles Southern Italy: Focus on fuel-efficient and practical vehicles Islands (Sicily, Sardinia): Preference for small, maneuverable vehicles

Error Handling and Best Practices

class RobustItalianVehicleAPI extends ItalianVehicleAPI {
  async lookupWithFallback(registrationNumber) {
    let result;
    
    // Try car lookup first
    result = await this.lookupCar(registrationNumber);
    if (result && result.success) {
      return result;
    }
    
    // If car lookup fails, try motorcycle
    result = await this.lookupMotorcycle(registrationNumber);
    if (result && result.success) {
      return result;
    }
    
    return {
      error: true,
      message: "Vehicle not found in car or motorcycle databases",
      registration: registrationNumber
    };
  }
  
  async getCompleteVehicleInfo(registrationNumber) {
    const vehicleInfo = await this.lookupWithFallback(registrationNumber);
    
    if (vehicleInfo.error) {
      return vehicleInfo;
    }
    
    // Add insurance information if vehicle lookup successful
    const insuranceInfo = await this.checkInsurance(registrationNumber);
    
    return {
      ...vehicleInfo,
      insurance: insuranceInfo
    };
  }
}

Data Privacy and Insurance Verification

GDPR Compliance

Italy follows EU data protection regulations:

  • Vehicle technical data is not personal information
  • Insurance verification provides business-relevant data only
  • Implement appropriate data retention and access controls
  • Follow Italian privacy guidelines for automotive data usage

Insurance Verification Benefits

The Italian system’s insurance integration provides unique advantages:

  • Real-time insurance status verification
  • Insurance company identification
  • Coverage expiry date tracking
  • Regional insurance information

Getting Started

Account Registration

  1. Registration – Sign up for Italian vehicle API access
  2. Verification – Complete business verification process
  3. Testing – Use sample registration “BN071VN” for development
  4. Production – Configure endpoints for cars, motorcycles, and insurance

Sample Data for Testing

  • Cars: BN071VN (MINI Countryman from documentation)
  • Motorcycles: Test with various Italian motorcycle registrations
  • Insurance: Verify insurance data integration with sample plates

Integration Planning

  • Determine if your application needs car, motorcycle, or both endpoints
  • Plan for Italian power rating displays (CV, KW, Fiscal)
  • Implement insurance verification workflows
  • Design UI for Italian provincial identification

Conclusion

The Italian Vehicle Registration API provides comprehensive access to Italy’s sophisticated vehicle database, offering detailed technical specifications, multiple power ratings, and integrated insurance verification. The system’s support for both cars and motorcycles, combined with real-time insurance status checking, makes it particularly valuable for insurance companies, fleet managers, and automotive businesses operating in the Italian market.

Italy’s rich automotive heritage and diverse vehicle landscape create unique data requirements that the API addresses through detailed power measurements, safety feature tracking, and provincial identification systems. The integration of insurance verification adds significant value for compliance and business applications.

Understanding Italian vehicle classifications, power rating systems, and regional variations enhances the effectiveness of API integration while supporting the diverse needs of Italy’s automotive ecosystem.

Begin accessing Italian vehicle data by registering for API credentials and exploring the comprehensive database covering cars, motorcycles, and insurance information across all Italian provinces.

https://www.targa.co.it/

Categories: Uncategorized

French Vehicle Registration API: Complete Guide to Vehicle Data Lookup in France

https://www.immatriculationapi.com/

France operates one of Europe’s most sophisticated vehicle registration systems, covering over 38 million registered vehicles across its 101 departments. The French Vehicle Registration API provides developers and businesses with access to comprehensive vehicle specifications, technical data, and registration information for vehicles registered throughout metropolitan France and overseas territories.

Overview of French Vehicle Registration System

France’s vehicle registration system is managed by the Ministry of the Interior through the National Secure Registration System (SIV – Système d’Immatriculation des Véhicules). Since 2009, France has used a standardized license plate format that includes two letters, three numbers, and two letters (AA-123-AA), replacing the older regional system.

The centralized system maintains detailed technical specifications for all registered vehicles, including data from:

  • ANTS (Agence Nationale des Titres Sécurisés) – National Agency for Secure Documents
  • UTAC-CERAM – Technical services for automotive certification
  • SRA (Sécurité et Réparation Automobiles) – Automotive security and repair classifications

French Vehicle API Features

The France endpoint provides comprehensive vehicle information including technical specifications and security classifications:

Available Data

When querying French vehicle registrations, you can retrieve:

  • Make and Model – Complete manufacturer and vehicle model identification
  • Registration Year – Year when the vehicle was first registered in France
  • Engine Specifications – Engine size, fuel type, and power ratings
  • Technical Details – Transmission type, body style, and variant information
  • Registration Date – Exact date of first vehicle registration
  • SRA Classifications – Security and theft risk classifications
  • CNIT Code – French National Vehicle Identification Code
  • K-Type ID – European vehicle type approval identifier
  • Environmental Data – CO2 emissions and cylinder count

Sample Response Format

{
  "Description": "RENAULT SCÉNIC III",
  "RegistrationYear": "2016",
  "CarMake": {
    "CurrentTextValue": "RENAULT"
  },
  "CarModel": {
    "CurrentTextValue": "SCÉNIC III"
  },
  "EngineSize": {
    "CurrentTextValue": "5"
  },
  "FuelType": {
    "CurrentTextValue": "DIESEL"
  },
  "MakeDescription": {
    "CurrentTextValue": "RENAULT"
  },
  "ModelDescription": {
    "CurrentTextValue": "SCÉNIC III"
  },
  "BodyStyle": {
    "CurrentTextValue": "MONOSPACE COMPACT"
  },
  "RegistrationDate": "2016-06-24",
  "ExtendedData": {
    "anneeSortie": "2016",
    "boiteDeVitesse": "",
    "carburantVersion": "D",
    "libVersion": "1.5 dCi 1461cm3 110cv",
    "libelleModele": "SCÉNIC III",
    "marque": "RE",
    "puissance": "5",
    "nbPlace": "5",
    "datePremiereMiseCirculation": "24062016",
    "numSerieMoteur": "VF1JZ890H55864144",
    "puissanceDyn": "110",
    "KtypeId": "5853",
    "EngineCC": "1461",
    "Co2": "105",
    "Cylinders": "4",
    "CNIT": "M10RENVP472E768"
  }
}

API Implementation

Endpoint Usage

The French Vehicle API uses the /CheckFrance endpoint and requires two parameters:

  1. Registration Number – The complete French license plate number
  2. Username – Your API authentication credentials

Basic Implementation Example

// JavaScript example for French vehicle lookup
async function lookupFrenchVehicle(registrationNumber, username) {
  const apiUrl = `https://www.immatriculationapi.com/api/reg.asmx/CheckFrance?RegistrationNumber=${registrationNumber}&username=${username}`;
  
  try {
    const response = await fetch(apiUrl);
    const xmlText = await response.text();
    
    // Parse XML response
    const parser = new DOMParser();
    const xmlDoc = parser.parseFromString(xmlText, "text/xml");
    const jsonData = xmlDoc.getElementsByTagName("vehicleJson")[0].textContent;
    const vehicleInfo = JSON.parse(jsonData);
    
    return {
      make: vehicleInfo.MakeDescription.CurrentTextValue,
      model: vehicleInfo.ModelDescription.CurrentTextValue,
      year: vehicleInfo.RegistrationYear,
      engineSize: vehicleInfo.ExtendedData.EngineCC,
      power: vehicleInfo.ExtendedData.puissanceDyn,
      fuel: vehicleInfo.FuelType.CurrentTextValue,
      bodyStyle: vehicleInfo.BodyStyle.CurrentTextValue,
      registrationDate: vehicleInfo.RegistrationDate,
      co2: vehicleInfo.ExtendedData.Co2,
      cylinders: vehicleInfo.ExtendedData.Cylinders,
      vin: vehicleInfo.ExtendedData.numSerieMoteur,
      cnit: vehicleInfo.ExtendedData.CNIT
    };
  } catch (error) {
    console.error('French vehicle lookup failed:', error);
    return null;
  }
}

// Usage example
lookupFrenchVehicle("EG258MA", "your_username")
  .then(data => {
    if (data) {
      console.log(`Vehicle: ${data.make} ${data.model} (${data.year})`);
      console.log(`Engine: ${data.engineSize}cc, ${data.power}cv`);
      console.log(`Fuel: ${data.fuel}`);
      console.log(`CO2: ${data.co2}g/km`);
      console.log(`Registration: ${data.registrationDate}`);
    }
  });

Python Implementation

import requests
import xml.etree.ElementTree as ET
import json
from datetime import datetime

class FrenchVehicleAPI:
    def __init__(self, username):
        self.username = username
        self.base_url = "https://www.immatriculationapi.com/api/reg.asmx/CheckFrance"
    
    def validate_french_registration(self, registration):
        """Validate French registration number format"""
        if not registration:
            return False, "Registration number is required"
        
        # Remove spaces and convert to uppercase
        reg = registration.replace(" ", "").replace("-", "").upper()
        
        # Modern French format: 2 letters + 3 numbers + 2 letters
        # Old format validation could be added for historical plates
        if len(reg) < 6 or len(reg) > 9:
            return False, "Invalid registration length"
        
        return True, reg
    
    def lookup(self, registration_number):
        """Lookup French vehicle with comprehensive error handling"""
        # Validate registration format
        is_valid, processed_reg = self.validate_french_registration(registration_number)
        if not is_valid:
            return {"error": processed_reg}
        
        try:
            params = {
                'RegistrationNumber': processed_reg,
                'username': self.username
            }
            
            response = requests.get(self.base_url, params=params, timeout=15)
            response.raise_for_status()
            
            # Parse XML response
            root = ET.fromstring(response.content)
            json_element = root.find('.//vehicleJson')
            
            if json_element is None or not json_element.text:
                return {"error": "No vehicle data found for this registration number"}
            
            vehicle_data = json.loads(json_element.text)
            extended_data = vehicle_data.get('ExtendedData', {})
            
            # Process and structure the response
            return {
                'success': True,
                'description': vehicle_data.get('Description'),
                'make': vehicle_data.get('MakeDescription', {}).get('CurrentTextValue'),
                'model': vehicle_data.get('ModelDescription', {}).get('CurrentTextValue'),
                'registration_year': vehicle_data.get('RegistrationYear'),
                'body_style': vehicle_data.get('BodyStyle', {}).get('CurrentTextValue'),
                'fuel_type': vehicle_data.get('FuelType', {}).get('CurrentTextValue'),
                'registration_date': vehicle_data.get('RegistrationDate'),
                'engine_cc': extended_data.get('EngineCC'),
                'power_cv': extended_data.get('puissanceDyn'),
                'co2_emissions': extended_data.get('Co2'),
                'cylinders': extended_data.get('Cylinders'),
                'vin': extended_data.get('numSerieMoteur'),
                'cnit': extended_data.get('CNIT'),
                'ktype_id': extended_data.get('KtypeId'),
                'seats': extended_data.get('nbPlace'),
                'make_code': extended_data.get('marque'),
                'fuel_version': extended_data.get('carburantVersion'),
                'version_details': extended_data.get('libVersion'),
                'manufacture_year': extended_data.get('anneeSortie'),
                'first_registration': extended_data.get('datePremiereMiseCirculation'),
                'raw_data': vehicle_data
            }
            
        except requests.Timeout:
            return {"error": "Request timed out - please try again"}
        except requests.RequestException as e:
            return {"error": f"Network error: {str(e)}"}
        except ET.ParseError:
            return {"error": "Invalid response format from API"}
        except json.JSONDecodeError:
            return {"error": "Could not parse vehicle data"}
        except Exception as e:
            return {"error": f"Unexpected error: {str(e)}"}

# Usage example
api = FrenchVehicleAPI("your_username")
result = api.lookup("EG258MA")

if result.get('success'):
    print(f"Vehicle: {result['make']} {result['model']}")
    print(f"Year: {result['registration_year']}")
    print(f"Engine: {result['engine_cc']}cc, {result['power_cv']}cv")
    print(f"Fuel: {result['fuel_type']} (Code: {result['fuel_version']})")
    print(f"CO2 Emissions: {result['co2_emissions']}g/km")
    print(f"Body Style: {result['body_style']}")
    print(f"VIN: {result['vin']}")
    print(f"CNIT: {result['cnit']}")
else:
    print(f"Error: {result['error']}")

French Registration Number Formats

Modern Format (2009-Present)

The current French registration system uses the format: XX-123-XX

  • First two letters: Random sequence (not location-based)
  • Three numbers: Sequential from 001 to 999
  • Last two letters: Department identifier or random

Historical Formats (1950-2009)

Older French vehicles may have regional formats:

  • 123 XX 75 – Numbers, letters, department code
  • Regional variations with different structures

Special Plates

  • Diplomatic vehicles – Special CD (Corps Diplomatique) plates
  • Temporary plates – TT format for transit
  • Military vehicles – Special military identification

Understanding French Vehicle Data

Extended Data Fields Explained

The French API provides rich extended data with specific French terminology:

Technical Specifications:

  • anneeSortie – Year of first manufacture
  • boiteDeVitesse – Transmission type
  • carburantVersion – Fuel type code (D=Diesel, E=Petrol, etc.)
  • puissance – Administrative power (chevaux fiscaux)
  • puissanceDyn – Dynamic power (chevaux vapeur/CV)
  • EngineCC – Engine displacement in cubic centimeters
  • Cylinders – Number of cylinders
  • Co2 – CO2 emissions in g/km

Identification Codes:

  • CNIT – Code National d’Identification du Type (National Type Identification Code)
  • KtypeId – European K-Type identification number
  • marque – Manufacturer code (RE=Renault, PE=Peugeot, etc.)
  • numSerieMoteur – VIN (Vehicle Identification Number)

Registration Information:

  • datePremiereMiseCirculation – Date of first registration in format DDMMYYYY
  • nbPlace – Number of seats
  • libVersion – Detailed version description with engine specs

Fuel Type Classifications

  • ESSENCE – Petrol/Gasoline
  • DIESEL – Diesel fuel
  • ELECTRIQUE – Electric vehicle
  • HYBRIDE – Hybrid vehicle
  • GPL – Liquefied Petroleum Gas
  • GNV – Compressed Natural Gas

French Motorcycle Support

For motorcycles registered in France, use the dedicated motorcycle endpoint: https://www.immatriculationapi.com/api/bespokeapi.asmx?op=CheckMotorBikeFrance

This returns motorcycle-specific data including:

  • Engine specifications optimized for motorcycles
  • Motorcycle-specific body classifications
  • Power ratings appropriate for two-wheeled vehicles

Use Cases for French Vehicle API

Insurance Industry

  • Premium Calculations – CO2 emissions and power ratings for environmental taxes
  • Claims Processing – VIN verification and technical specifications
  • Fraud Prevention – Cross-reference CNIT codes and registration dates
  • Fleet Insurance – Bulk vehicle verification for commercial policies

Automotive Industry

  • Dealership Operations – Verify vehicle history and specifications
  • Parts and Service – CNIT and K-Type codes for parts compatibility
  • Import/Export – Technical compliance verification
  • Vehicle Valuations – Detailed specifications for pricing models

Fleet Management

  • Environmental Compliance – CO2 emissions tracking for corporate reporting
  • Maintenance Scheduling – Engine specifications and service requirements
  • Fuel Management – Fuel type verification for fleet optimization
  • Asset Tracking – Comprehensive vehicle identification

Government and Regulatory

  • Environmental Monitoring – Emissions data for pollution control
  • Tax Administration – Vehicle specifications for taxation purposes
  • Import Control – Technical verification for customs procedures
  • Traffic Management – Vehicle classification for access restrictions

Mobile Applications

  • Parking Apps – Vehicle identification and permit validation
  • Insurance Apps – Instant vehicle data for quote generation
  • Service Booking – Technical specs for maintenance appointments
  • Car Sharing – Vehicle verification and specification display

French Automotive Market Context

Major French Manufacturers

France is home to several global automotive manufacturers:

Groupe PSA (Stellantis):

  • Peugeot – Founded 1810, known for innovative design and diesel technology
  • Citroën – Renowned for comfort and hydraulic suspension systems
  • DS Automobiles – Premium brand focusing on luxury and French craftsmanship

Renault Group:

  • Renault – Major European manufacturer with strong EV presence
  • Alpine – Sports car manufacturer
  • Dacia – Value brand with simple, reliable vehicles

Specialized Manufacturers:

  • Bugatti – Ultra-luxury hypercars
  • Venturi – Electric vehicle specialist

French Vehicle Classification System

Administrative Power (Chevaux Fiscaux): France uses a unique administrative power system for taxation:

  • Calculated based on CO2 emissions and engine power
  • Used for registration taxes and annual road tax
  • Ranges typically from 3CV to 20CV+ for standard vehicles

Body Style Classifications:

  • BERLINE – Sedan
  • BREAK – Station wagon
  • MONOSPACE – MPV/Minivan
  • COUPÉ – Coupe
  • CABRIOLET – Convertible
  • COMBISPACE – Compact MPV

Error Handling and Best Practices

class FrenchVehicleLookup {
  constructor(username) {
    this.username = username;
    this.apiUrl = "https://www.immatriculationapi.com/api/reg.asmx/CheckFrance";
  }
  
  async lookupWithRetry(registration, maxRetries = 3) {
    let lastError;
    
    for (let attempt = 1; attempt <= maxRetries; attempt++) {
      try {
        const result = await this.lookup(registration);
        
        if (result && !result.error) {
          return result;
        }
        
        lastError = result?.error || "Unknown error";
        
        // Wait before retry (exponential backoff)
        if (attempt < maxRetries) {
          await new Promise(resolve => setTimeout(resolve, 1000 * attempt));
        }
        
      } catch (error) {
        lastError = error.message;
        
        if (attempt < maxRetries) {
          await new Promise(resolve => setTimeout(resolve, 1000 * attempt));
        }
      }
    }
    
    return {
      error: true,
      message: `Failed after ${maxRetries} attempts: ${lastError}`,
      registration: registration
    };
  }
  
  async lookup(registration) {
    // Validate and clean registration
    const cleanReg = this.cleanRegistration(registration);
    if (!cleanReg) {
      throw new Error("Invalid registration format");
    }
    
    const response = await fetch(`${this.apiUrl}?RegistrationNumber=${cleanReg}&username=${this.username}`);
    
    if (!response.ok) {
      throw new Error(`HTTP ${response.status}: ${response.statusText}`);
    }
    
    // Process response...
    return this.parseResponse(await response.text());
  }
  
  cleanRegistration(registration) {
    if (!registration) return null;
    
    // Remove spaces, hyphens, and convert to uppercase
    const cleaned = registration.replace(/[\s\-]/g, '').toUpperCase();
    
    // Basic validation
    if (cleaned.length < 6 || cleaned.length > 9) {
      return null;
    }
    
    return cleaned;
  }
}

Data Privacy and Compliance

GDPR Compliance

As an EU member state, France follows strict data protection regulations:

  • Vehicle technical data is not considered personal information
  • VIN numbers are vehicle identifiers, not personal data
  • Implement appropriate data retention policies
  • Ensure proper access controls and audit trails

Usage Guidelines

  • API intended for legitimate business and technical purposes
  • Respect rate limits to maintain service quality
  • Implement proper caching to reduce unnecessary requests
  • Follow French data protection guidelines for automotive data

Getting Started

Account Registration

  1. Sign Up – Register for API access through the French vehicle API portal
  2. Verification – Complete email and business verification process
  3. Testing – Use sample registration “EG258MA” for development
  4. Production – Purchase credits and configure production environment

Sample Data for Testing

  • EG258MA – Renault Scénic III (sample from documentation)
  • Test various registration formats to understand response variations
  • Verify error handling with invalid registrations

Integration Planning

  • Plan for French-specific data fields in your application
  • Consider CO2 emissions display for environmental compliance
  • Implement proper error handling for network timeouts
  • Design UI to accommodate French technical terminology

Conclusion

The French Vehicle Registration API provides comprehensive access to France’s sophisticated vehicle database, offering detailed technical specifications, environmental data, and regulatory compliance information. The system’s integration of SRA classifications, CNIT codes, and detailed emissions data makes it particularly valuable for insurance, fleet management, and environmental compliance applications.

France’s centralized registration system ensures consistent data quality while the API’s rich extended data provides all necessary information for professional automotive applications. Understanding French vehicle classifications, administrative power calculations, and technical specifications enhances the effectiveness of API integration.

The system’s compliance with EU regulations and focus on environmental data positions it well for modern automotive applications requiring detailed vehicle specifications and emissions information.

Begin integrating French vehicle data by registering for API access and exploring the comprehensive database of French vehicle registrations across all departments and territories.

https://www.immatriculationapi.com/

Categories: Uncategorized

Romanian Vehicle Registration #API: Complete Guide to Vehicle Data Lookup in #Romania

TLDR: https://www.inmatriculareapi.ro/
Romania, as a member of the European Union since 2007, maintains a modern vehicle registration system that provides comprehensive vehicle information through digital databases. The Romanian Vehicle Registration API offers developers and businesses access to detailed vehicle specifications, ownership documents, and technical data for vehicles registered throughout Romania’s 42 counties.

Overview of Romanian Vehicle Registration System

Romania’s vehicle registration system is centralized under the Romanian National Agency for Fiscal Administration (ANAF) and the Romanian Automobile Registry (RAR). The system covers all Romanian counties from Bucharest (București) to the smallest rural regions, providing standardized vehicle identification and technical specifications.

The Romanian license plate format typically consists of:

  • County Code – 1-2 letters identifying the county of registration
  • Numbers – Sequential numerical identifier
  • Letters – Additional letter combinations

Romanian Vehicle API Features

The Romania endpoint provides comprehensive vehicle information including:

Available Data

When querying Romanian vehicle registrations, you can retrieve:

  • Make and Model – Complete manufacturer and vehicle model information
  • Registration Year – Year when the vehicle was first registered
  • Engine Specifications – Engine size in cubic centimeters and power in kilowatts
  • Fuel Type – Fuel classification (benzina/petrol, motorina/diesel, GPL/LPG, electric)
  • VIN Number – Complete 17-character Vehicle Identification Number
  • CIV Document – Vehicle Identity Document (Cartea de Identitate a Vehiculului)
  • Vehicle Type – Classification (Autoturism/passenger car, Autoutilitară/utility vehicle, etc.)
  • Technical Specifications – Weight, number of seats, variant information
  • Registration Region – County or city where the vehicle is registered
  • Representative Image – Visual identification of the vehicle type

Sample Response Format

{
  "Description": "Renault Clio",
  "RegistrationYear": "1999",
  "CarMake": {
    "CurrentTextValue": "Renault"
  },
  "CarModel": {
    "CurrentTextValue": "Clio"
  },
  "MakeDescription": {
    "CurrentTextValue": "Renault"
  },
  "ModelDescription": {
    "CurrentTextValue": "Clio"
  },
  "Type": "Autoturism",
  "VIN": "VF1CB0A0F20507251",
  "CIV": "J350228",
  "Variant": "",
  "Weight": "955",
  "FuelType": "benzina",
  "NumberOfSeats": "5",
  "Power": "43",
  "EngineSize": "1149",
  "Region": "București",
  "ImageUrl": "http://www.inmatriculareapi.ro/image.aspx/@UmVuYXVsdCBDbGlv"
}

API Implementation

Endpoint Usage

The Romanian Vehicle API uses the /CheckRomania endpoint and requires two parameters:

  1. Registration Number – The complete Romanian license plate number
  2. Username – Your API authentication credentials

Basic Implementation Example

// JavaScript example for Romanian vehicle lookup
async function lookupRomanianVehicle(registrationNumber, username) {
  const apiUrl = `https://www.inmatriculareapi.ro/api/reg.asmx/CheckRomania?RegistrationNumber=${registrationNumber}&username=${username}`;
  
  try {
    const response = await fetch(apiUrl);
    const xmlText = await response.text();
    
    // Parse XML response
    const parser = new DOMParser();
    const xmlDoc = parser.parseFromString(xmlText, "text/xml");
    const jsonData = xmlDoc.getElementsByTagName("vehicleJson")[0].textContent;
    const vehicleInfo = JSON.parse(jsonData);
    
    return {
      make: vehicleInfo.MakeDescription.CurrentTextValue,
      model: vehicleInfo.ModelDescription.CurrentTextValue,
      year: vehicleInfo.RegistrationYear,
      engineSize: vehicleInfo.EngineSize,
      power: vehicleInfo.Power,
      fuel: vehicleInfo.FuelType,
      vin: vehicleInfo.VIN,
      civ: vehicleInfo.CIV,
      region: vehicleInfo.Region,
      weight: vehicleInfo.Weight,
      seats: vehicleInfo.NumberOfSeats,
      type: vehicleInfo.Type
    };
  } catch (error) {
    console.error('Romanian vehicle lookup failed:', error);
    return null;
  }
}

// Usage example
lookupRomanianVehicle("B123ABC", "your_username")
  .then(data => {
    if (data) {
      console.log(`Vehicle: ${data.make} ${data.model} (${data.year})`);
      console.log(`Engine: ${data.engineSize}cc, ${data.power}kW`);
      console.log(`Fuel: ${data.fuel}`);
      console.log(`CIV: ${data.civ}`);
      console.log(`Region: ${data.region}`);
    }
  });

Python Implementation

import requests
import xml.etree.ElementTree as ET
import json

class RomanianVehicleAPI:
    def __init__(self, username):
        self.username = username
        self.base_url = "https://www.inmatriculareapi.ro/api/reg.asmx/CheckRomania"
    
    def validate_registration_format(self, registration):
        """Validate Romanian registration number format"""
        if not registration or len(registration.strip()) < 6:
            return False, "Registration number too short"
        
        # Remove spaces and convert to uppercase
        reg = registration.replace(" ", "").upper()
        
        # Basic format validation (letters + numbers + letters)
        if not any(c.isalpha() for c in reg) or not any(c.isdigit() for c in reg):
            return False, "Invalid format - must contain both letters and numbers"
        
        return True, reg
    
    def lookup(self, registration_number):
        """Lookup Romanian vehicle with comprehensive error handling"""
        # Validate registration format
        is_valid, processed_reg = self.validate_registration_format(registration_number)
        if not is_valid:
            return {"error": processed_reg}
        
        try:
            params = {
                'RegistrationNumber': processed_reg,
                'username': self.username
            }
            
            response = requests.get(self.base_url, params=params, timeout=15)
            response.raise_for_status()
            
            # Parse XML response
            root = ET.fromstring(response.content)
            json_element = root.find('.//vehicleJson')
            
            if json_element is None or not json_element.text:
                return {"error": "No vehicle data found for this registration number"}
            
            vehicle_data = json.loads(json_element.text)
            
            # Process and structure the response
            return {
                'success': True,
                'description': vehicle_data.get('Description'),
                'make': vehicle_data.get('MakeDescription', {}).get('CurrentTextValue'),
                'model': vehicle_data.get('ModelDescription', {}).get('CurrentTextValue'),
                'registration_year': vehicle_data.get('RegistrationYear'),
                'vehicle_type': vehicle_data.get('Type'),
                'vin': vehicle_data.get('VIN'),
                'civ': vehicle_data.get('CIV'),
                'engine_size': vehicle_data.get('EngineSize'),
                'power_kw': vehicle_data.get('Power'),
                'fuel_type': vehicle_data.get('FuelType'),
                'weight_kg': vehicle_data.get('Weight'),
                'number_of_seats': vehicle_data.get('NumberOfSeats'),
                'region': vehicle_data.get('Region'),
                'variant': vehicle_data.get('Variant'),
                'image_url': vehicle_data.get('ImageUrl'),
                'raw_data': vehicle_data
            }
            
        except requests.Timeout:
            return {"error": "Request timed out - please try again"}
        except requests.RequestException as e:
            return {"error": f"Network error: {str(e)}"}
        except ET.ParseError:
            return {"error": "Invalid response format from API"}
        except json.JSONDecodeError:
            return {"error": "Could not parse vehicle data"}
        except Exception as e:
            return {"error": f"Unexpected error: {str(e)}"}

# Usage example
api = RomanianVehicleAPI("your_username")
result = api.lookup("B123ABC")

if result.get('success'):
    print(f"Vehicle: {result['make']} {result['model']}")
    print(f"Year: {result['registration_year']}")
    print(f"Engine: {result['engine_size']}cc, {result['power_kw']}kW")
    print(f"Fuel: {result['fuel_type']}")
    print(f"VIN: {result['vin']}")
    print(f"CIV: {result['civ']}")
    print(f"Region: {result['region']}")
    print(f"Weight: {result['weight_kg']}kg")
    print(f"Seats: {result['number_of_seats']}")
else:
    print(f"Error: {result['error']}")

Romanian Vehicle Registration Format

County Codes

Romanian license plates begin with county codes that identify the registration location:

Major Cities and Counties:

  • B – București (Bucharest) – Capital city
  • AB – Alba – Alba Iulia
  • AG – Argeș – Pitești
  • AR – Arad – Arad
  • BC – Bacău – Bacău
  • BH – Bihor – Oradea
  • BN – Bistrița-Năsăud – Bistrița
  • BR – Brăila – Brăila
  • BT – Botoșani – Botoșani
  • BV – Brașov – Brașov
  • BZ – Buzău – Buzău
  • CJ – Cluj – Cluj-Napoca
  • CL – Călărași – Călărași
  • CS – Caraș-Severin – Reșița
  • CT – Constanța – Constanța
  • CV – Covasna – Sfântu Gheorghe
  • DB – Dâmbovița – Târgoviște
  • DJ – Dolj – Craiova
  • GJ – Gorj – Târgu Jiu
  • GL – Galați – Galați
  • GR – Giurgiu – Giurgiu
  • HD – Hunedoara – Deva
  • HR – Harghita – Miercurea Ciuc
  • IF – Ilfov – Buftea
  • IL – Ialomița – Slobozia
  • IS – Iași – Iași
  • MH – Mehedinți – Drobeta-Turnu Severin
  • MM – Maramureș – Baia Mare
  • MS – Mureș – Târgu Mureș
  • NT – Neamț – Piatra Neamț
  • OT – Olt – Slatina
  • PH – Prahova – Ploiești
  • SB – Sibiu – Sibiu
  • SJ – Sălaj – Zalău
  • SM – Satu Mare – Satu Mare
  • SV – Suceava – Suceava
  • TL – Tulcea – Tulcea
  • TM – Timiș – Timișoara
  • TR – Teleorman – Alexandria
  • VL – Vâlcea – Râmnicu Vâlcea
  • VN – Vrancea – Focșani
  • VS – Vaslui – Vaslui

Understanding Romanian Vehicle Data

Vehicle Types (Tip Vehicul)

  • Autoturism – Passenger car
  • Autoutilitară – Utility vehicle/van
  • Autocamion – Truck
  • Autobus/Autobuz – Bus
  • Motocicletă – Motorcycle
  • Moped – Moped
  • Remorcă – Trailer

Fuel Types (Tip Combustibil)

  • Benzină – Petrol/Gasoline
  • Motorină – Diesel
  • GPL – Liquefied Petroleum Gas
  • Electric – Electric vehicle
  • Hibrid – Hybrid (petrol/electric or diesel/electric)

CIV Document

The CIV (Cartea de Identitate a Vehiculului) is Romania’s vehicle identity document, similar to a vehicle registration certificate. It contains:

  • Vehicle technical specifications
  • Ownership history
  • Registration details
  • Environmental compliance information

Use Cases for Romanian Vehicle API

Insurance Industry

  • Policy Underwriting – Access technical specifications for risk assessment
  • Claims Processing – Verify vehicle details during accident claims
  • Fraud Prevention – Cross-reference VIN and CIV data for authenticity
  • Premium Calculation – Engine power and weight for insurance categories

Automotive Dealers

  • Vehicle History – Verify registration and technical details
  • Import/Export – VIN verification for cross-border transactions
  • Inventory Management – Automated vehicle data population
  • Trade Valuations – Technical specifications for pricing

Fleet Management

  • Asset Tracking – Maintain detailed vehicle records
  • Compliance Monitoring – Ensure registration validity across fleet
  • Maintenance Planning – Engine specifications for service schedules
  • Environmental Reporting – Fuel type and emissions data

Government and Law Enforcement

  • Vehicle Identification – Quick lookups during traffic enforcement
  • Registration Verification – Confirm vehicle legitimacy
  • Import Control – VIN verification for customs procedures
  • Investigation Support – Vehicle tracking and identification

Mobile Applications

  • Car Shopping Apps – Instant vehicle specification lookup
  • Insurance Apps – Quick vehicle verification for quotes
  • Service Apps – Technical specifications for maintenance booking
  • Parking Apps – Vehicle identification and validation

Error Handling Best Practices

function handleRomanianVehicleLookup(registration, username) {
  // Validate input format
  if (!registration || registration.length < 6) {
    return Promise.reject(new Error("Invalid registration number format"));
  }
  
  // Clean registration number
  const cleanReg = registration.replace(/\s+/g, '').toUpperCase();
  
  return lookupRomanianVehicle(cleanReg, username)
    .then(data => {
      if (!data) {
        throw new Error("No vehicle data returned");
      }
      
      // Validate essential fields
      if (!data.make || !data.model) {
        throw new Error("Incomplete vehicle data received");
      }
      
      return data;
    })
    .catch(error => {
      console.error('Romanian vehicle lookup error:', error);
      
      // Return structured error response
      return {
        error: true,
        message: error.message,
        registration: registration,
        timestamp: new Date().toISOString()
      };
    });
}

Data Privacy and Compliance

GDPR Compliance

As an EU member state, Romania follows strict data protection regulations:

  • The API returns technical vehicle specifications, not personal owner data
  • VIN and CIV numbers are vehicle identifiers, not personal information
  • Consider data retention policies when caching API responses
  • Implement proper access controls for vehicle data systems

Usage Limitations

  • API is intended for legitimate business purposes
  • Vehicle data should not be used for unauthorized tracking
  • Respect rate limits and terms of service
  • Implement proper error handling to avoid excessive requests

Getting Started

Account Setup

  1. Register for API access at the Romanian vehicle API portal
  2. Verify your email address and business credentials
  3. Test with sample registration numbers like “B123ABC”
  4. Purchase credits for production usage

Integration Testing

Test with various Romanian registration formats:

  • Bucharest format: B123ABC, B456DEF
  • County formats: CJ12ABC, TM34DEF, CT56GHI
  • Different vehicle types to understand data variations

Production Considerations

  • Implement robust error handling for network issues
  • Cache responses appropriately to reduce API calls
  • Monitor API usage and credit consumption
  • Plan for data updates and system maintenance windows

Conclusion

The Romanian Vehicle Registration API provides comprehensive access to vehicle data across all Romanian counties and cities. With detailed technical specifications, official document references (CIV), and standardized data formats, the API supports diverse applications from insurance processing to fleet management.

Romania’s centralized registration system ensures consistent data quality while the API’s detailed response format provides all necessary vehicle information for professional applications. Understanding Romanian vehicle types, fuel classifications, and regional codes enhances the effectiveness of API integration.

The system’s compliance with EU data protection standards and focus on technical specifications rather than personal data makes it suitable for business applications requiring vehicle verification and specification lookup.

Start integrating Romanian vehicle data today by registering for API access and exploring the comprehensive database of Romanian vehicle registrations.

Please visit https://www.inmatriculareapi.ro/ to get started.