# International Address Formats – Postal Code Country Classifier

> International Address Formats – Postal Code Country Classifier 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).

Guesses which country or countries a postal code belongs to based on its format/shape, flagging ambiguity when multiple countries match.

## Facts

- Endpoint: GET https://address-formats.x402tookit.com/address-parse-hints?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-country-classifier-4b66282d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_xv79SXAEZhR5Kt-RP17-f

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-country-classifier-4b66282d
```

Example prompt: Can you figure out which country the postal code '1010' belongs to? Check it against Austria, Belgium, and Switzerland and tell me if it's ambiguous.

## When to prefer this

Use this endpoint when you have a postal code string but no associated country, and need to infer or validate which country (or countries) it could belong to — particularly useful for e-commerce checkout validation, data cleaning, address parsing pipelines, and fraud detection. Prefer this over a full address validation service when country is unknown. Use the candidates parameter to narrow the search when you have a short list of likely countries, improving precision and reducing ambiguity.

## Known failure modes

- Missing postal_code parameter returns an error
- Postal code that matches no country pattern returns empty matches with ambiguous:false and matchCount:0
- Degraded flag set true when some countries lack pattern data (testedWithoutPattern > 0)
- Ambiguous flag set true when multiple countries match, requiring human review
- Very short or numeric-only codes may match many countries simultaneously
- Invalid ISO country codes in candidates list may be silently skipped or cause errors

## How this service works

Guess which country a postal code belongs to from its shape among candidates, flagging ambiguity honestly.

## Output

Returns a structured response including the postal code tested, its detected format shape, a list of matching countries with names and codes, a verdict string, an ambiguity flag, reasons for each match, a summary sentence, match count, the number of countries tested, any countries without pattern data, and data source/attribution metadata.

## 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": [
      "postal_code"
     ],
     "properties": {
      "candidates": {
       "type": "string",
       "description": "Comma-separated ISO country codes to test (default: all)"
      },
      "postal_code": {
       "type": "string",
       "description": "The postal code to classify"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "asOf": {
       "type": [
        "null",
        "string"
       ]
      },
      "shape": {
       "type": [
        "null",
        "string"
       ]
      },
      "source": {
       "type": [
        "null",
        "string"
       ]
      },
      "matches": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "object",
        "properties": {
         "name": {
          "type": [
           "null",
           "string"
          ]
         },
         "country": {
          "type": [
           "null",
           "string"
          ]
         }
        }
       }
      },
      "reasons": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "string"
       }
      },
      "summary": {
       "type": [
        "null",
        "string"
       ]
      },
      "verdict": {
       "type": [
        "null",
        "string"
       ]
      },
      "degraded": {
       "type": [
        "boolean",
        "null"
       ]
      },
      "ambiguous": {
       "type": [
        "boolean",
        "null"
       ]
      },
      "dataSource": {
       "type": [
        "null",
        "string"
       ]
      },
      "disclaimer": {
       "type": [
        "null",
        "string"
       ]
      },
      "matchCount": {
       "type": [
        "null",
        "number"
       ]
      },
      "notChecked": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "string"

… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/international-address-formats-postal-code-country-classifier-4b66282d/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)
