# Duo Data Utilities – Country Lookup

> Duo Data Utilities – Country Lookup is a paid API for AI agents from api.duoleads.com, paid per call via x402, $0.05/call, status unknown (last checked 2026-10-02).

Look up a country or territory by ISO 3166-1 code or name and return all codes, the English name, UN M49 region/sub-region, currencies, and ccTLD.

## Facts

- Endpoint: GET https://api.duoleads.com/v1/ref/country?utm_source=zero.xyz
- Price: $0.05/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/duo-data-utilities-country-lookup-1f9beb27
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_KT9QylRwGST8FG2wlZQAz

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 duo-data-utilities-country-lookup-1f9beb27
```

Example prompt: What's the ISO 3166 alpha-3 code, numeric code, UN M49 region, currencies, and ccTLD for 'Netherlands'? Look it up by name.

## When to prefer this

Choose this endpoint when you need authoritative, multi-standard country reference data in a single call — especially when you need to cross-reference ISO 3166-1 codes (alpha-2, alpha-3, numeric), UN M49 regions, currencies, and ccTLDs together. Prefer it over manual lookups or general-purpose LLM knowledge when accuracy, up-to-date sourcing, and structured output are required. It supports both code-based and name-based (case/accent-insensitive substring) lookups, making it flexible for data normalization pipelines.

## Known failure modes

- Country not found for the given code or name substring — returns found: false
- Ambiguous name substring matching multiple countries — may return unexpected result or require more specific input
- Invalid or malformed code format — may return error or no match
- Network timeout or service unavailability — HTTP 5xx error
- Missing required query parameter (no code or name provided) — HTTP 4xx error

## How this service works

Look up a country or territory by ISO 3166-1 alpha-2, alpha-3 or numeric code, or by name, and get the other codes, the official and common English names, the UN M49 region and sub-region, the currencies in use, the country-code top-level domain, and optionally the full ISO 3166-2 subdivision list with each subdivision's type. Also resolves an ISO 3166-2 subdivision code such as NL-NH directly. Names are matched case- and accent-insensitively.

## Output

A JSON object containing the matched country's alpha-2, alpha-3, and numeric ISO codes; official English name; UN M49 region and sub-region names and codes; list of currencies in use; and country-code top-level domain (ccTLD). Also includes metadata: request ID, computation timestamp, price, and data source attributions.

## 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",
     "required": [],
     "properties": {
      "code": {
       "type": "string",
       "maxLength": 16,
       "description": "ISO 3166-1 alpha-2, alpha-3 or numeric code, or an ISO 3166-2 subdivision code such as NL-NH."
      },
      "name": {
       "type": "string",
       "maxLength": 128,
       "description": "Substring search on country names, case- and accent-insensitive."
      },
      "include": {
       "type": "string",
       "default": "m49,currency,tld",
       "maxLength": 64,
       "description": "Comma-separated: subdivisions, m49, currency, tld. Default m49,currency,tld."
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "ok",
      "route",
      "version",
      "data",
      "meta"
     ],
     "properties": {
      "ok": {
       "const": true
      },
      "data": {
       "type": "object",
       "required": [
        "found"
       ],
       "properties": {
        "m49": {
         "type": "object",
         "required": [
          "region",
          "region_name",
          "subregion",
          "subregion_name",
          "intermediate",
          "intermediate_name"
         ],
         "properties": {
          "region": {
           "type": [
            "string",
            "null"
           ]
          },
          "subregion": {
           "type": [
            "string",
            "null"
           ]
          },
          "region_name": {
           "type": [
            "string",
            "null"
           ]
          },
          "intermediate": {
           "type": [
            "string",
            "null"
           ]
          },
          "subregion_name": {
           "type": [
            "string",
            "null"
           ]
          },
          "intermediate_name": {
           "type": [
            "string",
            "null"
           ]
          }
         }
        }
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "data": {
   "m49": {
    "region": "150",
    "subregion": "155",
    "region_name": "Europe",
    "intermediate": null,
    "subregion_name": "Western Europe",
    "intermediate_name": null
   },
   "tld": [
    ".nl"
   ],
   "kind": "country",
   "name": "Netherlands",
   "found": true,
   "alpha_2": "NL",
   "alpha_3": "NLD",
   "numeric": "528",
   "currencies": [
    "EUR"
   ],
   "official_name": "Netherlands"
  },
  "meta": {
   "sources": [
    {
     "id": "iso-codes",
     "licence": "LGPL-2.1-or-later",
     "version": "Debian iso-codes data/iso_3166-2.json, retrieved 2026-09-28",
     "published": "2026-09-28",
     "attribution": "ISO 3166-2 subdivision data from Debian iso-codes (https://salsa.debian.org/iso-codes-team/iso-codes), (c) 2016 Dr. Tobias Quathamer, LGPL-2.1-or-later"
    },
    {
     "id": "country-codes",
     "licence": "PDDL-1.0",
     "version": "datasets/country-codes, retrieved 2026-09-28",
     "published": "2026-09-28",
     "attribution": "Open Knowledge Foundation datasets/country-codes (ISO 3166-1 codes)"
    },
    {
     "id": "cldr",
     "licence": "Unicode-3.0",
     "version": "48.2.2",
     "published": "2026-09-28",
     "attribution": "Unicode CLDR, © Unicode, Inc."
    }
   ],
   "price_usd": "0.05",
   "disclaimer": "Factual output of a deterministic computation over public data. Provided as is, with no warranty of accuracy, completeness or availability. Not investment, financial, legal, tax, medical or any other professional advice, and not a recommendation. Verify before relying on it. Terms: https://api.duoleads.com/terms",
   "request_id": "01K6B7Q4ZC8H3F2M9WXR5TYN0D",
   "computed_at": "2026-09-28T12:00:00.000Z",
   "deterministic": true
  },
  "route": "/v1/ref/country",
  "version": "1.0.0"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/duo-data-utilities-country-lookup-1f9beb27/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.duoleads.com](https://www.zero.xyz/host/api.duoleads.com/llms.txt)
