# Country Profile by ISO 3166 Code

> Country Profile by ISO 3166 Code is a paid API for AI agents from pennydatahq.com, paid per call via x402, $0.003/call, status unknown (last checked 2026-11-23).

Returns a country's ISO codes, name, region, income group, lending type, capital with coordinates, latest population, and GDP per capita given a 2-letter country code.

## Facts

- Endpoint: GET https://pennydatahq.com/api/country/:code?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-23
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/country-profile-by-iso-3166-code-7af168fb
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_O8M7PodxDFWKnBbcUP5Nq

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 country-profile-by-iso-3166-code-7af168fb
```

Example prompt: What's the capital city, region, income group, latest population, and GDP per capita for Germany (country code DE)?

## When to prefer this

Use this endpoint when you need a quick, structured country profile including World Bank classification (income group, lending type), capital coordinates, and the latest macro indicators (population, GDP per capita) from a single call using just a 2-letter ISO code. Prefer this over scraping Wikipedia or calling multiple APIs when you want a lightweight, pay-per-call JSON response without authentication setup.

## Known failure modes

- Invalid or unrecognized country code returns a not-found error
- Region or income group aggregates (e.g. 'WLD', 'EU') are not countries and return not found
- Lowercase vs uppercase input is handled transparently
- Population or GDP fields may be null if World Bank data is unavailable for that country
- Malformed path parameter may result in an error response

## How this service works

Country profile by ISO 3166 alpha-2 code: ISO codes, name, region, income group, lending type, capital with coordinates, and the latest population and GDP per capita with their years, as JSON.

## Output

A JSON object containing the country's ISO 2 and ISO 3 codes, full name, region, income group, lending type, capital city name, capital latitude and longitude, latest population (value and year), and latest GDP per capita in current USD (value and year). Fields are null when no data is available.

## 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"
    },
    "pathParams": {
     "type": "object",
     "required": [
      "code"
     ],
     "properties": {
      "code": {
       "type": "string",
       "description": "2-letter ISO 3166 country code, any case. Regions and income groups (for example WLD, EU) are not countries and return not found."
      }
     }
    },
    "queryParams": {
     "type": "object",
     "properties": {}
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "iso2",
      "iso3",
      "name"
     ],
     "properties": {
      "iso2": {
       "type": "string"
      },
      "iso3": {
       "type": "string"
      },
      "name": {
       "type": "string"
      },
      "region": {
       "type": [
        "string",
        "null"
       ]
      },
      "capital": {
       "type": [
        "string",
        "null"
       ]
      },
      "population": {
       "type": [
        "object",
        "null"
       ],
       "properties": {
        "year": {
         "type": "integer"
        },
        "value": {
         "type": "number"
        }
       },
       "description": "Total population, latest year with data; null when none"
      },
      "income_group": {
       "type": [
        "string",
        "null"
       ]
      },
      "lending_type": {
       "type": [
        "string",
        "null"
       ]
      },
      "capital_latitude": {
       "type": [
        "number",
        "null"
       ]
      },
      "capital_longitude": {
       "type": [
        "number",
        "null"
       ]
      },
      "gdp_per_capita_usd": {
       "type": [
        "object",
        "null"
       ],
       "properties": {
        "year": {
         "type": "integer"
        },
        "value": {
         "type": "number"
        }
       },
       "description": "GDP per capita in current US dollars, latest year with data; null when none"
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/country-profile-by-iso-3166-code-7af168fb/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from pennydatahq.com](https://www.zero.xyz/host/pennydatahq.com/llms.txt)
