2.3.2024032718 • Published 1 day ago

@ip-location-db/geolite2-city v2.3.2024032718

Weekly downloads
248
License
SEE LICENSE IN GE...
Repository
github
Last release
1 day ago

ip-location-db/geolite2-city

DatabaseTypeLicenseUpdateipv4ipv6ipv4-numipv6-num
ASN npm versionCountryCC0Dailyasn-country-ipv4.csvasn-country-ipv6.csvasn-country-ipv4-num.csvasn-country-ipv6-num.csv
GeoFeed + ASNnpm versionCountryCC0Dailygeo-asn-country-ipv4.csvgeo-asn-country-ipv6.csvgeo-asn-country-ipv4-num.csvgeo-asn-country-ipv6-num.csv
GeoFeed + Whois + ASNnpm versionCountryCC0Dailygeo-whois-asn-country-ipv4.csvgeo-whois-asn-country-ipv6.csvgeo-whois-asn-country-ipv4-num.csvgeo-whois-asn-country-ipv6-num.csv
RouteViews + ASN + DB-IPnpm versionASNCC BY 4.0 by RouteViews and DB-IPDailyasn-ipv4.csvasn-ipv6.csvasn-ipv4-num.csvasn-ipv6-num.csv
IPtoASNnpm versionASNPDDL by IPtoASNDailyiptoasn-asn-ipv4.csviptoasn-asn-ipv6.csviptoasn-asn-ipv4-num.csviptoasn-asn-ipv6-num.csv
IPtoASNnpm versionCountryPDDL by IPtoASNDailyiptoasn-country-ipv4.csviptoasn-country-ipv6.csviptoasn-country-ipv4-num.csviptoasn-country-ipv6-num.csv<!--Webnet77npm versionCountryDonationware by Webnet77Dailywebnet77-country-ipv4.csvwebnet77-country-ipv6.csvwebnet77-country-ipv4-num.csvwebnet77-country-ipv6-num.csv-->
DB-IP Litenpm versionASNCC BY 4.0 by DB-IPMonthlydbip-asn-ipv4.csvdbip-asn-ipv6.csvdbip-asn-ipv4-num.csvdbip-asn-ipv6-num.csv
DB-IP Litenpm versionCountryCC BY 4.0 by DB-IPMonthlydbip-country-ipv4.csvdbip-country-ipv6.csvdbip-country-ipv4-num.csvdbip-country-ipv6-num.csv
DB-IP Litenpm versionnpm versionCityCC BY 4.0 by DB-IPMonthlydbip-city-ipv4.csv.gzdbip-city-ipv4.csv.7zdbip-city-ipv6.csv.gzdbip-city-ipv6.csv.7zdbip-city-ipv4-num.csv.gzdbip-city-ipv4-num.csv.7zdbip-city-ipv6-num.csv.gzdbip-city-ipv6-num.csv.7z
GeoLite2npm versionASNGeoLite2 License by MaxMindTwice weeklygeolite2-asn-ipv4.csvgeolite2-asn-ipv6.csvgeolite2-asn-ipv4-num.csvgeolite2-asn-ipv6-num.csv
GeoLite2npm versionCountryGeoLite2 License by MaxMindTwice weeklygeolite2-country-ipv4.csvgeolite2-country-ipv6.csvgeolite2-country-ipv4-num.csvgeolite2-country-ipv6-num.csv
GeoLite2npm versionnpm versionCityGeoLite2 License by MaxMindTwice weeklygeolite2-city-ipv4.csv.gzgeolite2-city-ipv4.csv.7zgeolite2-city-ipv6.csv.gzgeolite2-city-ipv6.csv.7zgeolite2-city-ipv4-num.csv.gzgeolite2-city-ipv4-num.csv.7zgeolite2-city-ipv6-num.csv.gzgeolite2-city-ipv6-num.csv.7z

CSV format

This project provides ip to location database in csv format. If you need MMDB format, please use mmdbmeld.

ASN csv format

ip_range_start, ip_range_end, as_number, as_organization

Country csv format

ip_range_start, ip_range_end, country_code

City csv format

ip_range_start, ip_range_end, country_code, state1, state2, city, postcode, latitude, longitude, timezone

as_number

as_number is a unique number assigned to an Autonomous System (AS) by the IANA. wiki.

country_code

country_code is the two-letter code defined in ISO 3166-1 alpha-2. You can get the country name, capital, continent, currency, languages, etc. from the country_code by Countries Database in JSON, CSV, SQL format.

ip address format

ip_range_start and ip_range_end is ip address.

  • ipv4: The csv line 1.0.0.0,1.0.0.255,AU means that ip addresses between 1.0.0.0 and 1.0.0.255 inclusive are AU country_code.
  • ipv4-num: The csv line 16777216,16777471,AU means that ip addresses between 1.0.0.0 and 1.0.0.255 inclusive are AU country_code. (16777216 is the number format of the ip address 1.0.0.0)
  • ipv6: The csv line 2001:200::,2001:200:ffff:ffff:ffff:ffff:ffff:ffff,JP means that ip addresses between 2001:200:: and 2001:200:ffff:ffff:ffff:ffff:ffff:ffff inclusive are JP country_code.
  • ipv6-num: The csv line 42540528726795050063891204319802818560,42540528806023212578155541913346768895,JP means that ip addresses between 2001:200:: and 2001:200:ffff:ffff:ffff:ffff:ffff:ffff inclusive are JP country_code. (42540528726795050063891204319802818560 is the number format of the ip address 2001:200::)

Please be careful when using ipv6 and ipv6-num in your program. The numerical value exceeds 32bit unsigned integer, you would need to use a 128bit unsigned integer.

Databases referenced in this project

When merging multiple database, set the front database above back one. (ex. geo-whois-asn-...csv is created by merging 3 database with GeoFeed > Whois > ASN.)

ASN database Update: Daily

Created by merging 5 RIP (afrinic, apnic, arin, lacnic, ripe ncc) IP-ASN-Country database. ASN (Autonomous System Number) is a unique number assigned to an Autonomous System (AS) by the IANA.

GeoFeed database Update: Daily

Created by merging GeoFeed database from OpenGeoFeed.

Whois database Update: Daily

Created by merging 5 RIP provided WHOIS database. There are some inconsistencies between 5 RIP.

RouteViews database Update: every 2 hours

We are using this database to get AS number from ipv4 address for asn. This is licensed under a CC BY 4.0, so, you must create attribution to RouteViews for using asn database.

IPtoASN database Update: Hourly

You can download hourly updated database in tsv format from original site. This is licensed under a Public Domain Dedication and Licence v1.0. There are some differences from above ASN database.

DB-IP database Update: Monthly

You could download and read the license from ip-to-asn-lite or ip-to-country-lite or ip-to-city-lite. Most of the AS Organization name used in asn uses ip-to-asn-lite database. We also use ip-to-asn-lite to get AS Number from ip address as a supplemental.

These database are licensed under a CC BY 4.0, so, you must create attribution to DB-IP.com for using DB-IP database. In the case of a web application, you must include a link back to DB-IP.com on pages that display or use results from the database. You may do it by pasting the HTML code snippet into your code: <a href='https://db-ip.com/'>IP Geolocation by DB-IP</a>. If you need better accuracy or no attribution or daily updates, please use the Commercial Version of db-ip.

GeoLite2 database Update: Twice weekly

GeoLite2 is created by MaxMind. The license of GeoLite2 is written in GEOLITE2_LICENSE and End User License Agreement (EULA) is written in GEOLITE2_EULA. Please carefully read the GEOLITE2_LICENSE and GEOLITE2_EULA files, if you use these database. This package comes with certain restrictions and obligations, most notably:

  • You cannot prevent the library from updating the databases.
  • You cannot use the GeoLite2 data:
    • for FCRA purposes,
    • to identify specific households or individuals.

You can read the latest version of GeoLite2 EULA. GeoLite2 databse is provided under CC BY-SA 4.0 by MaxMind, so, you must create attribution to MaxMind for using GeoLite2 database. If you need better accuracy, please use the commercial version GeoIp2.

Which database is recommended to use?

Of course, it depends on your use case. But the above list is too long, thus, we write down the recommendation.

  • If you need postcode or timezone, geolite2-city is the one.
  • If you need city data with CC-BY License, dbip-city is the one.
  • If you need country database with Public Domain, we recommend geo-whois-asn-country database.
  • If you need asn database, we recommend asn database.

Libraries to use database

We can use libraries in many languages by using mmdb format. Some of them are distributed in HostByBelle/IP-Geolocation-DB and we can convert csv to mmdb by safing/mmdbmeld. For example, we can use maxmind developed libraries which are written in python, PHP, perl, ruby, .net, C, java, .net, and so on.

Tools & Applications

Here is a list of tools and applications that can work with these databases:

  • safing/mmdbmeld: Create and customize MMDB file from this database.
  • realchandan/Ip-geo-API: Go written HTTP server for IPv4 and IPv6 lookups.
  • EP-u-NW/ip_location_server: A GRPC and HTTP server mapping IP addresses to locations. Supports IPv4 and IPv6 and automatic dataset updates.
  • IPInfoOffline: Allows you to view information about IP addresses, without connecting any external server.

If you know some more, feel free to append it to the list and open a pull request.

License

License depends on the database which you use. Please read carefully each database license. You can use PDDL (ODC Public Domain Dedication and Licence) or CC0 (Creative Commons Zero) licensed database without attribution for any purpose.

We are glad if you make a link to sapics/ip-location-db, or give us a star to the github repository.

2.3.2024031918

9 days ago

2.3.2024032318

5 days ago

2.3.2024031618

12 days ago

2.3.2024031318

15 days ago

2.3.2024030918

19 days ago

2.3.2024030518

23 days ago

2.3.2024030119

27 days ago

2.3.2024022819

29 days ago

2.3.2024022419

1 month ago

2.3.2024022119

1 month ago

2.3.2024021619

1 month ago

2.3.2024021319

1 month ago

2.3.2024021018

2 months ago

2.3.2024020719

2 months ago

2.3.2024020318

2 months ago

2.3.2024013019

2 months ago

2.3.2024012619

2 months ago

2.3.2024012418

2 months ago

2.3.2024012019

2 months ago

2.3.2024011718

2 months ago

2.3.2024011319

3 months ago

2.3.2024011019

3 months ago

2.3.2024010618

3 months ago

2.3.2024010219

3 months ago

2.3.2023122919

3 months ago

2.3.2023122219

3 months ago

2.3.2023121919

3 months ago

2.3.2023121619

3 months ago

2.3.2023121319

4 months ago

2.3.2023120919

4 months ago

2.3.2023120619

4 months ago

2.3.2023101619

5 months ago

2.3.2023120119

4 months ago

2.3.2023091518

7 months ago

2.3.2023110319

5 months ago

2.3.2023083119

7 months ago

2.3.2023111519

4 months ago

2.3.2023080419

8 months ago

2.3.2023102018

5 months ago

2.3.2023072118

8 months ago

2.3.2023081518

8 months ago

2.3.2023102818

5 months ago

2.3.2023100519

6 months ago

2.3.2023103119

5 months ago

2.3.2023082219

7 months ago

2.3.2023112419

4 months ago

2.3.2023102519

5 months ago

2.3.2023082919

7 months ago

2.3.2023111118

5 months ago

2.3.2023110819

5 months ago

2.3.2023100319

6 months ago

2.3.2023092618

6 months ago

2.3.2023080919

8 months ago

2.3.2023082419

7 months ago

2.3.2023091918

6 months ago

2.3.2023072618

8 months ago

2.3.2023112218

4 months ago

2.3.2023090819

7 months ago

2.3.2023111919

4 months ago

2.3.2023063019

9 months ago

2.3.2023091219

7 months ago

2.3.2023112918

4 months ago

2.3.2023081919

7 months ago

2.3.2023081119

8 months ago

2.3.2023101219

6 months ago

2.3.2023071319

9 months ago

2.3.2023120318

4 months ago

2.3.2023072819

8 months ago

2.3.2023092918

6 months ago

2.3.2023090618

7 months ago

2.3.2023092119

6 months ago

2.3.2023073119

8 months ago

2.3.2023111719

4 months ago

2.3.2023070418

9 months ago

2.3.2023101018

6 months ago

2.3.2023062318

9 months ago

2.3.2023062718

9 months ago

2.3.2023060918

10 months ago

2.3.2023050218

11 months ago

2.3.2023053118

10 months ago

2.3.2023051619

11 months ago

2.3.2023061319

10 months ago

2.3.2023053018

10 months ago

2.3.2023050418

11 months ago

2.3.2023061619

10 months ago

2.3.2023051818

11 months ago

2.3.2023050918

11 months ago

2.3.2023060618

10 months ago

2.3.2023062118

9 months ago

2.3.2023052319

10 months ago

2.3.2023040418

12 months ago

2.3.2023042718

11 months ago

2.3.2023041118

12 months ago

2.3.2023041918

11 months ago

2.3.2023042019

11 months ago

2.3.2023022818

1 year ago

2.3.2023032118

1 year ago

2.3.2023031418

1 year ago

2.3.2023030818

1 year ago

2.3.2023042618

11 months ago

2.3.2023032818

1 year ago

2.3.2023031618

1 year ago

2.3.2023021518

1 year ago

2.3.2023022218

1 year ago

2.3.2023020818

1 year ago

2.3.2023020118

1 year ago

2.3.2023012518

1 year ago

2.3.2022110918

1 year ago

2.3.2023011818

1 year ago

2.3.2022120718

1 year ago

2.3.2022122118

1 year ago

2.3.2022121418

1 year ago

2.3.2022113018

1 year ago

2.3.2022111618

1 year ago

2.3.2023011118

1 year ago

2.3.2023010418

1 year ago

2.3.2022112318

1 year ago

2.3.2022111018

1 year ago

2.3.2023011218

1 year ago

2.3.2022122818

1 year ago

2.3.2023010518

1 year ago

2.3.2022102718

1 year ago

2.3.2022110219

1 year ago

2.3.2022101919

1 year ago

2.3.2022102618

1 year ago

2.3.2022100618

1 year ago

2.3.2022101318

1 year ago

2.3.2022110319

1 year ago

2.3.2022100518

1 year ago

2.3.2022101219

1 year ago

2.3.2022102019

1 year ago

2.3.2022091418

2 years ago

2.3.2022083118

2 years ago

2.3.2022092218

2 years ago

2.3.2022090718

2 years ago

2.3.2022082418

2 years ago

2.3.2022091518

2 years ago

2.3.2022082518

2 years ago

2.3.2022092818

1 year ago

2.3.2022092118

2 years ago

2.3.2022092918

1 year ago

2.3.2022072118

2 years ago

2.3.2022070618

2 years ago

2.3.2022062318

2 years ago

2.3.2022063018

2 years ago

2.3.2022071318

2 years ago

2.3.2022061518

2 years ago

2.3.2022072018

2 years ago

2.3.2022072818

2 years ago

2.3.2022062218

2 years ago

2.3.2022081718

2 years ago

2.3.2022062918

2 years ago

2.3.2022072718

2 years ago

2.3.2022081018

2 years ago

2.3.2022080319

2 years ago

2.3.2022081118

2 years ago

2.3.2022071418

2 years ago

2.3.2022061618

2 years ago

2.3.2022080418

2 years ago

2.3.2022060818

2 years ago

2.3.2022060219

2 years ago

2.3.2022060118

2 years ago

2.2.2022032318

2 years ago

2.2.2022033019

2 years ago

2.2.2022030918

2 years ago

2.2.2022030219

2 years ago

2.2.2022031618

2 years ago

2.2.2022011918

2 years ago

2.2.2022012618

2 years ago

2.2.2022021618

2 years ago

2.2.2022020918

2 years ago

2.2.2021122918

2 years ago

2.2.2022020219

2 years ago

2.2.2022010518

2 years ago

2.2.2022011218

2 years ago

2.2.2021112418

2 years ago

2.2.2021121518

2 years ago

2.2.2021122218

2 years ago

2.2.2021111718

2 years ago

2.2.2021120818

2 years ago

2.2.2021120119

2 years ago

2.2.2021111018

2 years ago

2.2.2021102718

2 years ago

2.2.2021110319

2 years ago

2.2.2021100618

2 years ago

2.2.2021101318

2 years ago

2.2.2021102018

2 years ago

2.2.2021093018

2 years ago

2.2.2021092218

3 years ago

2.2.2021091518

3 years ago

2.2.2021090818

3 years ago

2.2.2021090118

3 years ago

2.2.2021082518

3 years ago

2.2.2021081818

3 years ago

2.2.2021081118

3 years ago

2.2.2021080518

3 years ago

2.2.2021072818

3 years ago

2.2.2021072118

3 years ago

2.2.2021071418

3 years ago

2.2.2021070718

3 years ago

2.2.2021063018

3 years ago

2.2.2021062318

3 years ago

2.2.2021061618

3 years ago

2.2.2021060919

3 years ago

2.2.2021052619

3 years ago

2.2.2021060221

3 years ago

2.2.2021050518

3 years ago

2.2.2021042118

3 years ago

2.2.2021051919

3 years ago

2.2.2021042818

3 years ago

2.2.2021051218

3 years ago

2.2.2021041418

3 years ago

2.2.2021040718

3 years ago

2.2.2021033118

3 years ago

2.2.2021032518

3 years ago

2.2.2021031718

3 years ago

2.2.2021031018

3 years ago

2.2.2021030319

3 years ago

2.2.2021022418

3 years ago

2.2.2021021818

3 years ago

2.2.2021021018

3 years ago

2.2.2021020319

3 years ago

2.2.2021012718

3 years ago

2.2.2021012019

3 years ago

2.2.2021011319

3 years ago

2.2.2021010619

3 years ago

2.2.2020123019

3 years ago

2.2.2020122318

3 years ago

2.2.2020121618

3 years ago

2.2.2020121018

3 years ago

2.2.2020120218

3 years ago

2.2.2020112518

3 years ago

2.2.2020111818

3 years ago

2.2.2020111118

3 years ago

2.2.2020110418

3 years ago

2.2.2020102818

3 years ago

2.2.2020102118

3 years ago

2.2.2020101418

3 years ago

2.2.2020100718

3 years ago

2.2.2020092319

4 years ago

2.2.2020091618

4 years ago

2.2.2020090918

4 years ago

2.2.2020090219

4 years ago

2.2.2020082618

4 years ago

2.2.2020081918

4 years ago

2.2.2020081218

4 years ago

2.2.2020080519

4 years ago

2.2.2020072918

4 years ago

2.2.2020072218

4 years ago

2.2.2020071518

4 years ago

2.2.20200708

4 years ago

2.1.20200701

4 years ago

2.1.20200617

4 years ago

2.1.20200610

4 years ago

2.1.20200603

4 years ago

2.1.20200527

4 years ago

2.1.20200520

4 years ago

2.1.20200513

4 years ago

2.1.20200506

4 years ago

2.1.20200429

4 years ago

2.1.20200422

4 years ago

2.1.20200415

4 years ago

2.1.20200408

4 years ago

2.1.20200325

4 years ago

2.1.20200318

4 years ago

2.1.20200311

4 years ago

2.1.20200304

4 years ago

2.1.20200226

4 years ago

2.1.20200212

4 years ago

2.1.20200205

4 years ago

2.1.20200131

4 years ago

2.0.20200127

4 years ago