To the Top

What is my IP address? (IP Address Lookup via Remote Server APIs)

Buy Me A Coffee

Your IPv4 is: 3.234.232.55

This page provides an API to get the IPv4 address/IP Address Lookup.

Your IPv4 will be printed above and can be obtained via the following API. An IPv4 is a 4 byte which contains 4 numbers from 0 to 255 and is separated by the delimiter symbol 'dot'. For further information, you can use this online tool to analyze the IPv4 addresses range.

Chrome Extension

We have also provided a handy Chrome Extension (Available at Chrome Web Store) to show both the local and external (public) IP addresses (IPv4 and IPv6) based on the API servers. This Chrome Extension also stores your previous external IP Addresses for your references. You can click to copy the addresses to Clipboard.

Chrome Extension - Show IP Addresses Both Local and External

The source code for this chrome extension is avaiable at github

The API (Application Programming Interface)

The following API lives in the CloudFlare Edge Network - Serverless API:

https://what-is-my-ip.functionapi.workers.dev/
It will return JSON-encoded data (example):
"90.152.1.211"

CloudFlare Serverless API to Return the IP

The above API has been implemented in CloudFlare Serverless Worker, the source code is as follows where we use the CF-Connecting-IP header which is set by CloudFlare:

addEventListener('fetch', event => {
  event.respondWith(handleRequest(event.request))
})

/**
 * Respond to the request
 * @param {Request} request
 */
async function handleRequest(request) {
  const ip = request.headers.get("CF-Connecting-IP");
  let res = new Response(JSON.stringify(ip), {
    status: 200
  });
  res.headers.set('Content-Type', 'application/json');
  res.headers.set('Cache-Control', 'max-age=3');
  res.headers.set('Access-Control-Allow-Origin', '*');  
  return res;
}

Share: List of Many Other Online Tools