Skip to content

API for get GEO Locations (country, region, city, timezone, latitude/longitude) by IP address.

License

Notifications You must be signed in to change notification settings

m1g0r/identify-by-ip-2000

Repository files navigation

identify-by-ip-2000

API for get GEO Locations (country, region, city, timezone, latitude/longitude) by IP address. Both IPv4 and IPv6 addresses are supported.

Getting Started

This API includes GeoLite data created by MaxMind, available from http://maxmind.com.

Installing

The project can be run by building the docker contained and then starting it

docker build -t identify-by-ip-2000 .
docker run --rm -d -p 8080:8080 identify-by-ip-2000

or without docker by command:

npm i && npm run start

For update database you should rebuild docker container or run:

npm run dbupdate

Dependencies

Running the tests

To run test use this command:

npm run test

Examples

Make a "GET" request:

Output message example:

{
  "range": [
    597438464,
    597440511
  ],
  "country": "DE",
  "region": "HE",
  "eu": "1",
  "timezone": "Europe/Berlin",
  "city": "Frankfurt am Main",
  "ll": [
    50.1155,
    8.6842
  ],
  "metro": 0,
  "area": 200
}

API documentation

http://127.0.0.1:8080/docs/

About

API for get GEO Locations (country, region, city, timezone, latitude/longitude) by IP address.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published