Skip to content
/ ip Public

whatismyipaddress.com in just a few lines of code

License

Notifications You must be signed in to change notification settings

wajeht/ip

Folders and files

NameName
Last commit message
Last commit date
May 13, 2024
May 13, 2024
Jun 24, 2024
Feb 27, 2025
Jan 26, 2025
Jun 24, 2024
May 13, 2024
Jun 24, 2024
Jun 24, 2024
Feb 26, 2024
Jan 26, 2025
Jan 26, 2025
Feb 26, 2024
Feb 26, 2024
May 13, 2024
May 13, 2024

Repository files navigation

๐ŸŒŽ Ip

Node.js CI License: MIT Open Source Love svg1

whatismyipaddress.com in just a few lines of code.

๐Ÿ“– Usage

$ curl -s https://ip.jaw.dev/ | jq
$ curl -s https://ip.jaw.dev\?geo\=true | jq

If the IP address was found, the lookup method returns an object with the following structure:

// https://ip.jaw.dev/?geo=true
// https://ip.jaw.dev/?geo=true&json=true
{
   ip: '127.0.0.1',               // ip address
   range: [420, 69],              // <low bound of IP block>, <high bound of IP block>
   country: 'XX',                 // 2 letter ISO-3166-1 country code
   region: 'RR',                  // Up to 3 alphanumeric variable length characters as ISO 3166-2 code
                                  // For US states this is the 2 letter state
                                  // For the United Kingdom this could be ENG as a country like โ€œEngland
                                  // FIPS 10-4 subcountry code
   eu: '0',                       // 1 if the country is a member state of the European Union, 0 otherwise.
   timezone: 'Country/Zone',      // Timezone from IANA Time Zone Database
   city: "City Name",             // This is the full city name
   ll: [420, 69],                 // The latitude and longitude of the city
   metro: 420,                    // Metro code
   area: 69                       // The approximate accuracy radius (km), around the latitude and longitude
}

๐Ÿ“‘ Docs

๐Ÿ“œ License

Distributed under the MIT License ยฉ wajeht. See LICENSE for more information.

About

whatismyipaddress.com in just a few lines of code

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published