An open API service indexing awesome lists of open source software.

https://github.com/ammario/ipisp

Query IP address network information in Go
https://github.com/ammario/ipisp

asn asn-service ip-address network-analysis networking scanning security team-cymru whois

Last synced: 6 months ago
JSON representation

Query IP address network information in Go

Awesome Lists containing this project

README

          

# ipisp
[![GoDoc](https://godoc.org/github.com/golang/gddo?status.svg)](https://godoc.org/github.com/ammario/ipisp/v2)

ipisp provides a Go client for [Team Cymru's](http://www.team-cymru.org/IP-ASN-mapping.html) 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

```go
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
```