Skip to content

About

Offline international vehicle DB: 1,595 makes, 41,838 models and 194,288 model years across cars, motorcycles, trucks, buses, MPVs, auto rickshaws, and more.

Topics

Resources

Contributing

Stars

6 stars

Watchers

0 watching

Forks

Repository files navigation

@meterapp/vehicle-db

npm license playground

An offline, international vehicle make/model catalog for Node.js and TypeScript. The package combines U.S. model-year data, the UK registered fleet, the European Union's new car and van registration register, the daily-updated Dutch vehicle register, Asian-origin vehicles registered in New Zealand, Malaysian registration transactions, Brazil's national vehicle register, an Indian manufacturer catalog, the Brazil-exclusive Hyundai HB20 family, recent U.S. model configurations from FuelEconomy.gov, and reviewed manufacturer body derivatives and Saudi model-year evidence into one small, zero-dependency API. It never makes runtime network requests.

The current snapshot spans 1990–2027 and includes 1,608 makes and 42,294 models in 196,745 model years, from 23 data sources. Those are distinct vehicles by name, with case, accents and punctuation normalized while preserving the distinct 03+ badge, which is how the Car Image API counts and lists them. The package's own records number more (1,620 makes from getMakes()), because sources spell some makes and models more than one way (MOTO GUZZI and MOTO-GUZZI) and a few makes have no model in these years; see Snapshot stats.

The catalog covers seven vehicle types: Motorcycle, Passenger Car, Truck, Bus, Multipurpose Passenger Vehicle (MPV), Auto Rickshaw, and Other Vehicle. The European source adds continental models from Dacia, Cupra, DS, Lynk & Co, Alpine, and the Chinese brands entering Europe such as BYD, MG, Omoda, Xpeng, and Nio, as sold in the EU rather than the UK or U.S. The Dutch register keeps that coverage current: vehicles first registered this year appear within days, so 2026 models such as the BYD Atto 2 and Renault 5 E-Tech are already listed. The Asia-Pacific sources add Japanese domestic and kei models, Chinese EVs, Indian and Korean vehicles, Southeast Asian makes such as Perodua and Proton, and additional motorcycles and commercial vehicles. The Brazilian register adds the cars and motorcycles that fill Brazil's roads but are rarely sold elsewhere, such as the Fiat Argo, Mobi and Toro, the Volkswagen Gol and Saveiro, the Renault Kwid, and the Honda Biz and Pop.

Demo and playground

This catalog is the backbone of the Car Image API — an AI-native API that renders studio-quality, transparent-background images of every vehicle listed here (eight camera views, any paint color, PNG/WebP/JPG up to 1024 px, 1 credit per image with 100 free credits to start; see pricing). Explore the data in the interactive playground or browse every make and model at carimage.dev/cars.

Missing a vehicle? Add its source-backed identity here; downstream image support and asset sharing are validated separately — see CONTRIBUTING.md.

Install

npm install @meterapp/vehicle-db

Requires Node.js 18 or newer.

Usage

import {
  getDataSources,
  getVehicleTypes,
  getMakes,
  getModels,
  getAvailableYears,
} from "@meterapp/vehicle-db";

// Inspect provenance and coverage before querying.
const sources = getDataSources();

// All seven categories, including Motorcycle (1) and Bus (5).
const types = getVehicleTypes();

// All makes with a 2024 motorcycle in the international UK fleet source.
const motorcycleMakes = getMakes({
  year: 2024,
  vehicleTypeId: 1,
  sourceId: "uk-dft-vehicle-licensing",
});

// Honda motorcycle models manufactured in 2024.
const honda = motorcycleMakes.find((make) => make.makeName === "HONDA");
const hondaMotorcycles = getModels({
  makeId: honda!.makeId,
  year: 2024,
  vehicleTypeId: 1,
  sourceId: "uk-dft-vehicle-licensing",
});

// Coach and transit bus makes/models use vehicle type 5.
const busMakes = getMakes({ year: 2024, vehicleTypeId: 5 });
const alexanderDennis = busMakes.find((make) => make.makeName === "ALEXANDER DENNIS");
const buses = getModels({
  makeId: alexanderDennis!.makeId,
  year: 2024,
  vehicleTypeId: 5,
});

// Japanese domestic and kei models from the Asian-origin NZTA slice.
const nztaAsiaMakes = getMakes({
  year: 2022,
  sourceId: "nzta-asia-pacific-mvr",
});
const hondaAsia = nztaAsiaMakes.find((make) => make.makeName === "HONDA");
const hondaAsiaModels = getModels({
  makeId: hondaAsia!.makeId,
  year: 2022,
  sourceId: "nzta-asia-pacific-mvr",
}); // Includes N-BOX.

// Southeast Asian market models such as Perodua Myvi and Proton S70.
const malaysiaMakes = getMakes({
  year: 2026,
  sourceId: "malaysia-jpj-registrations",
});

// Models registered as new in the EU, Iceland, and Norway, e.g. BYD Seal U.
const euMakes = getMakes({ year: 2024, sourceId: "eea-co2-monitoring" });
const bydEu = euMakes.find((make) => make.makeName === "BYD");
const bydEuModels = getModels({
  makeId: bydEu!.makeId,
  year: 2024,
  sourceId: "eea-co2-monitoring",
});

// Current-year European registrations from the Dutch register, e.g. BYD Atto 2.
const bydNl = getMakes({ year: 2026, sourceId: "rdw-nl-vehicle-register" }).find(
  (make) => make.makeName === "BYD",
);
const bydNlModels = getModels({
  makeId: bydNl!.makeId,
  year: 2026,
  sourceId: "rdw-nl-vehicle-register",
});

// Models in Brazil's national vehicle register, e.g. Fiat Argo, Mobi, and Toro.
const fiatBr = getMakes({ year: 2024, sourceId: "senatran-br-renavam" }).find(
  (make) => make.makeName === "FIAT",
);
const fiatBrModels = getModels({
  makeId: fiatBr!.makeId,
  year: 2024,
  sourceId: "senatran-br-renavam",
});

// Existing queries remain valid.
const toyota = getMakes({ year: 2024 }).find((make) => make.makeName === "TOYOTA");
const toyotaModels = getModels({ makeId: toyota!.makeId, year: 2024 });
const years = getAvailableYears({
  makeId: toyota!.makeId,
  vehicleTypeId: 2,
  sourceId: "nhtsa-vpic",
});

Driver search and autocomplete

The optional, zero-dependency search entry point turns free-form driver input into canonical catalog candidates. Its index is built lazily on the first search, and matching runs entirely in memory without network requests.

import { searchVehicles } from "@meterapp/vehicle-db/search";

const suggestions = searchVehicles("2020 toy cam", {
  sourceId: "nhtsa-vpic",
  vehicleTypeId: 2,
  limit: 10,
});

const camry = suggestions.find(
  (result) => result.kind === "model" && result.modelName === "Camry",
);

if (camry?.kind === "model") {
  // A query containing a year has one directly selectable variant.
  const selection = camry.variants[0];
  // Persist year, makeId, modelId, and vehicleTypeId — not display text alone.
}

Search accepts year, make, and model tokens in any order. It recognizes common punctuation variants such as F-150/f150 and CR-V/crv, a small set of make aliases such as VW and Chevy, and conservative misspellings. Results are ranked deterministically by exact, prefix, token, substring, then fuzzy match. Fuzzy matching is only used when no lexical result exists.

Queries without a year group a canonical make/model/type across all available years rather than returning duplicate suggestions for every year. Each model result contains variants, which provides the preferred catalog modelId for every selectable year.

For the simplest driver experience:

  1. Infer the relevant market and pass its sourceId; year semantics differ by source.
  2. Offer one field labelled “Search year, make, or model” and begin suggesting after two characters.
  3. If the driver enters only a year, use getMakes({ year, ... }) for the next step; a year-only search intentionally returns no arbitrary alphabetical suggestions.
  4. On empty input, show application-owned recent vehicles. The catalog intentionally does not pretend that record frequency is vehicle popularity.
  5. Use the manual fallback Year → Make → Model. getAvailableYears(options) supports every step.

Applications with regional telemetry can request more candidates and rerank within the same matchKind. Text quality and market compatibility should remain ahead of behavioral popularity so an exact result never loses to an unrelated popular vehicle.

Conservative identity resolution

@meterapp/vehicle-db/resolve is an optional, offline entry point separate from autocomplete:

import { resolveVehicle } from "@meterapp/vehicle-db/resolve";

const result = resolveVehicle("2024 BMW 4 Series Gran Coupé", {
  market: "US",
  yearBasis: "model-year",
  depth: "visual",
});
if (result.status === "MATCHED") {
  // Identity is established; the application must still find an appropriate asset.
  console.log(result.selection.lineage, result.selection.visualIdentityIds);
}

Queries use an optional leading year, followed by make and full model phrase. Reviewed make aliases Hero MotoCorp and Maruti Suzuki require market: "IN"; category labels such as Honda Scooters are not discarded. With makeId, the make can be omitted. Only exact normalized phrases and reviewed aliases resolve; autocomplete/fuzzy candidates never silently become resolved identities. Unknown suffixes remain UNRESOLVED_TOKENS. Options also include year, vehicleTypeId, and sourceId.

depth defaults to catalog: a match at this depth establishes catalog presence only, with the source's documented year semantics. Request generation, derivative, or visual for stricter evidence. The curated identity graph is intentionally sparse: most catalog rows return GENERATION_UNRESOLVED at visual depth. MATCHED includes a selection; all results include candidates, unresolvedTokens, and the identity revision. Missing market/year context cannot satisfy restricted evidence, and overlapping generations remain ambiguous. No nearby year is substituted.

The graph uses make → line → generation → derivative → specification, with visual identities for bodies and appearance revisions. BMW Coupe, Convertible and Gran Coupe remain distinct; the 2014 generation and 2024/2025 appearance revisions do not share images implicitly. Aliases such as Prado and the reviewed Macan misspelling resolve only the line, not a generation or render.

@meterapp/vehicle-db/identity exports the graph types and evaluateVisualCompatibility. The latter evaluates direct, directional, scoped allow/deny rules: missing rules return unknown, an applicable deny wins, and approvals are never reversed or chained. It is a portable fact evaluator, not an asset database. Applications own reviewed asset bindings and final sharing policy. No asset-sharing approvals are bundled in this release.

Raw configuration and homologation evidence stays in build-time sidecars under data/evidence/, outside the npm bundle. See the implementation plan and source investigation.

API

getDataSources(): DataSource[]

Returns the provenance, license, region, retrieval date, year range, vehicle types, and record counts for every source.

interface DataSource {
  sourceId: string;
  sourceName: string;
  sourceUrl: string;
  license: string;
  licenseUrl?: string;
  region: string;
  description: string;
  retrievedAt: string;
  vehicleTypeIds: number[];
  yearFrom: number;
  yearTo: number;
  makeCount: number;
  modelCount: number;
}

getVehicleTypes(): VehicleType[]

Returns every vehicle category in the bundled catalog.

interface VehicleType {
  vehicleTypeId: number;
  vehicleTypeName: string;
}

getMakes(options?): Make[]

Returns makes, optionally filtered by year, vehicleTypeId, and/or sourceId.

getMakes();
getMakes({ year: 2024 });
getMakes({ year: 2024, vehicleTypeId: 5 });
getMakes({ sourceId: "uk-dft-vehicle-licensing" });
interface Make {
  makeId: number;
  makeName: string;
}

getModels(options?): Model[]

Returns models, optionally filtered by year, vehicleTypeId, makeId, modelId, and/or sourceId. sourceIds preserves provenance when equivalent records appear in more than one source.

getModels({ makeId: 474, year: 2024 });
getModels({ modelId: 2469, year: 2024 });
getModels({ year: 2024, vehicleTypeId: 1 });
getModels({ year: 2024, vehicleTypeId: 5, sourceId: "uk-dft-vehicle-licensing" });
interface Model {
  modelId: number;
  modelName: string;
  makeId: number;
  makeName: string;
  vehicleTypeId: number;
  vehicleTypeName: string;
  sourceIds: string[];
}

getAvailableYears(options?): number[]

Returns years present in the combined catalog, optionally filtered by makeId, modelId, vehicleTypeId, and/or sourceId. Results are sorted ascending.

getAvailableYears();
getAvailableYears({ makeId: 448, vehicleTypeId: 2, sourceId: "nhtsa-vpic" });
getAvailableYears({ modelId: 2469, sourceId: "nhtsa-vpic" });

searchVehicles(query, options?): VehicleSearchResult[]

Import from @meterapp/vehicle-db/search. Returns deterministic make and grouped model candidates for free-form input. Options include year, vehicleTypeId, sourceId, limit (default 10, maximum 100), and fuzzy (default true).

Model results contain years and a year-specific variants array. Make results intentionally omit models, allowing applications to transition into the existing getModels flow after the driver chooses a make.

Data sources

Source Coverage in this snapshot Terms
NHTSA vPIC U.S. passenger cars, trucks, and MPVs; model years 1990–2027 U.S. government public data
UK DfT/DVLA vehicle licensing statistics 701 normalized makes across cars, motorcycles, goods vehicles, buses and coaches, and other vehicles; manufacture years 1990–2025 Open Government Licence v3.0
Atul Auto product catalog Current Indian passenger and cargo auto-rickshaw range; catalog years 2024–2026 Source attribution; factual product names only
NZTA Motor Vehicle Register 30,431 Asian-origin car, truck, bus, motorcycle, and moped model-year records from 12 countries of origin; vehicle years 1990–2026 CC BY 4.0
Malaysia JPJ registration transactions 6,678 passenger car, MPV, jeep, pickup, and window-van model/registration-year records; 2015–2026 CC BY 4.0
EEA CO2 monitoring of new passenger cars and vans 29,939 passenger car (M1) and van (N1) model/registration-year records from 235 makes reported by EU member states, Iceland, and Norway; 2010–2025 CC BY 4.0
Netherlands RDW vehicle register 73,299 passenger car, commercial vehicle, bus, and motorcycle model/first-admission-year records from 627 makes licensed in the Netherlands; 1990–2026 Public domain (RDW Open Data)
Brazil SENATRAN national vehicle register (RENAVAM) 5,533 car, pickup, van, SUV, minibus, and motorcycle model/manufacture-year records from 45 makes, mapped from Brazil's registered fleet; 1990–2026 Public domain (dados.transportes.gov.br)
Hyundai Motor Brasil line-up The Brazil-exclusive HB20 family (HB20 hatchback, HB20S sedan, HB20X crossover), 40 model-year records; Brazilian model years 2013–2027 Source attribution; factual product names only
FuelEconomy.gov (U.S. DOE/EPA) U.S. models the fuel-economy catalog lists as distinct models but vPIC does not list under any model year: the 2026 Maserati GT2 Stradale and MCPURA Spyder, 2 model-year records U.S. government public data
Changan official sales/configuration catalog Active Chinese-market families, with Saudi and Mexican regional evidence retained; separate catalog-year and explicit model-year snapshots Source attribution; factual product names only
SGMW official sales catalogs On-sale Wuling and Baojun models in China, with Indonesian Wuling evidence retained; separate catalog-year and explicit model-year snapshots Source attribution; factual product names only
Bajaj global country catalogs Indian and accessible export-market passenger/cargo three-wheelers and four-wheel Qute; observed calendar-year catalog Source attribution; factual product names only
Reviewed dated manufacturer market catalogs Individually documented dated or explicitly retrieved catalog observations in Vietnam, India, China and the United States; includes regional MPVs, Indian cars, motorcycles, scooters, trucks and buses, and announced Torcal Source attribution; factual product names only

Year means the source’s model year for NHTSA, year of manufacture for DfT/DVLA (falling back to year of first use when manufacture year is unavailable), catalog year for Atul Auto, vehicle year for NZTA, registration year for Malaysia JPJ, the reporting (registration) year for the EEA register, the year of first admission (first registration anywhere, so imported used vehicles keep their original year) for the Dutch RDW register, the year of manufacture on the registration certificate (ano de fabricação) for the Brazilian SENATRAN register, the Brazilian model year (ano/modelo) for the Hyundai Motor Brasil line-up, and the U.S. model year for FuelEconomy.gov. From 2007 onward, NZTA vehicle year means the year of first registration in New Zealand or overseas. Registration sources are evidence that a make/model was present in that market and do not guarantee a factory model-year designation. Source filters let applications choose the semantics appropriate for their workflow.

UK source attribution: Contains public sector information licensed under the Open Government Licence v3.0. Source: Department for Transport and Driver and Vehicle Licensing Agency.

NZTA and Malaysia source attribution: Licensed under Creative Commons Attribution 4.0 International. Sources: New Zealand Transport Agency Waka Kotahi and Malaysia Road Transport Department/data.gov.my.

EEA source attribution: Licensed under Creative Commons Attribution 4.0 International. Source: European Environment Agency, Monitoring of CO2 emissions from passenger cars and Monitoring of CO2 emissions from vans, Regulation (EU) 2019/631. Member states report the make and commercial name inconsistently (multi-brand strings, legal entities, and trim-level names), so the importer merges brand spellings, drops engine and gearbox suffixes, keeps a make/model/year only when at least two countries report it or one country reports it more than 1,000 times, and uses the most reported spelling of each model name. The latest year is provisional data. EU vehicle categories map to the catalog as M1/M1G → Passenger Car and N1/N1G/N2 → Truck.

Hyundai Motor Brasil attribution: HB20, HB20S and HB20X are factual product names from Hyundai Motor Brasil's published line-up; launch (September 2012, January and April 2013) and discontinuation (HB20X, January 2022) dates come from Hyundai's announcements.

FuelEconomy.gov attribution: GT2 Stradale and MCPURA Spyder are factual 2026 model names from the U.S. Department of Energy and EPA fuel-economy catalog (vehicle records 50273 and 50274), which lists them as distinct models while vPIC files neither name for any model year. The 2026 MCPura itself comes from vPIC. Contributed in #20.

SENATRAN source attribution: Registro Nacional de Veículos Automotores (RENAVAM), Secretaria Nacional de Trânsito (SENATRAN), Ministério dos Transportes, published as public domain open data. The monthly fleet file counts the vehicles registered in each municipality by make/model and year of manufacture. RENAVAM records make and model as one abbreviated, often trim-level string (CHEV/ONIX 10MT LT2, I/TOYOTA HILUX CDSRXA4FD) and no vehicle type, so the importer adds the counts up nationally and maps the strings to model families and vehicle types with the reviewed table in scripts/senatran-br-models.ts, which covers about 91% of the vehicles manufactured since 1990. Unmapped strings are dropped rather than guessed, including heavy trucks, bus bodies, and trailers; the importer logs the largest unmapped families so the table can grow. A make/model/year needs at least ten registered vehicles.

RDW source attribution: Open Data RDW (Dienst Wegverkeer), public domain. The register only contains vehicles currently licensed in the Netherlands, is republished daily, and is the freshest European source in the catalog. The same brand and model-name normalization as the EEA source is applied, plus a minimum of three vehicles per make/model/year to drop typos; RDW vehicle kinds map as Personenauto → Passenger Car, Bedrijfsauto → Truck, Bus → Bus, and Motorfiets → Motorcycle.

New sources in 2.13.0:

  • FuelEconomy.gov bulk feed: 2022–2027 model-year configurations; U.S. government public data. The legacy Maserati source remains independently addressable. Configuration suffixes are preserved, with a reviewed separator-only normalization for Mercedes-Benz AMG G63.
  • Reviewed manufacturer evidence: eight model-year records for Saudi Kia Pegas and U.S. BMW body derivatives / Lamborghini STO. Factual names only, with per-record URLs and market/year rationale in data/evidence/manufacturer-reviewed.json. GSO/SASO bulk data is not bundled; access/permission dependencies are documented in the source investigation.

Dated manufacturer catalogs

The reviewed manufacturer sources now include focused US, Indian and Vietnamese additions. manufacturer-reviewed carries explicit model-year evidence; manufacturer-reviewed-catalog uses catalog years: a model was marketed during a specific year documented by a dated sales offer, sales bulletin or manufacturer catalog. These calendar years are not model years or years of manufacture. getDataSources().yearBasis identifies these reviewed sources; the per-row market and rationale remain in data/evidence/manufacturer-reviewed.json.

For scoped resolution of a dated catalog record, pass yearBasis: "catalog-year" and its evidenced market. Catalog presence does not establish a generation, facelift, derivative or render; requesting visual depth remains unresolved without reviewed appearance evidence. Lynk & Co 03 and 03+ stay distinct, as do Defender OCTA, Range Rover Sport SV and Cayenne Electric from their base models. The regional additions cover only individually evidenced years; 07, generic Song and unverified editions remain pending in the source plan.

New coverage in 2.16.0 adds 22 year/model/type records: seven consistently labeled Saudi Changan model-year entries, four Mexican Changan catalog facts (one overlaps the Saudi CS75 Plus), six Indonesian Wuling models, and six Indian Bajaj passenger/cargo three-wheelers. Per-record official evidence and year semantics are in data/evidence/manufacturer-reviewed.json; the regional audit is in regional-coverage-status.md. WULING is now a make alongside the official Malaysian TQ WULING; search accepts wuling bingo for the latter without changing its published IDs or equating Bingo with BinguoEV.

Broad catalogs in 2.17.0 replace individual Changan/Wuling/Bajaj regional edits with npm run refresh:manufacturer-catalogs. Five source snapshots separate official active sales catalogs from explicitly labeled model years: Changan (including separate CHANGAN NEVO), SGMW (separate WULING and BAOJUN), and Bajaj country catalogs. They add 73 selections while retaining all published IDs and legacy source filters. Manufacturer evidence, reviewed translation/body mappings, and manual discovery indexes are retained outside the runtime bundle; see broad-manufacturer-catalogs.md.

Indian catalogs in 2.19.0 add five sales-catalog snapshots refreshed with npm run refresh:india. Exact reviewed links/headings/selectors preserve model suffixes and published make IDs; their 2026 years mean observed calendar-year catalog presence. Broad dated portfolios refresh with npm run refresh:india-history into those same sources: Mahindra, Honda, Yamaha, MG and Ola establish individually evidenced 2020–2025 calendar years. Four Tata 2025 portfolio facts, three Ather 2024 sales facts and two individual Ciaz 2023–2024 sales facts use the existing reviewed catalog source. Historical manuals, fiscal-year periods and successor names do not create guessed year ranges or image-sharing permissions. Source mappings, original names, URLs and retrieval hashes stay outside the runtime bundle; see the historical source review.

Factory colors

Factory paint availability is not included. The NZTA and Malaysia records contain the observed basic color of each registered vehicle, not the manufacturer’s stock colors for a make/model/year. Treating those fields as factory availability would produce false positives from repaints, imports, and broad color categories, so the importers intentionally omit them. A future color API should require manufacturer-backed paint options with explicit market and model-year provenance.

New coverage in 2.18.0 adds 112 sourced year/model/type records and four makes (Ather, Eicher, Ashok Leyland and Ola Electric), with explicit catalog-year versus model-year evidence. Lexus LX 600 F Sport and China LX 570 Peak Edition gain separate specification and exterior identities; G60 queries link the existing BMW sedan ID. Generic families, missing years and markets, and unverified suffixes remain unresolved at visual depth. See coverage acceptance criteria.

| TVS Indian sales catalog | 27 reviewed product/family selections observed in 2026; motorcycles, scooters and passenger/cargo three-wheelers | Source attribution; factual product names only | | Hero Indian motorcycle catalog | 18 reviewed motorcycle selections observed in 2026 under the preserved HERO MOTOCORP LTD make ID | Source attribution; factual product names only | | Indian commercial manufacturer catalogs | 32 dated Tata, Ashok Leyland and Eicher product/family selections; goods vehicles remain distinct from buses | Source attribution; factual product names only | | Indian passenger-car sales catalogs | 55 reviewed current/historical product/family selections across Indian-market manufacturers; individually evidenced calendar years | Source attribution; factual product names only | | Other Indian two-wheeler sales catalogs | 72 current/historical Bajaj, Honda, KTM, Suzuki, Royal Enfield, Yamaha, Harley-Davidson and Ola selections | Source attribution; factual product names only |

Snapshot stats

Years 1990–2027
Sources 23
Vehicle types 7
Makes 1,608
Models 42,294
Model years 196,745
Make records (getMakes()) 1,620
Model records (distinct modelId) 46,796
Model-year records (getModels()) 218,242
Bundled TypeScript data 7.58 MB

Refreshing and rebuilding

The committed source snapshots make the package build deterministic and offline:

npm run build:data
npm test
npm run typecheck
npm run build

Refresh either network source independently, then rebuild the combined catalog:

npm run refresh:uk-dft
npm run refresh:nhtsa -- --start-year 2025 --end-year 2027 --merge --cache-dir .cache/nhtsa
npm run refresh:nzta-asia-pacific -- --start-year 1990 --end-year 2027
npm run refresh:malaysia-jpj -- --start-year 2015 --end-year 2026
npm run refresh:eea-co2 -- --start-year 2010 --end-year 2026
npm run refresh:rdw-nl -- --start-year 1990 --end-year 2026
npm run refresh:senatran-br
npm run refresh:fueleconomy-us -- --start-year 2022 --end-year 2027
npm run refresh:reviewed
npm run refresh:manufacturer-catalogs
npm run build:data

A refresh only adds. Registers drop scrapped vehicles, count thresholds move between releases, and manufacturers re-file model years in vPIC (the 2026 Maserati MC20 became the MCPura in September 2026), but an application may already store a year/make/model this package published. Every importer therefore keeps the entries its previous snapshot published and the source no longer reports, and logs how many it kept; pass --prune to drop them deliberately, for example to remove a source error. Model-year sources run a year ahead of the calendar, so the NHTSA and NZTA importers default to ending next year; registration sources end with the current year.

The NHTSA API rate-limits aggressively: past a few requests a second its CDN answers HTTP 403 to every request from the address for an hour or more. The importer spaces requests (--concurrency 2, --interval-ms 500 by default), stops at the first sustained 403 instead of retrying into the block, and with --cache-dir keeps every answer it already received, so rerunning the same command later resumes where it stopped. A full NHTSA refresh can take hours; to refresh recent model years, fetch only those years and merge them into the existing snapshot with --merge, as above. The UK importer downloads the two official VEH0124 CSV files. The NZTA importer discovers the current official ArcGIS service and requests distinct records for supported vehicle types and Asian countries of origin. The Malaysia importer downloads annual JPJ CSVs and aggregates individual transactions into unique model/registration-year records. The EEA importer discovers the current final and provisional register tables from the EEA DiscoData catalogue and asks its public SQL endpoint for make/commercial-name counts grouped by reporting country and year, so it never downloads the individual registration records; --min-countries and --min-count tune the noise filter. The RDW importer asks the Socrata API for make/commercial-name counts per year of first admission, one request per year, so a refresh takes about ten minutes and can be run any day to pick up the latest registrations. The SENATRAN importer finds the newest monthly fleet archive (about 140 MB) on the Ministry of Transport's open data portal, resumes the download whenever the server drops the connection, and reads the archive without extracting it; --input rebuilds from an archive or extracted file already on disk. Importers assign deterministic numeric IDs, write normalized snapshots, and discard temporary raw downloads.

Evidence and regression checks

npm run refresh:rdw-nl -- --start-year 2026 --end-year 2026 --evidence-out .cache/rdw-evidence.json
npm run refresh:eea-co2 -- --start-year 2024 --end-year 2024 --evidence-out .cache/eea-evidence.json
npx tsx scripts/reconcile-source.ts
npm run check:compatibility -- <prior-release-git-ref>
npm run replay
npm run replay -- /private/replay.json /private/report.json

Replay cases contain query (or make, model, year), cohort (customer, synthetic, haraj-sweep), optional n, resolver options, expectedStatus, and forbiddenModelNames. Reports record catalog, fixture and resolver hashes, commit/version, and separate cohort totals. Unreviewed matches measure resolution coverage only; they do not establish render correctness. Synthetic cohorts have zero demand weight. Never commit customer exports.

License

The package code is ISC licensed. Upstream data remains subject to the terms listed above.

About

Offline international vehicle DB: 1,595 makes, 41,838 models and 194,288 model years across cars, motorcycles, trucks, buses, MPVs, auto rickshaws, and more.

Topics

Resources

Contributing

Stars

6 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages