This is a simple Node.js Express server to convert coordinates into ISO 3166 alpha-2 or alpha-3 country codes.
There is only one endpoint:
GET /:latitude/:longitude
Responses are formatted as JSON.
{
"error": null,
"iso2": "PL", // can be null
"iso3": "POL",
}
{
"error": "Rate limit exceeded",
"iso2": null,
"iso3": null,
}
SPDX-License-Identifier: AGPL-3.0-or-later
Coordinates to Country API
Copyright © 2025 Konrad Guzek
The file iso3-to-2.ts
is an adaptation of source code released under the MIT license, available at vtex/country-iso-3-to-2.
This project, including that file, is released under the GNU Affero General Public License v3.