# Country Info Lookup

> Country Info Lookup is a paid API for AI agents from x402.agentutility.ai, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-15).

Resolves country metadata by name, ISO 3166 alpha-2/alpha-3 code, or capital city, returning capital, region, population, area, currencies, languages, timezones, calling code, flag emoji, and neighboring countries.

## Facts

- Endpoint: POST https://x402.agentutility.ai/country-info
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-agentutility-ai-27b3a487
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_29cML2Vnmc5TFP5p4_J_X

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 x402-agentutility-ai-27b3a487 -d '<json body>'
```

Example prompt: What are the capital, population, currency, languages, timezones, flag, and neighboring countries for Germany?

## When to prefer this

Use this endpoint when you need structured, multi-field country metadata — especially when resolving from a free-text name, capital city, or ISO code — and you need it in a single call. Prefer this over scraping Wikipedia or calling a geocoding API when the target entity is a sovereign country and you need fields like calling code, flag emoji, languages, and neighbors bundled together.

## Known failure modes

- Unrecognized country name or misspelling returns a 404 or empty result
- Ambiguous name (e.g. 'Congo') may return multiple or incorrect records
- Non-sovereign territories or dependencies may not be indexed
- Invalid ISO code format returns an error
- Network timeout or upstream REST Countries API downtime causes failure

## How this service works

Country info lookup. Resolves country metadata by common name, ISO 3166 alpha-2/alpha-3 code, or capital city. Returns capital, region, population, area, currencies, languages, timezones, calling code, flag emoji, neighbors. Wraps the public REST Countries v3.1 API — no auth, commercial-OK.

## Output

A structured object containing the country's canonical name, capital city, region, subregion, population, land area in km², list of currencies with codes, official and spoken languages, UTC timezones, international dialing/calling code, flag emoji, and ISO alpha-2/alpha-3 codes for all bordering countries.

## Example request

```json
{
 "input": {
  "body": {
   "query": "Germany",
   "query_type": "name"
  },
  "type": "http",
  "method": "POST",
  "bodyType": "json"
 }
}
```

## 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",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "required": [
      "query"
     ],
     "properties": {
      "query": {
       "type": "string",
       "description": "Search string — country name (e.g. 'Germany'), ISO code (e.g. 'DE'), or capital city (e.g. 'Berlin'), depending on query_type."
      },
      "query_type": {
       "enum": [
        "name",
        "code",
        "capital"
       ],
       "type": "string",
       "description": "How to interpret 'query'. Default 'name'."
      }
     }
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "source": {
       "type": "string"
      },
      "matches": {
       "type": "array",
       "items": {
        "type": "object",
        "properties": {
         "name": {
          "type": "string"
         },
         "region": {
          "type": "string"
         },
         "capital": {
          "type": "string"
         },
         "area_km2": {
          "type": "integer"
         },
         "languages": {
          "type": "array",
          "items": {
           "type": "string"
          }
         },
         "subregion": {
          "type": "string"
         },
         "timezones": {
          "type": "array",
          "items": {
           "type": "string"
          }
         },
         "currencies": {
          "type": "array",
          "items": {
           "type": "string"
          }
         },
         "flag_emoji": {
          "type": "string"
         },
         "population": {
          "type": "integer"
         },
         "code_alpha2": {
          "type": "string"
         },
         "code_alpha3": {
          "type": "string"
         },
         "calling_code": {
          "type": "string"
         },
         "neighbors_codes": {
          "type": "array",
          "items": {
           "ty
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "source": "https://restcountries.com",
  "matches": [
   {
    "name": "Germany",
    "region": "Europe",
    "capital": "Berlin",
    "area_km2": 357114,
    "languages": [
     "German"
    ],
    "subregion": "Western Europe",
    "timezones": [
     "UTC+01:00"
    ],
    "currencies": [
     "EUR"
    ],
    "flag_emoji": "🇩🇪",
    "population": 83240525,
    "code_alpha2": "DE",
    "code_alpha3": "DEU",
    "calling_code": "+49",
    "neighbors_codes": [
     "AUT",
     "BEL",
     "CZE",
     "DNK",
     "FRA",
     "LUX",
     "NLD",
     "POL",
     "CHE"
    ]
   }
  ]
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-agentutility-ai-27b3a487/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.agentutility.ai](https://www.zero.xyz/host/x402.agentutility.ai/llms.txt)
