Look up a code
GET https://postalcodecheck.com/api/postal/{COUNTRY}/{CODE}
Example: /api/postal/US/90210
{
"success": true,
"country": "US",
"country_name": "United States",
"code": "90210",
"places": [
{"place": "Beverly Hills", "admin1": "California", "admin2": "Los Angeles", "lat": "34.0901", "lng": "-118.4065"}
],
"url": "https://postalcodecheck.com/postal-code/US/90210",
"source": "GeoNames (CC BY 4.0) via postalcodecheck.com"
}
List supported countries
GET https://postalcodecheck.com/api/countries
Returns every supported country with its ISO code, code count and format pattern.
Limits and terms
- 100 requests a day and 30 a minute, per IP. Responses are cacheable for 24 hours.
- None required for the free per-IP allowance. An IPNOVA API key (free account at api.ipnova.com) applies your plan allowance instead: send it as the X-Api-Key header or the ?key= query parameter. Keyed responses carry X-Credits-Remaining and X-Credits-Used.
- Free for personal and commercial use. Attribution appreciated: a link to postalcodecheck.com.
- Codes are matched after normalization (case and spaces ignored), so
sw1aandSW1Aare the same.
Need more volume? Contact [email protected].
Errors
Every non-200 response uses the same envelope: success: false, an error flag, a machine-readable reason, a human message, and a docs link back to this page.
| Status | Reason | Meaning |
|---|---|---|
400 | invalid_input | Bad country code or code format |
401 | invalid_key | The supplied API key is unknown or revoked |
404 | not_found | Code not in the dataset for that country |
404 | unknown_endpoint | Path under /api/ does not match a published endpoint |
429 | rate_limit | Too many requests in the last minute (Retry-After: 60) |
429 | daily_limit | Keyless per-IP daily cap reached |
429 | credits_exhausted | Keyed monthly allowance used up |
Example, a code not in the dataset:
{"success": false, "error": true, "reason": "not_found", "message": "Postal code not in the dataset for this country.", "docs": "https://postalcodecheck.com/postal-code-api"}