# Foundry Country Code Lookup

> Foundry Country Code Lookup is a paid API for AI agents from minty-sprout.onrender.com, paid per call via x402, $0.001/call, status unknown (last checked 2026-11-01).

Looks up ISO 3166 country codes (alpha-2, alpha-3, numeric), official name, calling code, and flag emoji for any country name or code input.

## Facts

- Endpoint: POST https://minty-sprout.onrender.com/v1/country-code?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-01
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/foundry-country-code-lookup-66d7f8bf
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Y5yTuBvCo489z8LTMfV2i

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 foundry-country-code-lookup-66d7f8bf -d '<json body>'
```

Example prompt: What are the ISO 3166 alpha-2, alpha-3, and numeric codes, the international calling code, and the official name for Nigeria?

## When to prefer this

Use this endpoint when you need authoritative ISO 3166 country code data including calling codes and flag emoji from a single lookup. Ideal for enriching user records, validating phone numbers, populating shipping forms, or displaying country info in UIs. Prefer this over manual lookups or general-purpose web search when you need structured, machine-readable country metadata reliably.

## Known failure modes

- Unrecognized country name or code returns an error or empty result
- Ambiguous input (e.g. partial name) may match unexpectedly or fail
- Non-standard abbreviations or historical country names may not be found
- Input exceeding 8000 characters is rejected by schema

## How this service works

Country code lookup: ISO 3166 alpha-2, alpha-3 and numeric codes, official name, calling code and flag. Input: a country name or code.

## Output

A JSON object containing the country's flag emoji, common name, ISO alpha-2 code, ISO alpha-3 code, numeric code, international calling code (e.g. '+92'), and official name (e.g. 'Islamic Republic of Pakistan').

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "input": {
   "type": "string",
   "maxLength": 8000,
   "description": "A country name or code"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "flag": "🇵🇰",
  "name": "Pakistan",
  "alpha_2": "PK",
  "alpha_3": "PAK",
  "numeric": "586",
  "calling_code": "+92",
  "official_name": "Islamic Republic of Pakistan"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/foundry-country-code-lookup-66d7f8bf/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from minty-sprout.onrender.com](https://www.zero.xyz/host/minty-sprout.onrender.com/llms.txt)
