The IP address location API from Kloudend now has the ability to let you find the hostname (a domain name assigned to a host computer) from an IP Address.

The feature is currently in beta, please contact us to enable it for your subscription.

You can perform the IP address…

Search keyword to lookup IP address in your browser

Chrome

  • Visit chrome://settings/searchEngines in your address bar
  • Click Add button and enter the details as below. You can change the keyword (shortcut) to invoke the search from ip to a keyword of your choice.
ipapi — Chrome IP Lookup Shortcut
  • In your address bar, type ip followed by a space followed by the IP address you wish to search and press enter

A REST API to get currency code automatically for your website/app users

If you have a website with international customers and you wish to display your product prices in their local currency, the first step would be to automatically determine their currency code.

Here’s an easy to use API that’ll…

Make an HTTP(S) request to a JSON API in golang

package mainimport (
“fmt”
“io/ioutil”
“log”
“net/http”
)
func main() { ipapiClient := http.Client{}
req, err := http.NewRequest(“GET”, “https://ipapi.co/json/", nil)
if err != nil {
log.Fatal(err)
}
req.Header.Set(“User-Agent”, “ipapi.co/#go-v1.3”)
resp, err := ipapiClient.Do(req)
if err != nil {
log.Fatal(err)
}
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
log.Fatal(err)
}
fmt.Println(string(body))
}

Try it live : https://repl.it/@ipapi/IP-Location-in-Go

With live examples on Codepen

We are adding an example of React Native + fetch API to get the location of an IP address. The fetch API is similar to XMLHttpRequest, used for Ajax methods. Here’s a simple example that makes a request to ipapi :

fetch('https://ipapi.co/json/');

The method makes it very easy to populate location data in your website or app asynchronously. We’ll expand the example by adding the capability to handle the response received by the above request :

fetch(‘https://ipapi.co/json/')
.then(response => response.json())
.then(data =>
this.setState({
location: data,
isLoading: false,
})
)

Once we receive the JSON response, the next step is to render it. Here’s a working example on Codepen to play around with :

https://codepen.io/ipapi/pen/oNXbpwO

Codepen — IP Address Location in React Native
Github Gist — IP Location using Fetch API in React Native

ipapi ~ ipapi.co

IP Lookup | IP Geolocation API | IP Address Locator by Kloudend, Inc. USA. Trusted by Fortune 500 !

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store