# CoCo Country Lookup

> CoCo Country Lookup is a paid API for AI agents from cocoeatsai.com, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-19).

Looks up country metadata (name, flag, ISO codes, subdivision count, and sample subdivisions) for a given country query string

## Facts

- Endpoint: GET https://cocoeatsai.com/area4/agent/tools/country?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-19
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/coco-country-lookup-9a1c943b
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap__ADsSVksSSXeUpj6i3ICv

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 coco-country-lookup-9a1c943b
```

Example prompt: What are the ISO codes, flag, and subdivision count for Japan?

## When to prefer this

Use this endpoint when you need structured ISO 3166 country metadata — including flag emoji, official name, alpha-2/alpha-3 codes, numeric code, and subdivision count — from a free-text country query. It is well-suited for normalizing user-supplied country names, enriching records with ISO codes, or displaying country details in a UI. Prefer it over manual ISO table lookups or general geocoding APIs when you specifically need country-level ISO data with subdivision info.

## Known failure modes

- Ambiguous query string may return unexpected country (e.g. 'Georgia' could match the country or a US state context)
- Unknown or misspelled country names may return no results or an error
- Very short or non-Latin query strings may not resolve correctly
- Rate limiting or payment failure may block the request

## How this service works

Zach Riehn's lab: an about-me and portfolio, a news desk, The Atelier for AI experiments, Launch Lab for XRP research, and Fracture for games.

## Output

Returns a JSON object with the country's flag emoji, common name, ISO alpha-2 code, ISO alpha-3 code, numeric code, official name, total subdivision count, and a sample list of subdivision codes (e.g. US state or province codes).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input",
  "output"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "queryParams"
   ],
   "properties": {
    "type": {
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ]
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "query": {
       "type": "string"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type",
    "example"
   ],
   "properties": {
    "type": {
     "const": "json"
    },
    "example": {
     "type": "object",
     "required": [
      "name"
     ],
     "properties": {
      "name": {
       "type": "string"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "flag": "🇺🇸",
  "name": "United States",
  "alpha_2": "US",
  "alpha_3": "USA",
  "numeric": "840",
  "official_name": "United States of America",
  "subdivision_count": 57,
  "subdivisions_sample": [
   "US-WV",
   "US-PA",
   "US-MP",
   "US-HI",
   "US-WY",
   "US-PR",
   "US-MS",
   "US-AK",
   "US-IA",
   "US-RI",
   "US-MT",
   "US-ID",
   "US-AL",
   "US-SC",
   "US-NC"
  ]
 },
 "exampleNote": "Computed offline with demonstration inputs; time/random values are illustrative."
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/coco-country-lookup-9a1c943b/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from cocoeatsai.com](https://www.zero.xyz/host/cocoeatsai.com/llms.txt)
