Skip to main content
This function allows you to convert a single IP address into its corresponding geolocation data using, se an example below:
You should authenticate/initialize Ip2Geo before using this method.
import { ConvertIP } from '@ip2geo/sdk'

const ipAddress = '8.8.8.8'

const { data, success, message } = await ConvertIP({
    ip: ipAddress
})
Make sure to explore the interfaces to understand the structure of the response and its geolocation data.You can find more details in the Ip Interface and Response Interface.