Skip to main content
This function allows you to convert a single IP address into its corresponding geolocation data using, see an example below:
You should authenticate/initialize Ip2Geo before using this method.

Parameters

string
required
The IPv4 or IPv6 address to convert.

Response

boolean
Whether the request was successful.
string
Response message describing the result.
number
HTTP status code.
Ip | null
The geolocation data for the IP address. See Ip Interface for details. Returns null if the conversion failed, read more about IP Response Interface.
object
Request metadata containing:
  • reqId: Unique request identifier.
  • resTime: Response time in milliseconds.