Go

Official Golang client library for the ipdata API - https://github.com/ipdata/go

Installation

go get github.com/ipdata/go

Basic Usage

package main
import (
"github.com/ipdata/go"
"log"
"fmt"
)
func main() {
ipd, _ := ipdata.NewClient("test")
data, err := ipd.Lookup("8.8.8.8")
if err != nil {
log.Fatalf("%v", err)
}
fmt.Printf("%s (%s)\n", data.IP, data.ASN)
}