API

Looking up an IP address

If you have an IP address in dotted quad notation, IPv6 colon notation, or a 32 bit unsigned integer (treated
as an IPv4 address), pass it to the lookup method. Note that you should remove any [ and ] around an
IPv6 address before passing it to this method.

var geo =geoip.lookup(ip);

If the IP address was found, the lookup method returns an object with the following structure: