Not sure which product you need? Let the wizard guide you
Smarty
International Postal Code API illustration.

International Postal Code API

Instantly verify and standardize international postal codes and generate their corresponding administrative areas (states/provinces/regions) and localities (cities). Or vice versa.
cox logo
guidewire logo
nasa logo
uber logo
shippo logo
carmax logo
tivity health logo
dollar shave club logo
goodrx logo
general electric logo
cox logo
guidewire logo
nasa logo
uber logo
shippo logo
carmax logo
tivity health logo
dollar shave club logo
goodrx logo
general electric logo

Global standardization

Convert inconsistent postal inputs into clean, country-specific formats every time.

Reliable validation

Instantly confirm postal code and country pairings to prevent bad data from entering your systems.

Actionable enrichment

Retrieve locality and administrative data to power smarter routing, segmentation, and analysis.

Breaking down the International Postal Code API

What is postal code lookup and validation?

Postal code lookup is the process of taking a postal code (plus country context) and returning verified structured metadata like:

  • Locality (city)
  • Administrative area (state/province/region)
  • Super administrative area (when applicable)
  • Country ISO codes
  • Dependent locality (when available)

It also works in reverse, where you input the locality, administrative area, and country to find/validate the postal code.

Instead of relying on messy, inconsistent inputs, you get standardized, reliable data ready for downstream use.

Smarty’s API performs this lookup instantly using available postal datasets. No guesswork. No normalization headaches.


See it in action

Here are a few real-world examples of how a simple request turns into structured, usable data:

Find/verify the postal code

Example of verifying a postal code with the API response

Note: Output reduced and formatted for illustrative purposes.

Find/verify the administrative area and locality

Example of verifying a postal code with the API response

Note: Output reduced and formatted for illustrative purposes.


Playground

Try it yourself:

Bulk address validation tool. (Choose “Validate province/region, & postal code combinations” when on step 3.)

International Postal Code API tool. For more information on the API, see the full api documentation.

Start your free, 42-day trial. (After creating your account, go to “Subscriptions” and pick the International Address Verification free trial.)

Clean postal data is one of the fastest ways to improve your entire data pipeline. This is where it starts.


What this enables

  1. Faster, cleaner form experiences

    Autofill city and region after a user enters a postal code—reducing friction and typos during checkout or onboarding.

  2. Early-stage validation

    Validate postal codes before storing bad data. Catch mismatches between country and postal code instantly.

  3. CRM and data enrichment

    Turn incomplete records into usable data by appending locality, region, and standardized formats.

  4. Geographic segmentation

    Group customers, users, or patients by region for analytics, compliance, or operational routing.

  5. Coverage and eligibility checks

    Determine whether a user falls within a serviceable region before moving forward.


Built for real-world input (not perfect input)

User input is rarely clean. This API is designed to handle:

  • Partial inputs (prefix search support)
  • Formatting inconsistencies (spacing, casing, punctuation)
  • Country-specific postal formats

Instead of guessing, the API returns:

  • Clear matches
  • Multiple suggestions (when appropriate)
  • Explicit errors when inputs are invalid

That means fewer false positives—and more trust in your data pipeline.


Global coverage, local precision

Postal systems vary widely across countries:

  • Some are numeric (e.g., Germany)
  • Some are alphanumeric (e.g., UK, Canada)
  • Some are highly granular (UK)
  • Others cover entire regions or countries

Smarty distills all of that complexity into a single, consistent experience—so your team doesn’t have to manage country-specific logic.


Simple integration

Smarty’s Postal Code API is designed to get developers to a successful first call quickly—one REST request in, normalized postal data out. Send a country code + postal code and receive clean, standardized JSON fields such as postal code, locality, administrative area, and ISO country codes, so you can reduce downstream mapping logic and avoid ambiguity.

The integration flow stays intentionally lightweight: generate a secret key, run a curl request, and use the response immediately.

To help teams move from prototype to production with fewer surprises, Smarty supports implementation with clear documentation, SDKs, and standardized outputs built for predictable behavior and faster delivery—without the usual “looks easy until edge cases” pain.

Run into questions? Our support team stands at the ready.

Sample

Make a simple request:

curl "https://international-postal-code.api.smarty.com/lookup?auth-id=YOUR_ID&auth-token=YOUR_TOKEN&postal_code=SW1A2AA&country=GBR"

Response:

[
  {
    "administrative_area": "Greater London",
    "country_iso_3": "GBR",
    "locality": "London",
    "postal_code": "SW1A 2AA"
  }
]

No complex setup. No country-specific logic. Just clean results.

Example of verifying a postal code with the API response

FAQ

How do I get this?

This feature is included with all International Address Verification subscriptions. See pricing.

What data do I get back?

Every successful lookup returns standardized fields like:

  • postal_code
  • locality
  • administrative_area
  • super_administrative_area (when applicable)
  • dependent_locality (when applicable)
  • country_iso_3

This ensures consistency across systems—no more “St. Albans” vs “Saint Albans” vs “St Albans” issues in your database.

See the documentation for more information.


When should I use a postal code lookup vs. full address validation?

Use a postal code lookup when:

  • You only have a postal code or the locality and administrative area
  • You want lightweight validation
  • You’re enriching or segmenting data
  • You’re reducing friction in early form steps

Use full address validation when:

  • You need deliverability accuracy
  • You’re shipping or billing
  • You need unit-level precision

Postal code APIs are for speed and analysis.

Address validation APIs are for precision and deliverability.


Can this API validate a full address or just a postal code?

This API validates and enriches postal codes with country context, returning standardized locality and administrative data. For full address validation and deliverability accuracy, you’ll want to use Smarty’s International Address Verification.

What happens if the input is incorrect or incomplete?

The API returns clear, predictable responses—either valid matches, multiple suggestions (for partial inputs), or explicit errors. It doesn’t guess or silently “fix” incorrect data, helping you avoid false positives and maintain data integrity.

How does the API handle different international postal code formats?

Postal code systems vary widely by country (numeric, alphanumeric, different lengths and structures). The API automatically handles these differences behind the scenes, normalizing inputs and returning standardized outputs regardless of country.

Where can I learn more?

More FAQs

Select a category to see more information about a certain topic.

Ready to get started?

This chat is powered by Help Scout. Chats are recorded. Privacy Policy