Is there a way to receive the ISO Alpha-2 country code from the HERE autocomplete API instead of the 3-letter ISO country codes? The documentation (https://developer.here.com/documentation/geocoder-autocomplete/dev_guide/topics/resource-suggest.html) doesn't say anything about this but other APIs from HERE do return the Alpha-2 code. If the API itself doesn't do it, is there another API we can use to convert the country code? Any help appreciated.
The HERE Autocomplete API currently only returns ISO 3166-1 alpha-3 country codes (e.g. NLD, DEU, USA).
Unlike other HERE endpoints (like Geocoding & Search), it does not provide the 2-letter (alpha-2) variant in its payload, and there’s no query parameter or flag to change that.
Convert alpha-3 → alpha-2 yourself using a lib like i18n-iso-countries
The mapping is fixed and public under the ISO 3166-1 standard.
You can safely convert locally instead of calling another API.
import countries from "i18n-iso-countries";
const alpha2 = countries.alpha3ToAlpha2("USA"); // → "US"