npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@meterapp/vehicle-db

v2.1.0

Published

Offline NHTSA vehicle makes/models database — zero dependencies

Readme

@meterapp/vehicle-db

Offline NHTSA vehicle database. All U.S. vehicle makes and models from 1990–2026. Zero dependencies, ~189 KB on npm. No network requests needed.

Covers three vehicle types: Passenger Car, Truck, and Multipurpose Passenger Vehicle (MPV).

Install

npm install @meterapp/vehicle-db

Requires Node.js 18+. Zero runtime dependencies — data is bundled as JSON.

Usage

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

// List available vehicle types
const types = getVehicleTypes();
// => [
//   { vehicleTypeId: 2, vehicleTypeName: "Passenger Car" },
//   { vehicleTypeId: 3, vehicleTypeName: "Truck" },
//   { vehicleTypeId: 7, vehicleTypeName: "Multipurpose Passenger Vehicle (MPV)" },
// ]

// Get all makes
const allMakes = getMakes();

// Get makes that have models in 2024
const makes2024 = getMakes({ year: 2024 });

// Get only truck makes for 2024
const truckMakes = getMakes({ year: 2024, vehicleTypeId: 3 });

// Get all Toyota models for 2024
const toyotaModels = getModels({ makeId: 474, year: 2024 });
// => [
//   { modelId: 2469, modelName: "Camry", makeId: 474, makeName: "TOYOTA", vehicleTypeId: 2, vehicleTypeName: "Passenger Car" },
//   { modelId: 2208, modelName: "Corolla", ... },
//   ...
// ]

// Get only Ford trucks for 2024
const fordTrucks = getModels({ makeId: 460, year: 2024, vehicleTypeId: 3 });
// => [{ modelId: 1801, modelName: "F-150", ... }, ...]

// Get all available years
const years = getAvailableYears();
// => [1990, 1991, ..., 2026]

// Optional: close the DB connection when you're done
close();

API

getVehicleTypes(): VehicleType[]

Returns all vehicle types in the database.

interface VehicleType {
  vehicleTypeId: number;   // e.g. 2
  vehicleTypeName: string; // e.g. "Passenger Car"
}

getMakes(options?): Make[]

Returns makes, optionally filtered by year and/or vehicle type.

getMakes()                                    // all makes
getMakes({ year: 2024 })                      // makes with models in 2024
getMakes({ vehicleTypeId: 3 })                // truck makes (all years)
getMakes({ year: 2024, vehicleTypeId: 3 })    // truck makes in 2024
interface Make {
  makeId: number;   // e.g. 460
  makeName: string; // e.g. "FORD"
}

getModels(options?): Model[]

Returns models, optionally filtered by year, vehicle type, and/or make.

getModels({ makeId: 474, year: 2024 })                      // Toyota 2024 (all types)
getModels({ makeId: 460, year: 2024, vehicleTypeId: 3 })    // Ford trucks 2024
getModels({ vehicleTypeId: 3 })                              // all trucks (all years)
getModels({ year: 2024 })                                    // everything in 2024
interface Model {
  modelId: number;          // e.g. 1801
  modelName: string;        // e.g. "F-150"
  makeId: number;           // e.g. 460
  makeName: string;         // e.g. "FORD"
  vehicleTypeId: number;    // e.g. 3
  vehicleTypeName: string;  // e.g. "Truck"
}

getAvailableYears(): number[]

Returns all years present in the database, sorted ascending.

close(): void

Closes the SQLite connection. Safe to call multiple times. The connection reopens automatically on the next query.

Database stats

| | | |---|---| | Years | 1990 – 2026 | | Vehicle types | 3 (Passenger Car, Truck, MPV) | | Makes | 400 | | Model entries | 51,270 | | Data file | 1.2 MB (JSON) | | npm package | 189 KB | | npm package size | 1.5 MB |

Rebuilding the database

To refresh the data from the NHTSA API:

npm run build:db

Or for a specific year range:

npm run build:db -- --start-year 2020 --end-year 2026

The NHTSA API rate-limits aggressively. The build script retries failed requests, but some obscure makes may be skipped. Major manufacturers (Toyota, Honda, Ford, BMW, etc.) are always fetched successfully.

License

ISC