Vehicle data for AI apps and agents

Building with ChatGPT, Lovable, Cursor, Replit or your own agent? Give it real vehicles instead of made-up ones. A prompt that works the first time, and an MCP server that runs offline.

A lot of the people who use VehiclesDB never read our docs. They asked ChatGPT for "a car make and model list for my form", or told Lovable or Cursor to "add a car picker", and the AI pointed at us. Sometimes it pointed at the right endpoints. Sometimes it guessed.

This page is so it doesn't have to guess.

Why an AI app needs a real vehicle list

Ask a model for "all car models" and it will write you a list: confident, incomplete, US-flavoured and occasionally invented. That's fine for a demo and wrong for a product. A booking form, a marketplace or an agent that quotes insurance needs vehicles that exist in the user's country, spelled one way, with ids you can store.

VehiclesDB is that list, built from the official vehicle registers of these countries, for cars, motorcycles, mopeds, vans, trucks and buses. Every model has a canonical id like car/volkswagen/golf, its kind, a body type for cars, where it's registered and how popular it is there.

The prompt for your AI builder

Create a free key first (the button at the bottom of this page), then paste this into ChatGPT, Lovable, Cursor, Replit, Bolt or whatever you build with. Replace vdb_pk_YOUR_KEY with your public key.

Add a dependent car make and model picker to my form using VehiclesDB.

- Use my VehiclesDB public key: vdb_pk_YOUR_KEY (it starts with vdb_pk_ and is
  safe in browser code; it can only read makes and models).
- Easiest path: the official make-model-dropdown widget. Copy the exact script
  tag and VehiclesDropdown.attach(...) call from
  https://vehiclesdb.com/make-and-model-dropdown and attach it to my make and
  model <select> elements.
- If you call the API directly instead, the base URL is
  https://vehiclesdb.com/api/v1 and every request sends the header
  "Authorization: Bearer <key>":
    GET /makes?kind=car&order=popular             -> { makes: [{ name, slug }] }
    GET /makes/{make_slug}/models?kind=car&order=popular -> { models: [{ name, slug }] }
  Add &country=<two-letter code> to show only what that country registers.
- Store the slugs (e.g. make "volkswagen", model "golf"), show the names.
- Do not invent endpoints. The full reference is https://vehiclesdb.com/api.
- Show this credit near the picker, as the CC-BY 4.0 licence requires:
  <a href="https://vehiclesdb.com">Vehicle data by VehiclesDB</a>

It works because it's specific: the key type, the two calls, the response shape, the credit, and a link the AI can read if it needs more. The calls it uses cost 0 credits.

An MCP server for agents

If you're building an agent rather than a form, give it the catalog as a tool. The vehicles Ruby gem ships an MCP server, vehicles-mcp, that serves the whole dataset from disk: no network, no key, no cost.

gem install vehicles
{
  "mcpServers": {
    "vehicles": { "command": "vehicles-mcp" }
  }
}

It exposes four tools: search_makes, search_models, get_model and top_models. An agent that's asked "is the Dacia Sandero sold in Germany?" or "what are the most popular vans?" can check instead of guessing: Dacia Sandero, Ford Transit.

When your agent reads messy text

Agents read what people write: "my 2019 golf", "MERCEDES-BENZ | 300 TDT", a line from an insurance policy. The resolve endpoint in the car API maps a string like that to a canonical id with a confidence score and the reason it matched, so your agent can act on a real vehicle. Resolve calls use credits; the first ones come with the free account.

What it won't do

It's an identity dataset. It won't decode VINs, give you engine specs or prices, or tell a car's history. If your agent needs those, the vehicle data provider comparison lists who sells them.

Questions people ask

Why not let the AI write the car list itself?

Because it invents. A model trained on the web will happily list models that were never sold in your country, misspell makes, and stop at whatever it remembered. A list from official registers is complete, spelled one way, and has ids you can store.

How do I add a car make and model picker with ChatGPT, Lovable or Cursor?

Create a free key, copy the prompt on this page, replace the key placeholder and paste it into your AI builder. It tells the AI which endpoints to call, which key to use where, and to show the credit line the licence asks for.

Is there an MCP server for vehicle data?

Yes. The vehicles Ruby gem ships vehicles-mcp, an MCP server with four tools (search_makes, search_models, get_model, top_models) over the bundled dataset. It runs offline and needs no key: gem install vehicles, then add it to your agent's MCP config.

Can my agent decode VINs or look up specs with it?

No. VehiclesDB answers which makes and models exist, what kind of vehicle each is, how it is spelled canonically, where it is registered and how popular it is there. For VINs and specs, use a VIN decoder or a spec API.

Is it free for an AI app?

The make and model data is CC-BY 4.0, free for commercial use with a visible credit. Make and model API calls cost 0 credits on a free key, and the MCP server costs nothing at all.