Ip2Geo is a super-lightweight and type-safe library that allows you to convert any IP to geolocation data, 100% free with unlimited uses—no catch. It works exclusively online and can run on both the client and server.
Importing:
import { getGeoFromIP } from '@minilibs/ip2geo'
// or
import getGeoFromIP from '@minilibs/ip2geo'
Usage:
const geo = await getGeoFromIP('8.8.8.8')
Read more about the Ip2Geo at https://minilibs.com/ip2geo.