mmdb-server icon indicating copy to clipboard operation
mmdb-server copied to clipboard

Feature request: Support IPinfo database

Open abdullahdevrel opened this issue 1 year ago • 1 comments

I work for IPinfo and we also provide our databases in MMDB format. I believe that our data can support the project.

I would like to request to add support for IPinfo's IP to Country database to the project. The database has the following features:

  • It includes country and ASN information in the same database.
  • It is updated daily, with zero compromise to accuracy. There is no range clustering, and the database provides full accuracy.
  • The data granularity reaches individual IP level.
  • The database comes in MMDB database format.
  • It is licensed under CC-BY-SA 4.0, permitting commercial usage.
  • Available file formats include: CSV, MMDB, JSON
  • The data is tabular and unnested, making it very easy to use. The dataset includes both IPv4 and IPv6 in a single file.

Database schema

Field Name Example Data Type Description
start_ip 1.0.16.0 TEXT Starting IP address of an IP address range
end_ip 1.0.31.255 TEXT Ending IP address of an IP address range
country JP TEXT ISO 3166 country code of the location
country_name Japan TEXT Name of the country
continent AS TEXT Continent code of the country
continent_name Asia TEXT Name of the continent
asn AS2519 TEXT Autonomous System Number
as_name ARTERIA Networks Corporation TEXT Name of the AS (Autonomous System) organization
as_domain arteria-net.com TEXT Official domain or website of the AS organization

Documentation: https://ipinfo.io/developers/ip-to-country-asn-database

Samples are available here: https://github.com/ipinfo/sample-database/tree/main/IP%20to%20Country%20ASN

The database can be downloaded simply by accessing the storage URI with an access token.

curl -L https://ipinfo.io/data/free/country_asn.mmdb?token=<YOUR_TOKEN> -o country_asn.mmdb

Let me know what you think. Thanks!

abdullahdevrel avatar Nov 02 '24 14:11 abdullahdevrel

Just needed few lines changed to support IPinfo mmdb files, working version here. Please let me know if I should make a PR.

bikramj avatar Feb 05 '25 20:02 bikramj

Awesome stuff @bikramj. Can you make a PR, please?

abdullahdevrel avatar May 05 '25 16:05 abdullahdevrel

Thank you. Done https://github.com/adulau/mmdb-server/pull/7

bikramj avatar May 08 '25 17:05 bikramj