# ip-location-db [![NPM version](https://badge.fury.io/js/ip-location-db.svg)](https://badge.fury.io/js/ip-location-db)

This project provides ip to location database in csv. Currently, ip to country is supported, only.<br>
CSV Format: `ip_range_start, ip_range_end, country_code`<br>
`country_code` is the two-letter code defined in [ISO 3166-1 alpha-2](https://wikipedia.org/wiki/ISO_3166-1_alpha-2), to represent countries, dependent territories and special areas.



## IP-ASN database [Update: daily, License: [Public Domain (CC0)](https://creativecommons.org/publicdomain/mark/1.0/)]

Created by merging 5 RIP ([afrinic](https://afrinic.net), [apnic](https://www.apnic.net), [arin](https://www.arin.net), [lacnic](https://www.lacnic.net), [ripe ncc](https://www.ripe.net)) provided IP-ASN database.

- [asn-ipv4-country.csv](https://raw.githubusercontent.com/sapics/ip-location-db/master/dist/asn-ipv4-country.csv)
- [asn-ipv4-country-num.csv](https://raw.githubusercontent.com/sapics/ip-location-db/master/dist/asn-ipv4-country-num.csv)
- [asn-ipv6-country.csv](https://raw.githubusercontent.com/sapics/ip-location-db/master/dist/asn-ipv6-country.csv)
- [asn-ipv6-country-num.csv](https://raw.githubusercontent.com/sapics/ip-location-db/master/dist/asn-ipv6-country-num.csv)



## IP-ASN + GeoFeed database [Update: daily, License: [Public Domain (CC0)](https://creativecommons.org/publicdomain/mark/1.0/)]

Created by merging GeoFeed database from [OpenGeoFeed](https://opengeofeed.org/) and [geofeeds.lacnic.net](https://geofeeds.lacnic.net/) to IP-ASN database.
Currently, GeoFeed database is small database, thus, it is almost same as IP-ASN database.
When GeoFeed database grow up, this database could add more information (city, geo-location,,,) and get more accuracy.

- [asn-geo-ipv4-country.csv](https://raw.githubusercontent.com/sapics/ip-location-db/master/dist/asn-geo-ipv4-country.csv)
- [asn-geo-ipv4-country-num.csv](https://raw.githubusercontent.com/sapics/ip-location-db/master/dist/asn-geo-ipv4-country-num.csv)
- [asn-geo-ipv6-country.csv](https://raw.githubusercontent.com/sapics/ip-location-db/master/dist/asn-geo-ipv6-country.csv)
- [asn-geo-ipv6-country-num.csv](https://raw.githubusercontent.com/sapics/ip-location-db/master/dist/asn-geo-ipv6-country-num.csv)



## License

Files in `dist/*` have their **own license** as described above.<br>
Files other than `dist/*` are under MIT License.<br>
When you write the attribution to this project, I am glad if you make a link to [sapics/ip-location-db](https://github.com/sapics/ip-location-db).
