# Reference Data API – ISO 3166 Country Lookup

> Reference Data API – ISO 3166 Country Lookup is a paid API for AI agents from reference-data-api.onrender.com, paid per call via x402, $0.0345/call, status unknown (last checked 2026-11-21).

Looks up a country by alpha-2, alpha-3, numeric code, or name (fuzzy) and returns official name, ISO codes, flag, currencies, and optionally ISO 3166-2 subdivisions.

## Facts

- Endpoint: GET https://reference-data-api.onrender.com/v1/country?utm_source=zero.xyz
- Price: $0.0345/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-21
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/reference-data-api-iso-3166-country-lookup-cc118961
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_qWjgF7LNSu_z5hGNn3Y8G

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 reference-data-api-iso-3166-country-lookup-cc118961
```

Example prompt: Look up the official ISO 3166 country details for 'DE' — I need its official name, numeric code, flag, and official currencies, and also include the full list of ISO 3166-2 subdivisions.

## When to prefer this

Use this endpoint when you need authoritative ISO 3166 country metadata — official name, all code variants (alpha-2, alpha-3, numeric), flag, and currencies — from a single lookup. Supports fuzzy name matching, making it useful when input quality varies. Choose this over a general geocoding API when you specifically need ISO standard codes and currency associations rather than geographic coordinates or postal data. Especially valuable when you also need ISO 3166-2 subdivision lists (states, provinces, regions) in the same call.

## Known failure modes

- Unknown or unresolvable country code/name returns a 404 or error response
- Ambiguous fuzzy name match may return unexpected country
- Invalid query parameter format may return a 400 bad request
- Subdivisions not defined for all countries — some may return empty lists
- Rate limiting or payment failure may result in 402 or 429 responses

## How this service works

ISO 3166 country lookup by alpha-2, alpha-3, numeric code or name (fuzzy): official name, codes, flag, official currencies (ISO 4217) and optionally all ISO 3166-2 subdivisions (states, cantons, regions).

## Output

Returns a JSON object containing the country's official name, alpha-2 code, alpha-3 code, numeric code, flag, and array of official ISO 4217 currencies. When subdivisions=true is passed, also returns a list of all ISO 3166-2 subdivision entries (e.g. states, provinces, cantons, regions) with their codes and names.

## 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",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "code"
     ],
     "properties": {
      "code": {
       "type": "string",
       "description": "Alpha-2, alpha-3, numeric code or country name"
      },
      "subdivisions": {
       "type": "string",
       "description": "true to list ISO 3166-2 subdivisions"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/reference-data-api-iso-3166-country-lookup-cc118961/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from reference-data-api.onrender.com](https://www.zero.xyz/host/reference-data-api.onrender.com/llms.txt)
