Skip to content

USPS v3 SDKs

Ship USPS v3 from Python, Node.js, or PHP without rebuilding OAuth, token refresh, or brittle Web Tools adapters. MIT-licensed SDKs that replace the dead Web Tools wrappers developers are still stuck with.

Production-tested SDKsMIT Licensed180 combined tests
PyPI downloadsnpm downloadsGitHub stars

20,553/mo

developers still pulling broken packages

Four USPS packages on PyPI, npm, and Packagist are still getting 20,500+ monthly installs — and every one of them has been hitting a 410 Gone since USPS Web Tools shut down on January 25, 2026.

If your requirements.txt or package.json still references one of these, your integration is already broken. The three SDKs below are drop-in replacements with the same shape and new USPS v3 plumbing.

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 supportFile-based token cacheThread-safe OAuthsnake_case API67 tests9 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-firstESM + CJS dualFile-based token cacheZero dependencies54 tests9 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 HTTPPSR-18 compatibleFile token cache59 tests9 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.