# Apiosk Gateway – Countrylayer Execute

> Apiosk Gateway – Countrylayer Execute is a paid API for AI agents from gateway.apiosk.com, paid per call via x402, $0.07/call, status unknown (last checked 2026-09-13).

Executes a pay-per-call request to the Countrylayer country data API via the Apiosk x402 gateway, forwarding operations and JSON payloads upstream and returning the result.

## Facts

- Endpoint: POST https://gateway.apiosk.com/countrylayer/execute
- Price: $0.07/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/apiosk-gateway-countrylayer-execute-25204c09
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_r1tkER2duu5EkH5hbgqco

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 apiosk-gateway-countrylayer-execute-25204c09 -d '<json body>'
```

Example prompt: Look up all the details for Germany using Countrylayer — I need the capital, currency, official languages, calling code, and ISO codes.

## When to prefer this

Choose this endpoint when you need structured, authoritative country reference data (codes, capitals, currencies, languages, timezones) and are already operating in an x402/USDC micropayment environment on Base. Prefer it over direct Countrylayer API calls when you want pay-per-call billing without managing API keys, or when your agent workflow is already using the Apiosk gateway for other data providers.

## Known failure modes

- Invalid or unrecognized operation selector returns an error status with no upstream result
- Malformed JSON in the input payload causes a parsing error
- Country name or code not found returns an empty result or 404 upstream status
- Insufficient USDC balance or failed x402 payment results in HTTP 402 and no execution
- Upstream Countrylayer service unavailable returns a non-200 upstream_status

## How this service works

Pay-per-call API gateway on the x402 protocol (HTTP 402 + USDC on Base). This document covers the gateway's discovery and execution meta-endpoints. Individual provider APIs are reachable at /{api_slug}/{path} and described by GET /{api_slug}/metadata.

## Output

Returns a JSON object containing the upstream Countrylayer API response body (country data such as names, codes, capitals, currencies, languages, timezones, and flags), along with gateway metadata including the operation invoked, HTTP status from upstream, latency in milliseconds, and cost of the call in USDC.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "input": {
   "type": "string",
   "description": "JSON payload forwarded to the selected operation."
  },
  "operation": {
   "type": "string",
   "description": "Operation id, /path, or METHOD /path selector."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "status",
  "result"
 ],
 "properties": {
  "api": {
   "type": "string"
  },
  "cost": {
   "type": "string"
  },
  "result": {
   "description": "Upstream response body."
  },
  "status": {
   "type": "string"
  },
  "latency": {
   "type": "number"
  },
  "operation": {
   "type": "string"
  },
  "upstream_status": {
   "type": "integer"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/apiosk-gateway-countrylayer-execute-25204c09/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)
