# Countrylayer Capital Lookup

> Countrylayer Capital Lookup is a paid API for AI agents from gateway.apiosk.com, paid per call via x402, $0.05/call, status unknown (last checked 2026-09-14).

Returns country information for a given capital city, specifically querying by capital name (e.g. Berlin)

## Facts

- Endpoint: GET https://gateway.apiosk.com/countrylayer/capital/berlin
- Price: $0.05/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/countrylayer-capital-lookup-39d5b1bc
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_zW1j5DW3Wrhsod0_wod72

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 countrylayer-capital-lookup-39d5b1bc
```

Example prompt: What country has Berlin as its capital, and can you pull up the full country details like region, currency, and population?

## When to prefer this

Use this endpoint when you need to resolve a capital city name to its corresponding country and want structured country metadata (region, currency, language, population). Prefer this over a general search engine when you need clean, structured JSON output suitable for downstream processing or data enrichment pipelines.

## Known failure modes

- Capital city name not found or misspelled — returns empty result or 404
- Ambiguous capital names shared by multiple territories may return unexpected results
- API gateway timeout or payment failure via x402 protocol
- Invalid or missing input parameter returns error response

## How this service works

Country by capital city: append /{capital}, e.g. /capital/berlin.

## Output

A JSON object containing country metadata matched to the queried capital city, typically including country name, ISO country code, capital city, world region, population, currencies, languages spoken, and flag information.

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/countrylayer-capital-lookup-39d5b1bc/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from gateway.apiosk.com](https://www.zero.xyz/host/gateway.apiosk.com/llms.txt)
