# Format Address API — Verify

> Format Address API — Verify is a paid API for AI agents from formataddress.com, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14).

Validates and formats a postal address block against Google's libaddressinput rules for a given country, returning whether the address is valid and what problems were found.

## Facts

- Endpoint: GET https://formataddress.com/v1/verify
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/format-address-api-verify-4f03b91b
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_DmDOnUPciJJjIdTtwXI8O

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 format-address-api-verify-4f03b91b
```

Example prompt: Can you check whether this German address is correctly formatted — 'Max Muster, Musterstr. 1, 53225 BONN' — using country code DE and tell me if there are any problems with it?

## When to prefer this

Choose this endpoint when you need country-aware postal address validation backed by Google's libaddressinput metadata covering 252 countries, particularly when you want both formatting correction and explicit problem identification. Prefer it over generic address validators when you need per-country format rules (field order, required fields, subdivision formats) or when you need to verify an already-composed address block rather than just parse or geocode an address. Not suitable when you need geocoding, coordinate lookup, or legally certified postal verification.

## Known failure modes

- Missing required 'country' query parameter — returns an error
- Invalid ISO 3166-1 alpha-2 country code — returns an error or unrecognized country response
- Malformed or empty formatted address block when using verification mode — may return all lines as problems
- Unsupported script value — defaults to local script
- Network timeout or service unavailability — HTTP 5xx error
- Payment not provided or rejected — HTTP 402 response requiring x402 payment

## How this service works

Verified postal address formatting for 252 countries based on Google's libaddressinput metadata: per-country format rules, address-block composition, verification of your own output, and subdivision lists. Address formatting per Google's libaddressinput metadata — informational, not legal or postal advice.

## Output

A JSON object with a 'valid' boolean indicating whether the address block is correct, an 'expected' string showing the properly formatted address block (newline-separated), and a 'problems' array listing specific formatting issues found (e.g. missing lines, wrong order, incorrect postal code placement).

## 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"
     ],
     "properties": {
      "city": {
       "type": "string"
      },
      "name": {
       "type": "string"
      },
      "script": {
       "type": "string",
       "description": "local (default) | latin — latin uses the romanized format where the country has one (JP, CN, KR, TW …)"
      },
      "country": {
       "type": "string",
       "description": "ISO 3166-1 alpha-2 country code, e.g. DE, US, JP, BR"
      },
      "address1": {
       "type": "string"
      },
      "address2": {
       "type": "string"
      },
      "formatted": {
       "type": "string",
       "description": "the complete address block to verify (\\n-separated)"
      },
      "postalCode": {
       "type": "string"
      },
      "subdivision": {
       "type": "string",
       "description": "subdivision as ISO 3166-2 code, native or latin name (e.g. US-CA, CA, California, 東京都, Tokyo)"
      },
      "organization": {
       "type": "string"
      },
      "dependentLocality": {
       "type": "string"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "valid": false,
  "expected": "Max Muster\nMusterstr. 1\n53225 BONN",
  "problems": [
   "expected line '53225 BONN' not found in formatted block"
  ]
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/format-address-api-verify-4f03b91b/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from formataddress.com](https://www.zero.xyz/host/formataddress.com/llms.txt)
