{"uid":"cap_yitsvgje63SAqX1Wqv_G-","slug":"country-code-converter-iso-3166-1-alpha-2-alpha-3-numeric-metadata-5e72e405","name":"Country Code Converter (ISO 3166-1 alpha-2/alpha-3/numeric + metadata)","description":"Convert an ISO 3166-1 country code between alpha-2, alpha-3 and numeric; also name, currency, ccTLD, calling code.","url":"https://country-codes-iso.x402tookit.com/code-convert?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"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"},"queryParams":{"type":"object","required":["code"],"properties":{"to":{"type":"string","description":"Target: all (default), alpha2, alpha3, numeric, name, currency, tld or calling"},"code":{"type":"string","description":"Country code in any form: US, USA or 840"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"to":{"type":["null","string"]},"asOf":{"type":["null","string"]},"from":{"type":["null","string"]},"input":{"type":["null","string"]},"result":{"type":["null","object"],"properties":{"name":{"type":["null","string"]},"alpha2":{"type":["null","string"]},"alpha3":{"type":["null","string"]},"numeric":{"type":["null","string"]}}},"source":{"type":["null","string"]},"country":{"type":["null","object"],"properties":{"tld":{"type":["null","string"]},"name":{"type":["null","string"]},"alpha2":{"type":["null","string"]},"alpha3":{"type":["null","string"]},"region":{"type":["null","string"]},"capital":{"type":["null","string"]},"numeric":{"type":["null","string"]},"subRegion":{"type":["null","string"]},"currencies":{"type":["array","null"],"items":{"type":"string"}},"independent":{"type":["boolean","null"]},"callingCodes":{"type":["array","null"],"items":{"type":"string"}},"officialName":{"type":["null","string"]}}},"reasons":{"type":["array","null"]},"summary":{"type":["null","string"]},"verdict":{"type":["null","string"]},"degraded":{"type":["boolean","null"]},"disclaimer":{"type":["null","string"]},"notChecked":{"type":["array","null"],"items":{"type":"string"}},"attribution":{"type":["null","string"]}}}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.02","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.02/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_jNGfG0LzEJJ4ErcfeFbFI","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.02","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Converts a country code between ISO 3166-1 alpha-2, alpha-3, and numeric forms, and returns associated metadata including country name, currency, ccTLD, and calling code.","exampleAgentPrompt":"Can you convert the country code 'DEU' and give me back the alpha-2 code, numeric code, currency, ccTLD, and calling code for that country?","exampleUseCases":[{"title":"Normalize country codes in a data pipeline","prompt":"I have a dataset using ISO alpha-3 country codes like 'FRA' and 'BRA' — can you convert each one to its alpha-2 equivalent so I can match it against our internal system?"},{"title":"Enrich checkout with currency and calling code","prompt":"A user signed up with country code '840' — can you convert that to alpha-2 and alpha-3 and also tell me what currency and international calling code that country uses?"},{"title":"Resolve ccTLD for domain registration logic","prompt":"What is the country code top-level domain (ccTLD) for the country with alpha-2 code 'JP'? I need it to decide which domain extension to recommend."}],"resultDescription":"Returns a structured object containing the matched country's alpha-2, alpha-3, and numeric codes, official and common name, currency code(s), ccTLD, calling code(s), region, sub-region, capital, and independence status. A summary and attribution are also included. The `to` parameter lets you filter down to only the specific field type you need.","failureModes":["Invalid or unrecognized country code returns a non-match or error result","Ambiguous numeric codes may resolve to unexpected countries if input format is unclear","Payment failure (402) if USDC balance is insufficient","Rate limiting or service unavailability returning 5xx errors","Deleted or reserved ISO codes may return degraded or partial results"],"whenToPreferThis":"Use this endpoint when you need to convert between ISO 3166-1 code formats (alpha-2 ↔ alpha-3 ↔ numeric) or retrieve standard country metadata like currency, ccTLD, or calling code from a known ISO code. Prefer this over the fuzzy-match or name-normalization sibling endpoints when you already have a valid ISO code and need a precise, structured conversion rather than name resolution or search.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-30T00:31:12.200Z","isFirstParty":false,"canonicalSlug":"country-code-converter-iso-3166-1-alpha-2-alpha-3-numeric-metadata-5e72e405"}