# Postal Code Validator

> Postal Code Validator is a paid API for AI agents from postal.openverbs.com, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-14).

Validates whether a postal/ZIP code is well-formed for a given country using ISO 3166-1 alpha-2 country codes

## Facts

- Endpoint: POST https://postal.openverbs.com/v1/validate
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/postal-code-validator-18543f63
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_4nP5byiGgOvKgP19atjfG

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 postal-code-validator-18543f63 -d '<json body>'
```

Example prompt: Can you check whether '10001' is a valid postal code for the US?

## When to prefer this

Use this endpoint when you need a quick, lightweight format check on a postal or ZIP code before processing an address — ideal for e-commerce checkout flows, form validation, or data quality pipelines. Prefer this over full address validation services when you only need to confirm the code's structure, not its real-world existence or deliverability. Especially useful when you have the country code handy and want a binary valid/invalid result cheaply at $0.002 per call.

## Known failure modes

- 400 error if the country code is unsupported or not recognized
- 400 error if the postal code field is empty
- Returns valid:false (not an error) for malformed but syntactically processable codes
- May not reflect recent postal code changes if the underlying pattern database is outdated

## How this service works

Check whether a postal / ZIP code is well-formed for a country (ISO 3166-1 alpha-2). A malformed code is a successful result with `valid:false`, not an error — only an unsupported country or empty code is a 400.

## Output

Returns a JSON object indicating whether the provided postal/ZIP code is valid for the given country. A malformed code returns a successful response with valid:false rather than an error. Only unsupported country codes or empty inputs trigger a 400 error.

## 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",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object",
     "required": [
      "country",
      "code"
     ],
     "properties": {
      "code": {
       "type": "string",
       "description": "Postal / ZIP code to validate."
      },
      "country": {
       "type": "string",
       "minLength": 2,
       "description": "ISO 3166-1 alpha-2 country code, e.g. \"US\" (\"UK\" accepted as an alias for GB)."
      }
     },
     "additionalProperties": false
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/postal-code-validator-18543f63/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from postal.openverbs.com](https://www.zero.xyz/host/postal.openverbs.com/llms.txt)
