IP Geolocation
9 min
ip geolocation api provides real time and accurate geolocation, and security information for any ipv4 or ipv6 address and domain name along with the user agent detail for the provided user agent string you can geolocate your online visitors and provide them the customized user experience accordingly asset setup keep in mind that the ip geolocation api exposes the api token in the url by design this is a security risk as the api token is a secret and can be used to make requests to this paid api it is a public key that is used to identify your account you can use the api token in the url or in the http header the api token is a unique identifier for your account you can find your api token in the https //dashboard ipgeolocation io/ configurations api key authentication authenticates using an api key configuration parameters parameter description type required url a url to the target host string required api key api key string optional verify ssl verify ssl certificate boolean optional http proxy a proxy to route requests through string optional actions ip lookup get information about the ip or domain name endpoint url /ipgeo method get input argument name type required description parameters ip string required parameters for the ip lookup action parameters lang string optional parameters for the ip lookup action parameters fields string optional parameters for the ip lookup action parameters excludes string optional parameters for the ip lookup action parameters include string optional parameters for the ip lookup action input example {"parameters" {"ip" "8 8 8 8","lang" "en","fields" "country,city","excludes" "continent,location","include" "security,livehostname"}} output parameter type description status code number http status code of the response reason string response reason phrase ip string output field ip continent code string output field continent code continent name string name of the resource country code2 string output field country code2 country code3 string output field country code3 country name string name of the resource country capital string output field country capital state prov string output field state prov district string output field district city string output field city zipcode string output field zipcode latitude string output field latitude longitude string output field longitude is eu boolean output field is eu calling code string output field calling code country tld string output field country tld languages string output field languages country flag string output field country flag geoname id string unique identifier isp string output field isp connection type string type of the resource organization string output field organization currency object output field currency output example {"status code" 200,"response headers" {"date" "sat, 04 mar 2023 23 37 52 gmt","content type" "application/json;charset=utf 8","transfer encoding" "chunked","connection" "keep alive","x application context" "application\ production 8002","cf cache status" "dynamic","strict transport security" "max age=31536000; includesubdomains; preload","server" "cloudflare","cf ray" "7a2df315bf01d2cc eze","content encoding" "gzip","alt svc" "h3=\\" 443\\"; ma=86400, h3 29=\\" 443\\"; ma=86400"},"reason" "ok","json response headers header description example alt svc http response header alt svc h3=" 443 "; ma=86400, h3 29=" 443 "; ma=86400 cf cache status http response header cf cache status dynamic cf ray http response header cf ray 7a2df315bf01d2cc eze connection http response header connection keep alive content encoding http response header content encoding gzip content type the media type of the resource application/json;charset=utf 8 date the date and time at which the message was originated sat, 04 mar 2023 23 37 52 gmt server information about the software used by the origin server cloudflare strict transport security http response header strict transport security max age=31536000; includesubdomains; preload transfer encoding http response header transfer encoding chunked x application context http response header x application context application\ production 8002