# 2s.io Country Lookup

> 2s.io Country Lookup is a paid API for AI agents from 2s.io, paid per call via x402, $0.0012/call, status unknown (last checked 2026-09-15).

Look up comprehensive metadata for any country by 2-letter code, 3-letter code, or name, returning names, ISO codes, region, capital, population, area, currencies, languages, borders, timezones, coordinates, and more.

## Facts

- Endpoint: GET https://2s.io/api/country/lookup
- Price: $0.0012/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/2s-io-f3c0897d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_DTJhshV2TEytbVLMp7aII

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-io-f3c0897d
```

Example prompt: What are the capital, currency, official languages, and neighboring countries for Germany? Look it up using its ISO alpha2 code 'DE'.

## When to prefer this

Use this endpoint when you need comprehensive, structured country metadata in a single call — especially when you need ISO codes, currencies, languages, borders, timezones, and geographic details together. Prefer this over free-text web search when you need structured, machine-readable country data for enrichment, localization, or geopolitical workflows.

## Known failure modes

- Country not found for the given code or name — returns 404 or empty result
- Ambiguous partial name match when fullText=false returns unexpected country
- Invalid alpha2/alpha3 code returns error
- Missing required query parameter results in 400 bad request
- Payment not included or insufficient — returns 402 Payment Required

## How this service works

Look up country metadata via REST Countries. Pass alpha2 (2-letter ISO 3166-1), alpha3 (3-letter), or name (with optional fullText=true for exact match). Returns common + official name, ISO codes, region + subregion, independence + UN-member flags, capital(s), population, area km², landlocked flag, neighboring borders (alpha-3), timezones, currencies (code → name + symbol), languages, calling code, flag emoji + SVG/PNG URLs, lat/lng coordinates, Google Maps + OSM URLs, driving side, top-level domains.

## Output

Returns a rich country data object including common and official names, alpha2/alpha3 codes, region and subregion, independence and UN-member status, capital city or cities, population, area in km², landlocked flag, neighboring country codes (alpha3), timezones, currencies with code/name/symbol, languages, international calling code, flag emoji and SVG/PNG URLs, latitude/longitude coordinates, Google Maps and OpenStreetMap links, driving side, and top-level domains.

## Example request

```json
{
 "input": {
  "type": "http",
  "method": "GET",
  "queryParams": {
   "alpha2": "DE"
  }
 }
}
```

## 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": {
     "properties": {
      "name": {
       "type": "string",
       "description": "Country name (full or partial)."
      },
      "alpha2": {
       "type": "string",
       "description": "2-letter ISO 3166-1 code."
      },
      "alpha3": {
       "type": "string",
       "description": "3-letter ISO 3166-1 code."
      },
      "fullText": {
       "type": "boolean",
       "description": "When name is set, exact match instead of fuzzy."
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/2s-io-f3c0897d/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)
