Getting Started

From messy vehicle string to canonical id in five minutes.

VehiclesDB is the open catalogue of what vehicles exist: 16,434 models across 975 makes and 6 kinds (cars, motorcycles, mopeds, vans, trucks, buses), reconciled from the official registers of 18 countries, versioned, and open under CC-BY 4.0. On top of the open data sits a hosted API for the hard part: turning messy real-world vehicle strings into canonical ids.

Want every make and model? Make one request to GET /api/v1/catalog: every make with every one of its models, in one response, free with your key. There is no need to loop over the makes one at a time.

curl -s https://vehiclesdb.com/api/v1/catalog \
  -H "Authorization: Bearer vdb_sk_YOUR_KEY" \
  -o catalog.json

Rather have a file? Get the dataset as CSV, JSON, Parquet or SQLite from your data hub.

There are four ways in. Pick the one that fits; they all use the same ids, so you can start with one and add another later.

1. The dataset as files (free with an account)

Every format (CSV, JSON, Parquet and a single-file SQLite database) and a list for any kind and country are on your data hub, pinned to the release this site serves, next to the exact credit line, the SDKs and a prompt for your AI agent.

Get the dataset: free with an account. Credit line required on the free plan.

The schema contract and the per-source licensing notes live in the vehiclesdb repo. The credit line ("Vehicle data by VehiclesDB") is a condition of the licence, not a courtesy.

Using Claude, ChatGPT, Cursor or another AI assistant? Copy this and paste it there.

Use the VehiclesDB dataset files
See what it says
VehiclesDB (https://vehiclesdb.com) is a dataset and API of vehicle makes and models from official registration records. Task: use the VehiclesDB dataset files.

Goal: load every make and model into this project's database from the open dataset files.

Steps:
1. The owner downloads the files from https://vehiclesdb.com/data (a free account). Formats: CSV, JSON, Parquet, SQLite. Field meanings: the SCHEMA.md in the release.
2. Import them. Use the "id" column (like car/volkswagen/golf) as the key; never key on names, which can change.
3. To stay current, re-import a newer release, or call GET https://vehiclesdb.com/api/v1/catalog with the public key (free; send If-None-Match with the ETag to get a 304 when nothing changed).

Credit: the files are open under CC BY 4.0. Show this line, linked, wherever the data appears (a footer is fine), unless your plan removes the credit:
<a href="https://vehiclesdb.com">Vehicle data by VehiclesDB</a>

Rules:
- Ids look like car/volkswagen/golf. Store ids. A renamed id answers 301 with the new one: follow it and save the new id.
- Errors are JSON with an "error" code: branch on it. 402 = out of credits, 429 = wait the Retry-After seconds, then retry.
- Never put a secret key (vdb_sk_…) in browser code, and never commit it. Public keys (vdb_pk_…) are made for web pages.
- Do not scrape vehiclesdb.com, do not remove or hide the credit, and do not invent endpoints or options: check the reference.

Read:
- API reference: https://vehiclesdb.com/api
- OpenAPI spec: https://vehiclesdb.com/openapi.json
- Guide: https://vehiclesdb.com/getting-started
- Credit line formats: https://vehiclesdb.com/legal/attribution
- API terms: https://vehiclesdb.com/legal/api-terms

2. The make and model selector (free with an account)

A make dropdown that feeds a model dropdown, on any website, from one pasted block. It reads the free Dropdown Data endpoints with your public key (vdb_pk_…), which is safe in a browser and can be locked to your domains.

Add the selector to your site: see it working, then copy the block with your key already in it. It stores the canonical id (car/volkswagen/golf) alongside the names, so what your form saves is what every other part of VehiclesDB understands.

Using Claude, ChatGPT, Cursor or another AI assistant? Copy this and paste it there.

Add the make and model selector to a website
See what it says
VehiclesDB (https://vehiclesdb.com) is a dataset and API of vehicle makes and models from official registration records. Task: add the make and model selector to a website.

Goal: in the form on your-website.com, let people pick a make, then a model, from lists instead of typing.

Steps:
1. Paste this where the selector should appear, inside the form:

<select id="vehicle-make" name="make"></select>
<select id="vehicle-model" name="model"></select>
<input type="hidden" id="vehicle-id" name="vehicle_id">
<script src="https://cdn.jsdelivr.net/npm/make-model-dropdown@0.4.1"></script>
<script>
  VehiclesDropdown.attach({
    key: "vdb_pk_YOUR_PUBLIC_KEY",
    make: "#vehicle-make",
    model: "#vehicle-model",
    idInput: "#vehicle-id",
    kind: "car",
    order: "popular"
  })
</script>

2. On submit the form sends "vehicle_id" (the id, like car/volkswagen/golf) plus "make" and "model" as slugs (like volkswagen and golf), not names. Store vehicle_id.
3. Keep the public key exactly as it is. It is locked to your-website.com (the owner sets this in VehiclesDB, Settings, API keys), so it only works there; add localhost in the same place to try it locally.

Options you may add to attach(): kind ("car", "motorcycle", "moped", "van", "truck", "bus"), country (two-letter code), order ("popular" or "alphabetical"), includeOther, placeholderMake, placeholderModel, locale ("en" or "es"), onChange. Do not invent others.

No key yet? The same selector works with no account: leave out key and add source: "dataset", and it reads the open VehiclesDB dataset file from the CDN. A key adds make logos and the most registered makes at the top of the list.

Credit: the selector shows a small "Vehicle data by VehiclesDB" line by itself. Leave it visible unless your plan removes the credit (Starter, $9 a month, does).

Rules:
- Ids look like car/volkswagen/golf. Store ids. A renamed id answers 301 with the new one: follow it and save the new id.
- Errors are JSON with an "error" code: branch on it. 402 = out of credits, 429 = wait the Retry-After seconds, then retry.
- Never put a secret key (vdb_sk_…) in browser code, and never commit it. Public keys (vdb_pk_…) are made for web pages.
- Do not scrape vehiclesdb.com, do not remove or hide the credit, and do not invent endpoints or options: check the reference.

Read:
- API reference: https://vehiclesdb.com/api
- OpenAPI spec: https://vehiclesdb.com/openapi.json
- Guide: https://vehiclesdb.com/getting-started
- Credit line formats: https://vehiclesdb.com/legal/attribution
- API terms: https://vehiclesdb.com/legal/api-terms
- Selector options: https://vehiclesdb.com/make-and-model-dropdown

3. A client for your language

Three official clients, one set of ids:

Language Install Source
Ruby gem "vehicles" vehiclesdb/vehicles
JavaScript and TypeScript npm i @vehiclesdb/client vehiclesdb/vehiclesdb-js
Python pip install vehiclesdb vehiclesdb/vehiclesdb-python
Vehicles.find("vw golf")                  # => #<Vehicles::Model "Volkswagen Golf">
Vehicles.makes(kind: :motorcycle)         # dropdown-ready make lists
Vehicles.top_models(kind: :car, country: :de, limit: 10)
Vehicles.plates(:nl)                      # license-plate formats, to check input
model.former_ids                          # append-only id migration aliases
import { VehiclesDB } from '@vehiclesdb/client'
const db = new VehiclesDB({ apiKey: process.env.VEHICLESDB_API_KEY })

await db.resolve('VW Golf')               // => { id: 'car/volkswagen/golf', confidence: 0.97, ... }
await db.models('VW', { kind: 'car' })    // alias-aware: "VW" just works
await db.images('car/renault/clio', { color: 'blue' })
import os
from vehiclesdb import VehiclesDB
db = VehiclesDB(api_key=os.environ["VEHICLESDB_API_KEY"])

db.model("car/volkswagen/golf").full_name    # "Volkswagen Golf"
db.models("VW", kind="car")                  # alias-aware make lookup
db.images("car/renault/clio", color="blue")

Makes, models, search and resolution answer from the open dataset without a key; vehicle images come from the hosted API and need your private key. An API error reaches you with the API's own error string as code (no_image, color_not_available, insufficient_credits…), so you branch on the same codes in every language. The gem also bundles validators for your models, dropdown helpers for your forms, and an MCP server (vehicles-mcp) so agents can query the catalog.

Using Claude, ChatGPT, Cursor or another AI assistant? Copy this and paste it there.

Give your tool your secret key as an environment variable named VEHICLESDB_API_KEY. It is never in the text.

Use a VehiclesDB client library
See what it says
VehiclesDB (https://vehiclesdb.com) is a dataset and API of vehicle makes and models from official registration records. Task: use a VehiclesDB client library.

Goal: use VehiclesDB from code through the official client for this project's language.

Clients:
- Ruby: gem "vehicles" (README: https://github.com/vehiclesdb/vehicles)
- JavaScript: npm install @vehiclesdb/client (README: https://github.com/vehiclesdb/vehiclesdb-js)
- Python: pip install vehiclesdb (README: https://github.com/vehiclesdb/vehiclesdb-python)

Steps:
1. Install the client for this project's language and read its README first.
2. Create the client with the key read from the VEHICLESDB_API_KEY environment variable.
3. Resolve text to an id (like car/volkswagen/golf) and store the id, never the name.

Credit: show this line, linked, wherever the data appears, unless your plan removes the credit:
<a href="https://vehiclesdb.com">Vehicle data by VehiclesDB</a>

Rules:
- Ids look like car/volkswagen/golf. Store ids. A renamed id answers 301 with the new one: follow it and save the new id.
- Errors are JSON with an "error" code: branch on it. 402 = out of credits, 429 = wait the Retry-After seconds, then retry.
- Never put a secret key (vdb_sk_…) in browser code, and never commit it. Public keys (vdb_pk_…) are made for web pages.
- Do not scrape vehiclesdb.com, do not remove or hide the credit, and do not invent endpoints or options: check the reference.

Read:
- API reference: https://vehiclesdb.com/api
- OpenAPI spec: https://vehiclesdb.com/openapi.json
- Guide: https://vehiclesdb.com/getting-started
- Credit line formats: https://vehiclesdb.com/legal/attribution
- API terms: https://vehiclesdb.com/legal/api-terms
- Clients: https://github.com/vehiclesdb/vehicles, https://github.com/vehiclesdb/vehiclesdb-js, https://github.com/vehiclesdb/vehiclesdb-python

4. The hosted API (the resolver, with free credits to start)

The API does the hard part: resolution — registry rows, insurance policy lines, marketplace titles in; canonical ids with confidence and a machine-readable audit trail out.

Step 1 — get a key. Create an account, then mint your private key at Settings → API keys. Private keys look like vdb_sk_…. Every account starts with 100 free credits, once, with no card and no trial clock.

Step 2 — resolve something messy:

curl -s -X POST https://vehiclesdb.com/api/v1/resolve \
  -H "Authorization: Bearer vdb_sk_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"input": "MERCEDES-BENZ | SPRINTER", "kind_hint": "van"}'
{
  "match": {
    "id": "van/mercedes-benz/sprinter",
    "name": "Sprinter",
    "make": { "id": "mercedes-benz", "name": "Mercedes-Benz" },
    "kind": "van",
    "confidence": 0.97,
    "method": "fold"
  },
  "ambiguous": false,
  "alternates": [
    { "id": "bus/mercedes-benz/sprinter", "confidence": 0.45 },
    { "id": "truck/mercedes-benz/sprinter", "confidence": 0.45 }
  ],
  "resolved_via": ["kind_hint:van"],
  "dataset_version": "2026.12.0"
}

resolved_via is the audit trail — log it next to your stored id and every resolution is explainable later. When we can't resolve honestly, you get "match": null plus ranked candidates — never a guess past the confidence floor.

Step 3 — go deeper on a record:

# The full record: identity + production runs, variants, links, make facts
curl -s https://vehiclesdb.com/api/v1/vehicles/van/mercedes-benz/sprinter/full \
  -H "Authorization: Bearer vdb_sk_YOUR_KEY"

# Vehicle images: three sizes, in the colour you ask for when we have it
curl -s "https://vehiclesdb.com/api/v1/vehicles/car/renault/clio/images?color=blue" \
  -H "Authorization: Bearer vdb_sk_YOUR_KEY"

Step 4 — handle the answers that are not a 200. Every error is small JSON with a stable error code and a human message; branch on error:

You get It means Do this
301 moved_permanently the id or make slug was renamed or merged follow Location, store the new id
401 missing_token, invalid_token, revoked_key, expired_key no usable key check the Authorization: Bearer header
402 insufficient_credits the wallet is empty top up; the body carries balance, packs and billing_url
403 publishable_key_not_allowed a public key on a private endpoint call it from your server with your private key
403 origin_not_allowed, ip_not_allowed the key is locked to other websites or addresses fix the list in Settings → API keys
404 unknown_model, no_image, color_not_available, logo_not_available nothing to serve (free) show your fallback
422 … a parameter is missing or outside its set (free) the body names the allowed values
429 rate_limited too fast; credits untouched wait Retry-After seconds

The complete contract — every parameter, every response shape and every error code, with an example of each — lives in the interactive API reference, generated from the same code that serves the requests and checked against its real answers. Changes that can affect an integration are on the API changelog.

Using Claude, ChatGPT, Cursor or another AI assistant? Copy this and paste it there.

Give your tool your secret key as an environment variable named VEHICLESDB_API_KEY. It is never in the text.

Turn messy vehicle text into VehiclesDB ids
See what it says
VehiclesDB (https://vehiclesdb.com) is a dataset and API of vehicle makes and models from official registration records. Task: turn messy vehicle text into VehiclesDB ids.

Goal: turn free text like "VW Golf" into the stable VehiclesDB id, server side.

Request (server code only):
POST https://vehiclesdb.com/api/v1/resolve
Authorization: Bearer <read from the VEHICLESDB_API_KEY environment variable>
Content-Type: application/json
{"input": "VW Golf", "kind_hint": "car"}

Response: {"match": {"id": "car/volkswagen/golf", "name": …, "make": {"id": …, "name": …}, "kind": …, "confidence": 0.97}, "ambiguous": false, "alternates": […]}
"match" is null when nothing is confident enough: then show the alternates or ask the user.

Store match.id. Each call uses 1 credit. To list makes and models instead, GET https://vehiclesdb.com/api/v1/makes and GET https://vehiclesdb.com/api/v1/makes/{make_slug}/models (free).

Credit: show this line, linked, wherever the data appears, unless your plan removes the credit:
<a href="https://vehiclesdb.com">Vehicle data by VehiclesDB</a>

Rules:
- Ids look like car/volkswagen/golf. Store ids. A renamed id answers 301 with the new one: follow it and save the new id.
- Errors are JSON with an "error" code: branch on it. 402 = out of credits, 429 = wait the Retry-After seconds, then retry.
- Never put a secret key (vdb_sk_…) in browser code, and never commit it. Public keys (vdb_pk_…) are made for web pages.
- Do not scrape vehiclesdb.com, do not remove or hide the credit, and do not invent endpoints or options: check the reference.

Read:
- API reference: https://vehiclesdb.com/api
- OpenAPI spec: https://vehiclesdb.com/openapi.json
- Guide: https://vehiclesdb.com/getting-started
- Credit line formats: https://vehiclesdb.com/legal/attribution
- API terms: https://vehiclesdb.com/legal/api-terms

Credits, plans, and running out

The free key check and dropdown endpoints spend nothing. A resolve costs 1 credit and a plate match 1 credit; a full vehicle record costs 2 credits; each vehicle image served costs 50 credits; a jurisdiction's whole plate corpus costs 5 credits. Malformed requests and unknown ids are free. An honest "match": null from the resolver still costs 1 credit because the resolution work ran either way.

Running low? Billing shows your live balance and recent usage and sells instant top-up packs. Paid plans refill monthly; unused subscription credits expire at the refill, while credit packs bought outright are separate from the monthly allowance and carry over. If your wallet empties, the API answers 402 with the self-serve options — no overage charges or surprise bills.

The data itself

Every record is corroborated by at least two independent official sources (or one with a fleet count no typo could produce). Ids are stable: renamed models keep resolving through former_ids, and nothing is silently deleted. The dataset version is part of every API response, and each release is versioned. How it's all built, measured, and audited: the public QA program.