https://github.com/andsala/geoip
IP geolocation with ipdata.co
https://github.com/andsala/geoip
golang ip ipdata
Last synced: 3 months ago
JSON representation
IP geolocation with ipdata.co
- Host: GitHub
- URL: https://github.com/andsala/geoip
- Owner: andsala
- License: mit
- Created: 2017-12-11T10:29:45.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2019-09-09T17:40:26.000Z (over 6 years ago)
- Last Synced: 2024-06-20T13:39:08.643Z (almost 2 years ago)
- Topics: golang, ip, ipdata
- Language: Go
- Size: 25.4 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# geoip - IP geolocation with ipdata.co
[](https://travis-ci.org/andsala/geoip)
[](https://goreportcard.com/report/github.com/andsala/geoip)
[](https://codecov.io/gh/andsala/geoip)
[](https://godoc.org/github.com/andsala/geoip/ipdata)
# Installation
```sh
go get -u github.com/andsala/geoip
```
# Usage
```sh
$ geoip 8.8.8.8
IP: 8.8.8.8
United States (US)
North America (NA)
Coordinates: 37.751, -97.822
Flag: πΊπΈ
Time zone: America/Chicago, GMT-0500 (CDT)
Currency: US Dollar (USD, $)
Languages: English
Calling code: +1
Organization: Google LLC (google.com)
AS number: AS15169
Threat: None
```
## Options
```
--api-key value, -a value ipdata.co api key [$GEOIP_API_KEY]
--ip-only, --ip Print current public IP and exit
--json, -j Print pure json
--no-color Disable color and emoji output [$NO_COLOR] (http://no-color.org)
--user-agent value, -u value HTTP user agent [$GEOIP_USER_AGENT]
--help, -h show help
--version, -v print the version
```
# License
This project is distributed under the [MIT License](https://github.com/andsala/geoip/blob/master/LICENSE).