Skip to content
Switch branches/tags

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time
May 23, 2022
Oct 19, 2018

IPinfo IPinfo Go Client Library

License Go Reference

This is the official Go client library for the IP address API, allowing you to lookup your own IP address, or get any of the following details for other IP addresses:

  • IP to Geolocation (city, region, country, postal code, latitude and longitude)
  • IP to ASN (ISP or network operator, associated domain name, and type, such as business, hosting or company)
  • IP to Company (the name and domain of the business that uses the IP address)
  • IP to Carrier (the name of the mobile carrier and MNC and MCC for that carrier if the IP is used exclusively for mobile traffic)

Check all the data we have for your IP address here.

Getting Started

You'll need an IPinfo API access token, which you can get by singing up for a free account at

The free plan is limited to 50,000 requests per month, and doesn't include some of the data fields such as IP type and company data. To enable all the data fields and additional request volumes see


go get

Quick Start

package main

import (


func main() {
	// Get access token by signing up a free account at
	client := ipinfo.NewClient(nil, nil, "MY_TOKEN")
	info, err := client.GetIPInfo(net.ParseIP(""))
	if err != nil {

Other Libraries

There are official IPinfo client libraries available for many languages including PHP, Python, Go, Java, Ruby, and many popular frameworks such as Django, Rails and Laravel. There are also many third party libraries and integrations available for our API.

About IPinfo

Founded in 2013, IPinfo prides itself on being the most reliable, accurate, and in-depth source of IP address data available anywhere. We process terabytes of data to produce our custom IP geolocation, company, carrier, VPN detection, hosted domains, and IP type data sets. Our API handles over 40 billion requests a month for 100,000 businesses and developers.