# International Address Formats – Postal Code Validator

> International Address Formats – Postal Code Validator is a paid API for AI agents from address-formats.x402tookit.com, paid per call via x402, $0.02/call, status unknown (last checked 2026-11-02).

Validates a postal code against a country's regex pattern and optionally checks it against a state/province subdivision prefix pattern.

## Facts

- Endpoint: GET https://address-formats.x402tookit.com/postal-code-check?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/international-address-formats-postal-code-validator-2ac97b9c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_PwFNxY0jROi8F4Tgbaxyr

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability international-address-formats-postal-code-validator-2ac97b9c
```

Example prompt: Can you check whether '10115' is a valid postal code for Germany (DE), and see if it matches the Berlin subdivision prefix?

## When to prefer this

Use this endpoint when you need to validate that a postal code conforms to a specific country's official format pattern, especially when you also want to cross-check against a state or province prefix. Prefer this over generic regex checks because it uses curated per-country and per-subdivision data, returns normalized forms, and provides human-readable reasons and examples. It is ideal for checkout flows, address form validation, shipping label generation, or any data pipeline that needs to ensure postal code integrity before further processing.

## Known failure modes

- Unsupported or unknown country code returns null pattern or degraded result
- Postal code does not match country pattern — returns formatValid: false with reasons
- Subdivision prefix data not available for some countries — notChecked field populated
- Invalid ISO country code format causes error or empty response
- Network timeout or payment failure before response is returned

## How this service works

Check a postal code against a country's pattern, and a state/province's prefix pattern where the data lists one.

## Output

Returns a verdict (valid/invalid), a boolean formatValid flag, the regex pattern used, a normalized version of the postal code, example valid codes for the country, reasons for any failure, and if a subdivision was provided, a subdivisionCheck object showing whether the postal code prefix matches the expected subdivision prefix pattern along with any other subdivisions whose prefix matches.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "country",
      "postal_code"
     ],
     "properties": {
      "country": {
       "type": "string",
       "description": "ISO 3166-1 alpha-2 code, e.g. US"
      },
      "postal_code": {
       "type": "string",
       "description": "The postal or ZIP code to check"
      },
      "subdivision": {
       "type": "string",
       "description": "Optional state/province code or name, e.g. CA"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "asOf": {
       "type": [
        "null",
        "string"
       ]
      },
      "source": {
       "type": [
        "null",
        "string"
       ]
      },
      "country": {
       "type": [
        "null",
        "string"
       ]
      },
      "pattern": {
       "type": [
        "null",
        "string"
       ]
      },
      "reasons": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "string"
       }
      },
      "summary": {
       "type": [
        "null",
        "string"
       ]
      },
      "verdict": {
       "type": [
        "null",
        "string"
       ]
      },
      "degraded": {
       "type": [
        "boolean",
        "null"
       ]
      },
      "examples": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "string"
       }
      },
      "dataSource": {
       "type": [
        "null",
        "string"
       ]
      },
      "disclaimer": {
       "type": [
        "null",
        "string"
       ]
      },
      "normalized": {
       "type": [
        "null",
        "string"
       ]
      },
      "notChecked": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "string"
       }
      },
      "attribution": {
       "type": [
        "null",
        "string"
       ]
      },
      "form
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/international-address-formats-postal-code-validator-2ac97b9c/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from address-formats.x402tookit.com](https://www.zero.xyz/host/address-formats.x402tookit.com/llms.txt)
