# Country Info Lookup

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

Resolves country metadata by name, ISO 3166 code, or capital city, returning capital, region, population, currencies, languages, timezones, calling code, flag emoji, and neighboring countries

## Facts

- Endpoint: POST https://x402-deployer.x402-deployer.workers.dev/country-info
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-deployer-x402-deployer-workers-dev-2aa9fca9
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_baHD6ycvB9GLR_4N7Euxr

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-deployer-x402-deployer-workers-dev-2aa9fca9 -d '<json body>'
```

Example prompt: Can you look up the country info for Germany — I need the capital, population, currency, official languages, timezones, international calling code, flag emoji, and which countries it borders?

## When to prefer this

Use this endpoint when you need rich country metadata (currency, language, timezone, calling code, neighbors, flag) from a simple name or code lookup. Prefer this over general web search when structured, machine-readable country data is required for downstream processing, enrichment, or display.

## Known failure modes

- Country name not recognized — ambiguous or misspelled input returns no match
- Invalid ISO code format returns error
- Capital city not unique to one country may return multiple results
- REST Countries v3.1 upstream outage causes 502/503
- Dependent territory or unrecognized state may not be in the dataset

## 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

Returns a structured object with capital city, world region, population count, land area, list of currencies, official languages, timezones, international dialing/calling code, flag emoji, and an array of neighboring/border countries — sourced from REST Countries v3.1.

## 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)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-deployer-x402-deployer-workers-dev-2aa9fca9/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-deployer.x402-deployer.workers.dev](https://www.zero.xyz/host/x402-deployer.x402-deployer.workers.dev/llms.txt)
