# Country Info Lookup by Name or ISO Code

> Country Info Lookup by Name or ISO Code is a paid API for AI agents from agent402.tools, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-15).

Returns comprehensive country facts (official name, capital, region, currencies, languages, timezones, dialing code, TLD, and more) given a country name or ISO 3166-1 alpha-2/alpha-3 code.

## Facts

- Endpoint: GET https://agent402.tools/api/country-info
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/country-info-lookup-by-name-or-iso-code-e3fdcd40
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_uBFfOit9H_kNfZrKaegZm

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 country-info-lookup-by-name-or-iso-code-e3fdcd40
```

Example prompt: What is the official name, capital, currency, languages, timezone, dialing code, and TLD for Japan? Look up by ISO code JPN.

## When to prefer this

Choose this endpoint when you need structured, authoritative country metadata (capital, currencies, languages, timezones, dialing codes, TLD) from a stable offline dataset. Prefer it over live web lookups when determinism and offline reliability matter. It supports both human-readable country names and ISO 3166-1 alpha-2/alpha-3 codes, making it ideal for data enrichment pipelines, form validation, or agents that need to resolve country identifiers.

## Known failure modes

- Unknown country name or code returns a 404 or empty result
- Misspelled country name may not match — use ISO code for precision
- Ambiguous common names (e.g. 'Congo') may return unexpected results — prefer ISO alpha-2/alpha-3
- Non-country territories or disputed regions may not be present in the dataset

## How this service works

Country facts by name or ISO code: official name, capital, region, currencies, languages, timezones, dialing code, TLD, and more. Committed open dataset (world-countries, ODbL, plus the IANA timezone country map) - offline and deterministic. ?name=Japan or ?code=JP

## Output

A structured object containing the country's official and common name, capital city, geographic region, list of currencies (with codes and symbols), official languages, timezones, international dialing code, and country-code top-level domain (ccTLD). Data is served offline from a committed open dataset, so results are deterministic and consistent across calls.

## 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",
     "properties": {
      "code": {
       "type": "string",
       "description": "alternative: ISO 3166-1 alpha-2 or alpha-3 code, e.g. JP or JPN"
      },
      "name": {
       "type": "string",
       "description": "country name (common or official), e.g. Japan"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "query",
      "found",
      "matches",
      "country"
     ],
     "properties": {
      "found": {
       "type": "boolean"
      },
      "query": {
       "type": "string"
      },
      "country": {
       "type": "object"
      },
      "matches": {
       "type": "integer"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "found": true,
  "query": "Japan",
  "country": {
   "tld": ".jp",
   "area": 377930,
   "flag": "🇯🇵",
   "name": "Japan",
   "code2": "JP",
   "code3": "JPN",
   "latlng": [
    36,
    138
   ],
   "region": "Asia",
   "borders": [],
   "capital": "Tokyo",
   "demonym": "Japanese",
   "unMember": true,
   "languages": [
    "Japanese"
   ],
   "subregion": "Eastern Asia",
   "timezones": [
    "Asia/Tokyo"
   ],
   "currencies": [
    {
     "code": "JPY",
     "name": "Japanese yen",
     "symbol": "¥"
    }
   ],
   "landlocked": false,
   "callingCode": "+81",
   "officialName": "Japan"
  },
  "matches": 1
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/country-info-lookup-by-name-or-iso-code-e3fdcd40/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent402.tools](https://www.zero.xyz/host/agent402.tools/llms.txt)
