# Postal Code Regex Spec Lookup

> Postal Code Regex Spec Lookup 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).

Returns the validation regular expression (pattern source and flags) used to validate postal codes for a given country.

## Facts

- Endpoint: POST https://postal.openverbs.com/v1/spec
- 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-regex-spec-lookup-c7ec071c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_qErCXEnVoT193UPF36pXK

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-regex-spec-lookup-c7ec071c -d '<json body>'
```

Example prompt: What's the regex pattern — source and flags — used to validate postal codes in Germany? I need the DE country code spec.

## When to prefer this

Use this endpoint when you need the raw regex specification (pattern source + flags) for a country's postal code format, rather than simply validating a specific code. It is ideal for building client-side validators, generating test cases, or auditing existing validation logic. Prefer this over the sibling validation endpoint when you need the rule itself, not a pass/fail answer for a particular postal code.

## Known failure modes

- Unsupported country code — if the ISO 3166-1 alpha-2 code has no known postal pattern, the endpoint may return an error or empty result
- Invalid country code format — supplying a code shorter than 2 characters or a non-ISO code will fail schema validation
- Payment failure — missing or invalid x402 payment header will result in a 402 response
- Network timeout — transient connectivity issues may cause request failure

## How this service works

Return the validation regular expression (source and flags) used for a country's postal codes.

## Output

The endpoint returns the regular expression source string and associated flags used to validate postal codes for the requested country, enabling the caller to reconstruct and apply the exact regex pattern programmatically.

## 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"
     ],
     "properties": {
      "country": {
       "type": "string",
       "minLength": 2,
       "description": "ISO 3166-1 alpha-2 country code."
      }
     },
     "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-regex-spec-lookup-c7ec071c/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)
