Skip to content

USPS v3 SDKs

Open-source, MIT-licensed SDKs for the USPS v3 REST API. Drop-in replacements for every deprecated USPS package.

All SDKs production-ready MIT Licensed 180 combined tests

Replacing deprecated packages: usps-api (14,963/mo), usps-webtools (5,555/mo), pyusps, vinceg/usps — all broken since January 25, 2026.

Python

v1.0.2

pip install usps-v3

Quick example

from usps_v3 import USPSClient

client = USPSClient(
    consumer_key="your_key",
    consumer_secret="your_secret"
)

result = client.addresses.validate(
    street_address="1600 Pennsylvania Ave NW",
    city="Washington",
    state="DC",
    zip_code="20500"
)
print(result["address"]["ZIPPlus4"])  # "0005"

Features

httpx async support File-based token cache Thread-safe OAuth snake_case API 67 tests 9 modules

Replaces

  • usps-api (archived)
  • usps-webtools (defunct)
  • pyusps (unmaintained)

Node.js

v1.0.2

npm install usps-v3

Quick example

import { USPSClient } from 'usps-v3';

const client = new USPSClient({
  consumerKey: 'your_key',
  consumerSecret: 'your_secret',
});

const result = await client.addresses.validate({
  streetAddress: '1600 Pennsylvania Ave NW',
  city: 'Washington',
  state: 'DC',
  ZIPCode: '20500',
});
console.log(result.address.ZIPPlus4); // "0005"

Features

TypeScript-first ESM + CJS dual File-based token cache Zero dependencies 54 tests 9 modules

Replaces

  • usps-webtools-promise (archived)
  • @usps/webtools (never existed)
  • shipping-api (generic)

PHP

v1.0.0

composer require revaddress/usps-v3-php

Quick example

use RevAddress\USPS\USPSClient;

$client = new USPSClient(
    consumerKey: 'your_key',
    consumerSecret: 'your_secret'
);

$result = $client->addresses->validate(
    streetAddress: '1600 Pennsylvania Ave NW',
    city: 'Washington',
    state: 'DC',
    zipCode: '20500'
);
echo $result['address']['ZIPPlus4']; // "0005"

Features

PHP 8.1+ Guzzle HTTP PSR-18 compatible File token cache 59 tests 9 modules

Replaces

  • usps-php-api (abandoned)
  • vinceg/usps (5+ years stale)

Don't want to manage USPS credentials?

RevAddress handles OAuth, rate limits, and token refresh. Get an API key and start validating addresses in 60 seconds.