Official Libraries

For programming languages

We maintain a number of official client libraries for popular programming languages. Using one of our libraries is the easiest way to get setup with our API. They also add some additional functionality, such as including the full country name, and built in support for caching.

LanguageSource codePackage
PHPipinfo/phpPackagist
Pythonipinfo/pythonPyPi
Perlipinfo/perlCPAN
Javaipinfo/javaMaven Central
C#ipinfo/csharpNuget
Rubyipinfo/rubyRuby Gems
Goipinfo/goGitHub
Rustipinfo/rustcrates.io
NodeJSipinfo/nodeNPM package
Erlangipinfo/erlanghex.pm
Swiftipinfo/swiftGitHub

For frameworks

We also maintain some official libraries for popular web frameworks. These offer framework specific middleware so that with just a few lines of code you can get IPinfo data for every visitor to your site. They also include functionality like user agent filtering, so you can reduce your request volumes by not looking up details for bots and spiders.

FrameworkSource codePackage
Expressipinfo/expressNPM package
Djangoipinfo/djangoPyPi
Laravelipinfo/laravelPackagist
Railsipinfo/railsRuby Gems
Springipinfo/springMaven Central

Command Line Interface (CLI)

If you prefer to use our APIs from the command line, we have you covered: try out our IPinfo CLI.

The CLI allows you to look up IP details in bulk or one-by-one, summarize the details of up to 1000 IPs at a time, open a map of IP locations for any set of IPs, filter IPv4 & IPv6 addresses from any input, print out IP lists for any CIDR or IP range, and much more.

See installation instructions for details on how to get setup.

Third party libraries

There are a large number of unofficial IPinfo libraries written by third parties. While these are not maintained by us and haven't been tested by us they can be a great way to get started quickly with IPinfo if you're using a language or framework that we don't have an official library for. Search GitHub for IPinfo libraries.