Add a year, make and model dropdown to your form

Your quote form

Volkswagen Golf in grey

Volkswagen Golf

Stored

"car/volkswagen/golf"

make "Volkswagen" · model "Golf" · year null

No account needed

Paste this into your site

This block works as it is, with no key and no sign-up. It reads the open dataset from a CDN: one file of about 0.6 MB compressed, loaded once per page. The credit line under the selector stays on.

Choose your options and try it first

Paste where the vehicle fields go

<label for="vehicle-make">Make</label>
<select id="vehicle-make" name="make"></select>

<label for="vehicle-model">Model</label>
<select id="vehicle-model" name="model"></select>

<label for="vehicle-year">Year</label>
<select id="vehicle-year" name="year"></select>

<script src="https://cdn.jsdelivr.net/npm/make-model-dropdown@0.4.1"></script>
<script>
  VehiclesDropdown.attach({
    make: "#vehicle-make",
    model: "#vehicle-model",
    year: "#vehicle-year",
    kind: "car",
    order: "popular",
    includeOther: true,
    otherLabel: "Other / not listed",
    placeholderMake: "Make",
    placeholderModel: "Model",
    placeholderYear: "Year",
    source: "dataset"
  })
</script>

What a free account adds

  • Make logos in the list, next to each name.
  • The most registered makes at the top of the list.
  • A lighter page: the lists come from our API one make at a time, not from the whole dataset file.
  • Your selector's traffic, site by site, on your dashboard.
  • Paid plans remove the credit line.

The code

Paste one block for the year, make and model

Two or three select boxes, one script tag and one call. The make list fills first, each make's models load when it is picked (a dependent dropdown, with nothing to wire up), and a hidden field keeps the vehicle's id. The fields stay native, so they submit with your form like any other.

Replace vdb_pk_YOUR_PUBLIC_KEY with your public key. Public keys (vdb_pk_) are safe in a browser and can be locked to your domains.

  • Dropdown requests cost 0 credits.
  • No dependencies; about 8 KB gzipped for the make list.
  • Keyboard, touch and screen readers: a native select, or an ARIA combobox with search.

Paste where the vehicle fields go

<select id="make" name="make"></select>
<select id="model" name="model"></select>
<select id="year" name="year"></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: "#make",
    model: "#model",
    year: "#year",
    idInput: "#vehicle_id",
    search: true,
    logos: true
  })
</script>

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

Playground

Try every option, then copy the code

Each switch changes the live selector and the code under it. What you copy is what you just tried.

Vehicle kind

Only what that country's register has on record, in its own popularity order.

Model order
Options
Language

Placeholders, the Other row and the credit line.

Preselect

A slug, a name or an alias, as an edit form would.

Preview

{}

The code for this setup

What your form stores

Your form saves a clean id, not a typo

Names get misspelt, translated and renamed. The canonical id does not move, so your reports, prices and lookups keep pointing at the same vehicle.

  1. Picked in the dropdown

    Volkswagen›Golf

    The widget writes it to idInput

  2. Typed into Other

    "vw golf"

    POST /api/v1/resolve, from your server

  3. Saved by an older form

    "Rabbit"

    A stored name is matched, alias included

Volkswagen Golf in grey

Stored in your database

car/volkswagen/golf

kind/make/model: the same id the API, the vehicles gem and the open dataset use.

Renamed models keep resolving: car/volvo/xc40-recharge former_ids car/volvo/xc40

What the data does

Better than a list of makes you paste in yourself

The list behind the dropdown comes from official vehicle registers. It knows which cars are popular, which countries have them and which years they were on the road.

search: true finds a make by name or alias.

An Other option, so nobody gets stuck

includeOther: true keeps a way out for the rare and the brand new.

Make logos beside each name

logos: true puts each make's badge beside its name, with a letter fallback where there is none. Logos are their owners' trademarks, shown to identify the make.

  • Honda
  • Mercedes-Benz
  • Harley-Davidson
  • Yamaha
  • Suzuki
  • Ford
  • Kawasaki
  • Fiat
  • Triumph
  • BMW
  • Chevrolet
  • Ducati
  • Scania
  • Toyota
  • Volvo
  • Peugeot
  • Volkswagen
  • Nissan

Only the cars a country has

country: "de" drops what Germany's register has never seen. Car models on record:

  • Worldwide 6,043
  • Netherlands 4,981
  • United Kingdom 1,712
  • Spain 1,448
  • Australia 1,444
  • United States 1,211
  • Germany 1,112
  • Ireland 241

Year, make and model: add the year as a third dropdown

year: "#year" lists the years the registers have that model on record, newest first. No extra request.

2026 back to 1975

New models appear without touching your code

The hosted selector updates with each dataset release. Your page keeps the same script tag.

Every kind of vehicle

A make and model dropdown for every kind of vehicle

Cars, motorcycles, mopeds, vans, trucks and buses: the same widget for all six. Pass kind and the whole list narrows to it.

Something else?

Need the list, or a parts search?

Just the list of makes and models

If you would rather fill your own dropdown, download the open dataset as JSON or CSV, free to use with credit under CC BY 4.0, or browse every car make and model first.

The selector can also read that open file directly, with no key: source: "dataset". Make logos and the shortlist of top makes need a key.

Year, make and model search for online stores

A parts or accessories shop can use the selector as the vehicle step of its search: shoppers pick the year, make and model, and you get a stable id to match against your own catalog.

We do not publish which parts fit which car. Your fitment table stays yours. Make, model and year data for parts selectors.

Works with HTML, React, Vue, WordPress and more

If your page can hold a <select>, the selector works there. No code at all? The builder writes one block for your site. Running a garage or tyre shop? Read the guide for garage and tyre shop booking forms.

Pricing

What the dropdown costs

The selector is free with an account, and dropdown requests spend no credits. The one price of the free plan is a small credit line under the selector.

Free

$0

Show “Vehicle data by VehiclesDB”, linked, wherever our data appears.

  • The hosted selector on your own sites
  • Dropdown requests cost 0 credits
  • A public key you can lock to your domains

Without the credit line

from $9 a month

Paid plans remove the line, and add API credits for resolving, full records, images and plates.

Starter $9
No credit line on the picker on your website. Anywhere else, the free rule applies.
Business $49
No VehiclesDB credit or link anywhere for one business and its own products: picker, API responses and files. Redistribution and resale are by quote.

The waiver applies while you are subscribed. If you cancel, the credit line is required again.

The dataset files are open under CC BY 4.0. The hosted selector, the API, the images and the plates are VehiclesDB's service. How to credit

Year, make and model dropdown questions

Yes. The selector is free with an account, and dropdown requests cost 0 credits. On the free plan it shows a small "Vehicle data by VehiclesDB" credit line, because the make and model data is open under CC BY 4.0, which asks for credit. Paid plans remove the line.
Three linked select boxes that ask for a vehicle the way garages, parts shops and insurers do: the make (Ford), the model (Focus) and the year. Each one fills from the choice before it, so the model list only shows that make's models. This one asks for the make, then the model, then the year, because the years on offer depend on the model.
You need two select boxes and a list where each make has its models. With this widget you paste the two selects and one call: it fills the makes, loads the models of the make someone picks, and clears the model when the make changes. The code above has it for plain HTML, React, Vue and Rails.
Yes. Add a third select and pass it as year. Picking a model fills it with the years the official registers have that model on record, newest first. For a model with no years on record it offers the last 40 years, or nothing if you set yearFallback: "none".
Download the open VehiclesDB dataset as JSON or CSV from the car database page: every make and model, free to use with credit under CC BY 4.0. The selector can also read that file directly, with no key, using source: "dataset".
Yes. It works on native select elements, so anything that shows a form can host it: plain HTML, React, Vue, Svelte, Rails, and site builders such as WordPress or Webflow where you can paste an HTML block. The fields submit with your form like any other.
All six kinds: cars, motorcycles (motorbikes), mopeds, vans, trucks and buses. Pass kind: "motorcycle" for a motorbike selector with names like CBR600RR, or kind: "truck" for a commercial vehicle selector. Same widget, one option.
The hosted selector runs on a public key, the one that starts with vdb_pk_. It is made to sit in page source: it can only fill the selector, and in Settings you can lock it to your own domains so nobody else can use it. Without a key, source: "dataset" reads the open file instead.
From the official vehicle registers of 18 countries, reconciled into one catalog: a model ships only when at least two independent sources agree. The popularity order comes from those registers, and the list updates with each dataset release.
Turn on includeOther and the selector adds Other / not listed, so nobody gets stuck. From your server, send what they typed to POST /api/v1/resolve to turn it into a canonical id when it can be matched.

Selector

Your key and the embed code for your form, ready to paste.

16,437 models · 976 makes · official registers of 18 countries

Get your selector code Free with an account.

Already have an account? Sign in