Callback
This API supports JSONP Callbacks which enables you to specify the function name you want and the response will be wrapped inside the function name you specified. To do that, pass the callback parameter to the request with the name of the function you will use. Please check out the following example:
https://gregeoip.com/GeoIP?key=12345&callback=myFunctionName
Response:
myFunctionName({
"status": "success",
"data": {
"ip": "68.235.60.237",
"ipType": "ipv4",
"IPNumber": 1156267245,
"continentName": "North America"
"continentCode": "NA",
"countryCode": "US",
"countryName": "United States of America"
"regionName": "Illinois",
"cityName": "Chicago",
"zipCode": "60605",
"latitude": 41.8672,
"longitude": -87.6259
}
});
get
https://gregeoip.com
/GeoIP
Request with a Callback response
Copy link