PHPackages                             nickcheek/uspslookup - 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. [Mail &amp; Notifications](/categories/mail)
4. /
5. nickcheek/uspslookup

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

nickcheek/uspslookup
====================

Php Wrapper for USPS API

v3.0.2(6y ago)21351MITPHPPHP ^7.4CI failing

Since Feb 5Pushed 6y ago2 watchersCompare

[ Source](https://github.com/nickcheek/USPSLookup)[ Packagist](https://packagist.org/packages/nickcheek/uspslookup)[ Docs](https://nicholascheek.com)[ RSS](/packages/nickcheek-uspslookup/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (1)Versions (10)Used By (0)

USPS API Wrapper
================

[](#usps-api-wrapper)

[![Latest Version on Packagist](https://camo.githubusercontent.com/0e951bd266f66dc67e1b4b6af8dd8e8a00c3306cd5f738101d53d666bc3ac8bb/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6e69636b636865656b2f757370736c6f6f6b75702e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/nickcheek/uspslookup)[![Total Downloads](https://camo.githubusercontent.com/875c846192c8a9ba3a863aa99afa448ab57b19ccad51bc8b2541444e0a984f40/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6e69636b636865656b2f757370736c6f6f6b75702e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/nickcheek/uspslookup)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/4708bfee94a3e555e7357bc84adb8abe562976f1a5c3059303b643757aee499b/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6e69636b636865656b2f555350534c6f6f6b75702f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/nickcheek/USPSLookup/?branch=master)[![Build Status](https://camo.githubusercontent.com/32325066438905b721dff267eb316d2c82d0afc3f910a408ea75091fbe5a241e/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6e69636b636865656b2f555350534c6f6f6b75702f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/nickcheek/USPSLookup/build-status/master)

USPS Verify Address

About
-----

[](#about)

This was quickly thrown together for a project. Feel free to add to it as you see fit. I recently refactored each Service so I can add on as time goes.

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

[](#installation)

You can install the package via composer:

```
composer require nickcheek/uspslookup
```

Then add the reference to the top of your controller

```
use \Nickcheek\USPSLookup\USPSLookup;
```

Usage
-----

[](#usage)

Set the USPS Username while creating the object:

```
$lookup = new USPSLookup('XXXXXXXXX');
$response = $lookup->Address()->verify('123 Anystreet','','Little Rock','AR','72204');

var_dump($response);
```

The above returns the following (I replaced the values with \*\*\*):

```
"Address2": "3017 P****E"
    +"City": "*****"
    +"State": "AR"
    +"Zip5": "7***9"
    +"Zip4": "2140"
    +"DeliveryPoint": "17"
    +"CarrierRoute": "****"
    +"DPVConfirmation": "Y"
    +"DPVCMRA": "N"
    +"DPVFootnotes": "AABB"
    +"Business": "N"
    +"CentralDeliveryPoint": "N"
    +"Vacant": "N"
```

### Available Methods

[](#available-methods)

Verify Address exists

```
$lookup = new \Nickcheek\USPSLookup\USPSLookup('XXXXXXXXX');
$find = $lookup->verify($address,$address2,$city,$state,$zip);
```

Tracking a Package

```
$lookup = new \Nickcheek\USPSLookup\USPSLookup('XXXXXXXXX');
$find = $lookup->Tracking()->track('9405511206019825745000');
```

Tracking Multiple Packages

```
$lookup = new \Nickcheek\USPSLookup\USPSLookup('XXXXXXXXX');
$track = array("9405511206019825745000","9405511206019825304382");
$find = $lookup->Tracking()->trackMultiple($track);
```

Find City/State that zip code belongs to

```
$lookup = new \Nickcheek\USPSLookup\USPSLookup('XXXXXXXXX');
$find = $lookup->Address()->cityState('72019');
```

Find City/State of multiple zip codes

```
$zips = array('72204','72203');
$lookup = new \Nickcheek\USPSLookup\USPSLookup('XXXXXXXXX');
$find = $lookup->Address()->cityState($zips);
```

Find Zip Code of address

```
$lookup = new \Nickcheek\USPSLookup\USPSLookup('XXXXXXXXX');
$find = $lookup->Address()->zipCode('1234 Anystreet','','Little Rock','AR');

```

Get Rate of Package ($to,$from,$pounds,$ounces,$service) Available services: First Class,First Class Commercial,First Class HFP Commercial,Priority,Priority Commercial,Priority Cpp,Priority HFP Commercial,Retail Ground,etc...

```
$lookup = new \Nickcheek\USPSLookup\USPSLookup('XXXXXXXXX');
$find = $lookup->Price()->getRate('72204','37501','1','3','Priority');
```

### Changelog

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

### Security

[](#security)

If you discover any security related issues, please email .

Credits
-------

[](#credits)

- [Nicholas Cheek](https://github.com/nickcheek)
- [All Contributors](../../contributors)

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity66

Established project with proven stability

 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 ~52 days

Recently: every ~43 days

Total

9

Last Release

2276d ago

Major Versions

1.0.4 → v2.02019-10-01

v2.1.2 → v3.0.02019-12-05

PHP version history (2 changes)v3.0.0PHP 7.4

v3.0.2PHP ^7.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/4f33b515b89e91b73f02d7f38c436c85be7f9035c99f0cfa1ba78a1806045def?d=identicon)[nickcheek](/maintainers/nickcheek)

---

Top Contributors

[![nickcheek](https://avatars.githubusercontent.com/u/7572691?v=4)](https://github.com/nickcheek "nickcheek (66 commits)")

---

Tags

address-verificationaddress-verifyuspsapiaddressmailusps

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/nickcheek-uspslookup/health.svg)

```
[![Health](https://phpackages.com/badges/nickcheek-uspslookup/health.svg)](https://phpackages.com/packages/nickcheek-uspslookup)
```

###  Alternatives

[scullwm/mailhookbundle

A bundle to catch API webhook from differents mail service

3820.5k](/packages/scullwm-mailhookbundle)[yarcode/yii2-mailgun-mailer

Mailgun mailer implementation for Yii2

1576.5k](/packages/yarcode-yii2-mailgun-mailer)[tomatophp/filament-accounts

Manage your multi accounts inside your app using 1 table with multi auth and a lot of integrations

748.4k7](/packages/tomatophp-filament-accounts)

PHPackages © 2026

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