PHPackages                             colethorsen/usps - 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. colethorsen/usps

ActiveLibrary[API Development](/categories/api)

colethorsen/usps
================

USPS API client with OpenAPI validation

v0.1.0(11mo ago)1119↓91.7%3MITPHPPHP &gt;=8.0

Since Jul 1Pushed 11mo agoCompare

[ Source](https://github.com/colethorsen/USPS-PHP-API)[ Packagist](https://packagist.org/packages/colethorsen/usps)[ RSS](/packages/colethorsen-usps/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (1)Dependencies (5)Versions (2)Used By (0)

USPS PHP API
============

[](#usps-php-api)

A comprehensive PHP library for integrating with the USPS Web APIs, providing easy access to shipping rates, address validation, location services, and more.

Features
--------

[](#features)

- ✅ **Address Validation** - Validate and standardize US addresses
- ✅ **Domestic Pricing** - Get shipping rates for domestic packages
- ✅ **International Pricing** - Calculate international shipping costs
- ✅ **Location Services** - Find USPS facilities and drop-off locations

Requirements
------------

[](#requirements)

- PHP 8.1 or higher
- USPS API credentials (Consumer Key and Consumer Secret)

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

[](#installation)

Install via Composer:

```
composer require colethorsen/usps-php-api
```

Getting Started
---------------

[](#getting-started)

### 1. Obtain USPS API Credentials

[](#1-obtain-usps-api-credentials)

1. Visit the [USPS Developer Portal](https://developers.usps.com/)
2. Register for an account
3. Create a new application to get your Consumer Key and Consumer Secret
4. Note: Some APIs require additional business account setup

### 2. Basic Setup

[](#2-basic-setup)

```
