Skip to content

Latest commit

 

History

History
29 lines (24 loc) · 724 Bytes

README.md

File metadata and controls

29 lines (24 loc) · 724 Bytes

ipisp

GoDoc

ipisp provides a Go client for Team Cymru's IP-ASN mapping service. Basically, this library allows you to query an IP address' ISP and allocation information.

go get github.com/ammario/ipisp/v2

Features

  • 0 external dependencies
  • Bulk and single lookups
  • Query ISP name, ASN, country, registry and CIDR range

Basic usage

Running

resp, err := ipisp.LookupIP(context.Background(), net.ParseIP("4.2.2.2"))
if err != nil {
    log.Fatalf("lookup: %v", err)
}
fmt.Printf("ISP: %s\n", resp.ISPName)

displays

ISP: LEVEL3, US