Skip to content

A simple Express API that converts coordinates to an ISO 3166 country code.

License

AGPL-3.0, MIT licenses found

Licenses found

AGPL-3.0
LICENSE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

kguzek/coordinates-to-country

Repository files navigation

Coordinates to Country API

This is a simple Node.js Express server to convert coordinates into ISO 3166 alpha-2 or alpha-3 country codes.

Credits

Usage

There is only one endpoint:

GET /:latitude/:longitude

Response structure

Responses are formatted as JSON.

200 response

{
  "error": null,
  "iso2": "PL", // can be null
  "iso3": "POL",
}

429 response (>10 requests in 10s)

{
  "error": "Rate limit exceeded",
  "iso2": null,
  "iso3": null,
}

Copyright

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.

About

A simple Express API that converts coordinates to an ISO 3166 country code.

Resources

License

AGPL-3.0, MIT licenses found

Licenses found

AGPL-3.0
LICENSE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published