DEV Community

Sh Raj
Sh Raj

Posted on • Updated on

ipify - GET User IP API - Free

Title: Grab That 🌐 IP Address with ipify - It's Free and Easy!

What's ipify?
Alright, so you wanna know where those peeps accessing your site are coming from, right? Enter ipify! It's this cool little thing on the web that hooks you up with the IP address of whoever's knocking at your digital door. And guess what? It's totally free! πŸ†“

How Does This Magic Work?
No rocket science here, folks. You just shoot a simple HTTP GET request to ipify's endpoint, and boom, you get back a neat JSON with the IP address. It's like texting your buddy and getting an instant reply. Quick, easy, and hassle-free. πŸš€

Features That Make You Go Wow:

  1. So Freakin' Easy: Seriously, even your grandma could use it. Just hit up that endpoint, and you're golden.
  2. Rock-Solid Reliable: ipify's got your back 24/7. It's like that friend who never ghosts you.
  3. Locked Tight: Security's a big deal, right? Well, ipify's got it covered. Your data's safe and sound.
  4. Zero πŸ’° Down: Yup, you heard that right. It won't cost you a dime. Nada. Zilch. Free as in free beer.

How to Get in on the Action:
Ready to roll? Here's all you gotta do. Fire off an HTTP GET request to this sweet endpoint:
Enter fullscreen mode Exit fullscreen mode

And voila! You'll get back a JSON response with the IP address you're after. Easy peasy, lemon squeezy. πŸ‹

  "ip": ""
Enter fullscreen mode Exit fullscreen mode

JavaScript Fetch Example to get the IP

let ip = await fetch('');
ip = await ip.json();
console.log('USER IP :- ' + ip.ip)
Enter fullscreen mode Exit fullscreen mode

Cool Things You Can Do:

  1. Spy on Your Visitors: Okay, maybe not spy, but you can definitely see where they're coming from. Useful for analytics and all that jazz.
  2. Beef Up Security: Keep the bad guys out by logging and monitoring IPs. Safety first, right?
  3. Personalize Your Stuff: Tailor your content based on where your peeps are at. It's like giving them a virtual high-five from their hometown!
  4. Network Wizardry: Make network admin stuff a breeze by automating IP address shenanigans.

The Bottom Line:
ipify is your go-to for snagging those juicy IP addresses without breaking a sweat. Whether you're a coding ninja or just dipping your toes into the tech waters, ipify has your back. So why wait? Give it a whirl and see for yourself. Your digital detective journey starts here! πŸ•΅οΈβ€β™‚οΈ

Enter fullscreen mode Exit fullscreen mode


Enter fullscreen mode Exit fullscreen mode

Top comments (1)

himapro profile image
Ibrahim Mohamed

Just take a look at it gives you more informations with an out of the box custom fields to specify which info you need, also it gives you info for a specific IP !

I usually use it in php like this:

ini_set("display_errors", false);
header("Access-Control-Allow-Origin: *");
header("Content-Type: application/json");
$ip = isset($_GET["ip"]) ? $_GET["ip"] : $_SERVER["HTTP_X_FORWARDED_FOR"];
echo file_get_contents("$ip?fields=11788607");
Enter fullscreen mode Exit fullscreen mode