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 sw1a and SW1A are 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.

StatusReasonMeaning
400invalid_inputBad country code or code format
401invalid_keyThe supplied API key is unknown or revoked
404not_foundCode not in the dataset for that country
404unknown_endpointPath under /api/ does not match a published endpoint
429rate_limitToo many requests in the last minute (Retry-After: 60)
429daily_limitKeyless per-IP daily cap reached
429credits_exhaustedKeyed 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"}