# Agent402 Country Code Validator

> Agent402 Country Code Validator is a paid API for AI agents from agent402.co.uk, paid per call via x402, $0.001/call, status down (last checked 2026-09-15).

Validates and normalizes ISO alpha-2 country codes, including common non-standard aliases like 'UK' to 'GB'.

## Facts

- Endpoint: POST https://agent402.co.uk/v1/validate/country-code
- Price: $0.001/call
- Payment: x402
- Status: down
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent402-country-code-validator-eb86de12
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Y4Mwz2rPaSTjYsEwThlNu

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 agent402-country-code-validator-eb86de12 -d '<json body>'
```

Example prompt: Before routing this request to the UK-specific pricing tool, validate and normalize the country code 'UK' to make sure it's a proper ISO alpha-2 code.

## When to prefer this

Use this endpoint when you need to ensure a country code is ISO alpha-2 compliant before passing it to geo-routed tools, payment processors, or localization APIs — especially when user input may contain common non-standard codes like 'UK' instead of 'GB'. Prefer this over doing a lookup table locally when you want a maintained, authoritative allowlist including common aliases.

## Known failure modes

- Invalid or unrecognized country code string returns an error or null result
- Empty input or missing 'code' field may return a validation error
- Codes longer than 2 characters that are not known aliases may be rejected
- Payment failure (HTTP 402) if USDC balance is insufficient

## How this service works

Don't burn tokens on deterministic work. Go/no-go jobs first: payout preflight, text firewall (PII/secrets), budget check — then rails, calendars, finmath. x402 USDC on Base. UK + global. agent402.co.uk — not agent402.tools. $0.001–$0.002 USDC on Base. No API keys.

## Output

Returns a JSON object with the normalized ISO alpha-2 code (e.g. 'GB'), the original code echoed back, and a boolean 'known_common' flag indicating whether the input was a recognized common alias (like 'UK') rather than a strict ISO code.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "code": {
   "type": "string",
   "description": "ISO alpha-2"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "code": "GB",
  "iso_alpha2": "GB",
  "known_common": true
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent402-country-code-validator-eb86de12/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent402.co.uk](https://www.zero.xyz/host/agent402.co.uk/llms.txt)
