Skip to content
On this page


async function GetVehicleTypesForMakeId(
  makeId: string | number,
  doFetch?: boolean
): Promise<NhtsaResponse<GetVehicleTypesForMakeIdResults> | string>

💡 More In Depth

See: Package Reference


GetVehicleTypesForMakeId returns the Models in the vPIC dataset for a specified Make whose ID is equal to the makeID in the vPIC Dataset.

You can get makeIDs via MAKE_ID key in Results objects of the following endpoints:

  • GetAllMakes endpoint
  • GetMakeForManufacturer endpoint
  • GetModelsForMake endpoint
  • GetModelsForMakeYear endpoint

You can get makeIDs via MakeID key in Results objects of the following endpoints:

  • DecodeVinValues
  • DecodeVinValuesBatch

You can get makeIDs via ValueId key in Results objects of the following endpoints. One of the objects in the Results array will contain both Variable: "Make" and VariableId: 26. The ValueId key in that same object is the makeID for use in this endpoint.

  • DecodeVin
  • DecodeVinExtended


NameTypeDefault valueDescription
makeIdstring | numberundefinedMake ID to search
doFetch?booleantrueWhether to fetch the data or just return the URL (default: true)


Set doFetch to false if you want to fetch the data yourself.


Returns a Promise that resolves to a NhtsaResponse object containing an array of GetVehicleTypesForMakeIdResults objects in the Results key.

=> Promise<NhtsaResponse<GetVehicleTypesForMakeIdResults>>
type NhtsaResponse<GetVehicleTypesForMakeIdResults> = {
  Count: number
  Message: string
  Results: Array<GetVehicleTypesForMakeIdResults>
  SearchCriteria: string
🔍 Click to Show Full Example Response
// Using GetVehicleTypesForMakeId(449)
const exampleResponse = {
  Count: 5,
  Message: 'Response returned successfully',
  Results: [
      VehicleTypeId: 2,
      VehicleTypeName: 'Passenger Car',
      VehicleTypeId: 3,
      VehicleTypeName: 'Truck ',
      VehicleTypeId: 5,
      VehicleTypeName: 'Bus',
      VehicleTypeId: 7,
      VehicleTypeName: 'Multipurpose Passenger Vehicle (MPV)',
      VehicleTypeId: 10,
      VehicleTypeName: 'Incomplete Vehicle',
  SearchCriteria: 'Make ID: 449',

If doFetch is set to false

Returns a URL string that can be used to fetch the data, does not fetch the data internally.

=> Promise<string>

// ex: => ''

Type - GetVehicleTypesForMakeIdResults

type GetVehicleTypesForMakeIdResults = {
  VehicleTypeId: number
  VehicleTypeName: string

Ƭ GetVehicleTypesForMakeIdResults: Object

Objects returned in the Results array of GetVehicleTypesForMakeId endpoint response.


Example 1:

=> Promise<NhtsaResponse<GetVehicleTypesForMakeIdResults>>
  • Fetches data from VPIC API

Example 1: Get Vehicle Types for Make ID

import { GetVehicleTypesForMakeId } from '@shaggytools/nhtsa-api-wrapper'

const response = await GetVehicleTypesForMakeId(449)

Example 2:

=> Promise<string>

Example 2: Get Vehicle Types for Make ID and doFetch = false

import { GetVehicleTypesForMakeId } from '@shaggytools/nhtsa-api-wrapper'

const url = await GetVehicleTypesForMakeId(449, false)

// url: ''

Released under the MIT License.