Actions5
Get Country by ISO3 Code
AI-generatedOverview
This node provides detailed information about countries, states, and cities based on various codes. Specifically, the 'Get Country by ISO3 Code' operation retrieves detailed information about a country using its ISO 3166-1 alpha-3 code (3-letter code). This is useful in scenarios where you have the ISO3 code of a country and need to fetch comprehensive country data, such as in data enrichment, geographic analysis, or localization tasks.
Use Case Examples
- Given the ISO3 code 'USA', the node returns detailed information about the United States, including its ISO2 code and other country details.
- For the ISO3 code 'BRA', the node fetches detailed information about Brazil.
Properties
| Name | Meaning |
|---|---|
| Country ISO3 Code | ISO 3166-1 alpha-3 country code (3 letters) used to identify the country for which detailed information is requested. |
Output
JSON
jsoniso3Code- The ISO3 code of the country, as provided in the input.iso2Code- The ISO2 code of the country, mapped from the ISO3 code.name- The full name of the country.phonecode- The phone code associated with the country.capital- The capital city of the country.currency- The currency used in the country.region- The region where the country is located.subregion- The subregion where the country is located.timezones- The timezones applicable to the country.
Dependencies
- country-state-city library for country, state, and city data
- An internal ISO3 to ISO2 code mapping for converting ISO3 codes to ISO2 codes
Troubleshooting
- If an invalid ISO3 code is provided, the node throws an error 'Invalid ISO3 country code: {code}'. Ensure the ISO3 code is correct and in uppercase letters.
- If no data is returned, verify that the input ISO3 code exists in the ISO3 to ISO2 mapping and that the country data is available in the underlying library.
Links
- ISO 3166 Country Codes - Official standard for country codes including ISO2 and ISO3 codes.
- country-state-city NPM Package - The library used to fetch country, state, and city data.