GetJsonip - Unlimited IP Geolocation API

jsonip is a free unlimited IP address and geolocation API

  • jsonip.com returns a client's IP address (IPv4 or IPv6) in a JSON object.
  • Use JSONP or CORS with jsonip.com so your web application is able to get a user's IP address directly in the browser.
  • Use the API to update dynamic DNS if your IP address has changed.
Need a robust API to Geolocate IPs and fetch other crucial information? Try IPinfo.io. Trusted by over 400,000 users, developers and businesses, IPinfo handle more than 40 billion API requests per month.

API Help

  • Accessing this info on the api

  • Direct requests

    Visit in a browser or make requests to jsonip.com directly.

  • CORS (Cross Origin Resource Sharing)

    To execute CORS requests, the originating request must be sent with the Origin header.
    The api will respond with the "Access-Control-Allow-Origin: *" header.
    Visit https://developer.mozilla.org/en-US/docs/Web/HTTP/CORSto understand how it works.
    The JavaScript Fetch api will do this when "mode: cors" is enabled.

    fetch('https://jsonip.com', { mode: 'cors'} ) .then((resp) => resp.json()) .then((ip) => { console.log(ip); });

  • JSONP

  • IPv4 Only

  • IPv6 Only

    To only get an IPv6 address, make requests to https://ipv6.jsonip.com.
    Most clients that are assigned IPv6 addresses have a fallback IPv4 address.
    However, if the client only has an IPv4 address, they will be unable to connect to https://ipv6.jsonip.com.

  • HTTP Only (No SSL/TLS)

    By default all requests to jsonip.com are secured via https. For example, a request to http://jsonip.com returns a 301 redirect to https://jsonip.com.
    If you need to access the api via http (non-secure), use http://no-tls.jsonip.com.