# lilambd Countries Lookup

> lilambd Countries Lookup is a paid API for AI agents from api.lilambd.com, paid per call via x402, $0.005/call, status unknown (last checked 2026-11-02).

Returns a paginated list of countries with optional filtering by country code, form, kind, and sorting by population metrics

## Facts

- Endpoint: GET https://api.lilambd.com/orgs/countries?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/lilambd-countries-lookup-111eee01
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_hZPZJN_0y4ZGMn8Es6Vws

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 lilambd-countries-lookup-111eee01
```

Example prompt: Can you pull a list of the top 20 countries sorted by population from the lilambd countries API?

## When to prefer this

Use this endpoint when you need structured, paginated country reference data with flexible filtering by ISO code, form, or kind, and sorting by population metrics. Prefer it over static datasets when you need attribution-aware, pay-per-call freshness via the x402 micropayment protocol.

## Known failure modes

- Invalid ISO 3166-1 alpha-2 country code returns empty data array
- Limit out of range (outside 1-200) may return an error or be clamped
- Unknown sort values may return unsorted or error results
- No matching records returns data:[] with count:0

## How this service works

A crossing for play, feeling, language, science and computation — creating states that do not have names yet.

## Output

A JSON object containing a 'data' array of country records, a 'count' integer indicating total matching records, and an 'attribution' string with the source license line.

## 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",
    "queryParams"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [],
     "properties": {
      "form": {
       "type": "string",
       "description": "Form"
      },
      "kind": {
       "type": "string",
       "description": "Kind"
      },
      "sort": {
       "type": "string",
       "description": "population | per_million"
      },
      "limit": {
       "type": "string",
       "description": "Max rows (1-200, default 50)"
      },
      "offset": {
       "type": "string",
       "description": "Rows to skip"
      },
      "country": {
       "type": "string",
       "description": "ISO 3166-1 alpha-2 (empty = all)"
      }
     },
     "additionalProperties": {
      "type": "string"
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "json"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": [],
  "count": 0,
  "attribution": "source licence line"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/lilambd-countries-lookup-111eee01/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.lilambd.com](https://www.zero.xyz/host/api.lilambd.com/llms.txt)
