# 2s ISO 3166-2 Subdivision Lookup

> 2s ISO 3166-2 Subdivision Lookup is a paid API for AI agents from 2s.io, paid per call via x402, $0.0012/call, status unknown (last checked 2026-10-14).

Looks up ISO 3166-2 subdivision codes (states, provinces, regions) by code or lists all subdivisions for a given country.

## Facts

- Endpoint: GET https://2s.io/api/iso/subdivision?utm_source=zero.xyz
- Price: $0.0012/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/2s-iso-3166-2-subdivision-lookup-20cb956a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_jtTFCpuVVevt4dirhfMHM

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 2s-iso-3166-2-subdivision-lookup-20cb956a
```

Example prompt: What is the full name and country for the ISO 3166-2 subdivision code US-CA?

## When to prefer this

Use this endpoint when you need authoritative ISO 3166-2 subdivision data — either to decode a subdivision code to its human-readable name, or to enumerate all subdivisions for a given country. Prefer this over general geocoding APIs when you specifically need ISO-standard codes and names for states, provinces, or regions.

## Known failure modes

- Invalid or unknown subdivision code returns found:false
- Invalid country code returns found:false or empty subdivisions array
- Missing both code and country parameters may return an error or empty result
- Subdivision codes must follow ISO 3166-2 format (e.g. US-CA) or the lookup will fail

## How this service works

Look up ISO 3166-2 subdivisions (states, provinces, regions). Pass code (e.g. US-CA) to resolve a single subdivision → name + country, or country (2-letter ISO 3166-1, e.g. US) to list all of that country's subdivisions with their codes. Bundled authoritative ISO 3166-2 data (~3.8k subdivisions across 237 countries) — the address/jurisdiction ground truth an LLM hallucinates codes for.

## Output

Returns a JSON object indicating whether the subdivision was found, the queried code or country, the source provider, and either a single subdivision object (with code, name, and country) when looking up by code, or an array of subdivision objects when listing by country.

## Example request

```json
{
 "input": {
  "type": "http",
  "method": "GET",
  "queryParams": {
   "country": "US"
  }
 }
}
```

## 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",
    "queryParams"
   ],
   "properties": {
    "type": {
     "const": "http"
    },
    "method": {
     "const": "GET"
    },
    "queryParams": {
     "required": [],
     "properties": {
      "code": {
       "type": "string",
       "description": "ISO 3166-2 subdivision code, e.g. US-CA."
      },
      "country": {
       "type": "string",
       "description": "2-letter ISO 3166-1 country code to list its subdivisions, e.g. US."
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/2s-iso-3166-2-subdivision-lookup-20cb956a/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from 2s.io](https://www.zero.xyz/host/2s.io/llms.txt)
