ISO Code Endpoints
Convert ISO Code
Translate a country code between ISO 3166-1 alpha-2, alpha-3, and numeric formats
GET
Convert a country code between the three ISO 3166-1 formats in a single call:
- alpha-2 ↔ alpha-3 (e.g.
US↔USA) - alpha-2 ↔ numeric (e.g.
US↔840) - alpha-3 ↔ numeric (e.g.
USA↔840)
Availability: Starter plan and above. Returns
403 on Community plan.Cache reuse: Conversions share the same cache slot as
/v1/iso/country. A previous ?iso2=US lookup serves any ?from=iso2&value=US&to=... conversion without a fresh database hit. The target column is extracted after the cache read, so different to values reuse the same slot.Numeric inputs 4 and 004 resolve to the same cache slot.Authentication
Your API key for authentication
Query Parameters
Source format. One of
iso2, iso3, numeric.Target format. One of
iso2, iso3, numeric. Must differ from from.The code to convert. Must match the format named in
from:from=iso2→ 2 letters (e.g.US)from=iso3→ 3 letters (e.g.USA)from=numeric→ 1–3 digits, non-zero (e.g.840or4)
Response
Echo of the source format you requested.
Echo of the target format you requested.
Echo of the
value you sent — useful for matching responses to requests when batching.The converted code. For
to=numeric, returned zero-padded to 3 digits (e.g. "840").Related Endpoints
- Lookup Country by ISO Code — return the full country record instead of just the converted code
- Lookup State by ISO Code — ISO 3166-2 subdivision lookup