API Documentation
ZIP Code Information.
Basic facts about a ZIP Code: the preferred city and state, plus the latitude and longitude of its geographic center. The classic use is auto-filling city and state the moment someone types a ZIP into your form.
- Endpoint
- https://rapid.peachtreedata.com/api/v1/zipcodeinformation
- Methods
- GET — one ZIP Code per request
- Formats
- JSON by default; append .xml for XML
Authentication
Every request carries your API key in the query string. The API is HTTPS-only, so the key is encrypted in transit. Query parameters can appear in any order, and responses are JSON by default — append .xml to the endpoint for XML.
https://rapid.peachtreedata.com/api/v1/zipcodeinformation?apikey={apikey}&…Don't have a key? Sign up under plans & pricing below — keys work immediately.
Request
| Parameter | Required | Description |
|---|---|---|
| apikey | Yes | Your unique API key. |
| zipcode | Yes | The ZIP Code to look up. Example: 30097. |
Examples
curl "https://rapid.peachtreedata.com/api/v1/zipcodeinformation?apikey={apikey}&zipcode=30097"{
"status": "Found",
"zipCode": "30097",
"city": "Duluth",
"city13": "Duluth",
"state": "GA",
"latitude": "34.020208",
"longitude": "-84.144343"
}Response reference
| Field | Type | Description |
|---|---|---|
| status | String(8) | Result of the lookup: Found or NotFound. |
| zipCode | String(5) | The five-digit ZIP Code. |
| city | String(28) | Preferred city for the ZIP Code. |
| city13 | String(13) | Thirteen-character short name for the city. |
| state | String(2) | Two-letter abbreviation for the state or US territory. |
| latitude | String(9) | Latitude for the geographic center of the ZIP Code — 34.020208. |
| longitude | String(10) | Longitude for the geographic center of the ZIP Code — -84.144343. |
HTTP response codes
| Code | Description |
|---|---|
| 200 | Processed successfully. |
| 400 | Bad request — the API key format is invalid, the key is missing, or the input wasn't properly passed. |
| 401 | Unauthorized — the API key is inactive or invalid. |
| 403 | Forbidden — the request exceeds the max items allowed per call, or the account isn't set up for this service. |
| 408 | Request timeout — processing exceeded the max processing time. |
| 500 | Internal server error during processing. |
Plans & pricing
ZIP Code Information is included in the Address Validation subscription — one plan covers this service, US Address Cleanse, and Canadian Address Cleanse, all sharing the same API key and monthly pool of lookups.
Above 250,000 lookups a month, or if you'd rather be invoiced, talk to us — we'll set up a plan that fits.
Auto-filling city and state from ZIP Codes?
Tell us what you're building and we'll get you moving — usually the same day.