# Format Address API – Subdivisions Lookup

> Format Address API – Subdivisions Lookup 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).

Returns the list of administrative subdivisions (states, prefectures, provinces, etc.) for a given country, including their codes, names, Latin names, and postal code patterns.

## Facts

- Endpoint: GET https://formataddress.com/v1/subdivisions
- 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-subdivisions-lookup-cac71fd7
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_x-QSRNXfn4zEKhRUHYhws

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-subdivisions-lookup-cac71fd7
```

Example prompt: Can you pull the full list of subdivisions for Japan — including their codes, local names, and postal code patterns — so I can populate an address form dropdown?

## When to prefer this

Use this endpoint when you need authoritative, per-country subdivision lists for populating address forms, validating postal codes against regions, or localizing address UI — especially when you need both local-script names and Latin transliterations, and postal code patterns, all derived from Google's libaddressinput metadata for 252 countries.

## Known failure modes

- Missing or invalid country code returns an error or empty result
- Unsupported or non-existent ISO country codes may return 400 or empty subdivision list
- Countries with no subdivision data may return an empty array
- Network timeout or service unavailability returns a 5xx error
- Malformed query parameter results in a 400 bad request

## 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 containing the total count of subdivisions, the local label for that subdivision level (e.g. 'prefecture', 'state', 'province'), and an array of subdivision objects each with a key, ISO code (e.g. JP-13), local name, Latin name, and an optional postal code regex pattern.

## 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": {
      "country": {
       "type": "string",
       "description": "ISO 3166-1 alpha-2 country code, e.g. DE, US, JP, BR"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "count": 47,
  "label": "prefecture",
  "subdivisions": [
   {
    "key": "東京都",
    "code": "JP-13",
    "name": "東京都",
    "latinName": "Tokyo",
    "postalPattern": "1[0-9]|20"
   }
  ]
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/format-address-api-subdivisions-lookup-cac71fd7/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)
