PHPackages                             sashalenz/nhtsa-api - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. sashalenz/nhtsa-api

ActiveLibrary[API Development](/categories/api)

sashalenz/nhtsa-api
===================

Laravel integration package for the NHTSA vPIC API.

1.1.0(1mo ago)033MITPHPPHP ^8.4|^8.5

Since Oct 31Pushed 1mo agoCompare

[ Source](https://github.com/sashalenz/nhtsa-laravel-api)[ Packagist](https://packagist.org/packages/sashalenz/nhtsa-api)[ RSS](/packages/sashalenz-nhtsa-api/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (15)Versions (3)Used By (0)

NHTSA API for Laravel
=====================

[](#nhtsa-api-for-laravel)

Laravel package that integrates with the [NHTSA vPIC API](https://vpic.nhtsa.dot.gov/api/) providing DTO-based helpers for VIN and WMI decoding.

Installation
------------

[](#installation)

```
composer require sashalenz/nhtsa-api
```

If you are developing locally as part of this monorepo, ensure the path repository is registered in the root `composer.json` and run:

```
./vendor/bin/sail composer update sashalenz/nhtsa-api
```

Optionally publish the configuration:

```
php artisan vendor:publish --tag="nhtsa-api-config"
```

Usage
-----

[](#usage)

```
use Sashalenz\NhtsaApi\Data\Requests\DecodeVinRequestData;
use Sashalenz\NhtsaApi\Facades\NhtsaApi;

$response = NhtsaApi::decodeVin(DecodeVinRequestData::from([
    'vin' => '5UXWX7C5*BA',
    'modelYear' => 2011,
]));

$make = $response->variables()->first()?->value;
```

Available façade methods:

- `decodeVin` – повертає класичні змінні VIN (Make, Model, Body Class тощо) у вигляді колекції `VinDecodedVariableData` [в документації позначено як Decode VIN](https://vpic.nhtsa.dot.gov/api/).
- `decodeVinExtended` – доповнена версія з додатковими полями (зокрема дані NCSA), також повертає `VinDecodedVariableData`.
- `decodeVinValues` – повертає «плоский» результат у форматі ключ-значення (`VinDecodeFlatResponseData`), зручний для швидкого доступу до атрибутів.
- `decodeVinValuesExtended` – «плоский» розширений варіант з додатковими змінними, аналогічний `decodeVinValues`.
- `decodeWmi` – розшифровка WMI (World Manufacturer Identifier) та пов’язані метадані у вигляді `DecodeWmiResponseData`.

Each method accepts the relevant Data DTO request and returns a typed response DTO wrapping the API payload.

### Service layer with history logging

[](#service-layer-with-history-logging)

```
use Sashalenz\NhtsaApi\Data\Requests\DecodeVinRequestData;
use Sashalenz\NhtsaApi\Services\NhtsaApiService;

$service = app(NhtsaApiService::class);

$make = $service->determineMake(DecodeVinRequestData::from([
    'vin' => 'WP0AA2A7GL',
    'modelYear' => 2016,
]));

$requests = $service->getVinRequestCount('WP0AA2A7GL');
```

Кожен запит логуються у таблицю `nhtsa_api_requests` із полями VIN, Vehicle Descriptor, Make, Model, Model Year, JSON значеннями та morph-зв’язком із ініціатором.

Testing
-------

[](#testing)

```
./vendor/bin/sail test packages/nhtsa-laravel-api
```

When Docker is not available, run the tests within your Sail environment before committing changes.

###  Health Score

42

—

FairBetter than 90% of packages

Maintenance89

Actively maintained with recent releases

Popularity9

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~141 days

Total

2

Last Release

57d ago

PHP version history (2 changes)1.0.0PHP ^8.4

1.1.0PHP ^8.4|^8.5

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/13202688?v=4)[Oleksandr Petrovskyi](/maintainers/sashalenz)[@sashalenz](https://github.com/sashalenz)

---

Top Contributors

[![sashalenz](https://avatars.githubusercontent.com/u/13202688?v=4)](https://github.com/sashalenz "sashalenz (2 commits)")

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/sashalenz-nhtsa-api/health.svg)

```
[![Health](https://phpackages.com/badges/sashalenz-nhtsa-api/health.svg)](https://phpackages.com/packages/sashalenz-nhtsa-api)
```

###  Alternatives

[spatie/laravel-query-builder

Easily build Eloquent queries from API requests

4.4k26.9M220](/packages/spatie-laravel-query-builder)[spatie/laravel-route-discovery

Auto register routes using PHP attributes

23645.0k2](/packages/spatie-laravel-route-discovery)[simplestats-io/laravel-client

Client for SimpleStats!

4515.5k](/packages/simplestats-io-laravel-client)[esign/laravel-conversions-api

A laravel wrapper package around the Facebook Conversions API

69145.4k](/packages/esign-laravel-conversions-api)[ryangjchandler/bearer

Minimalistic token-based authentication for Laravel API endpoints.

8129.8k](/packages/ryangjchandler-bearer)[stechstudio/laravel-hubspot

A Laravel SDK for the HubSpot CRM Api

2971.0k](/packages/stechstudio-laravel-hubspot)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
