Created
January 27, 2024 21:59
-
-
Save SrJSDev/c55bc003a7dfec1ba036cd8990f39692 to your computer and use it in GitHub Desktop.
Simple & Free IP info API
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const geoIP = (ip) => await fetch(`https://ipinfo.io/${ip}/geo`).then(r => r.json()) | |
/* | |
{ | |
"ip": "70.75.208.132", | |
"hostname": "s0106889e6845ba54.lb.shawcable.net", | |
"city": "Lethbridge", | |
"region": "Alberta", | |
"country": "CA", | |
"loc": "49.7000,-112.8186", | |
"org": "AS6327 Shaw Communications Inc.", | |
"postal": "T1H", | |
"timezone": "America/Edmonton", | |
"readme": "https://ipinfo.io/missingauth" | |
} | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment