Skip to content
InternetData
Open

Every IP range, with its country and timezone.

Every IPv4 and IPv6 range matched to its continent and country, each by code and name, with its IANA timezone and the country's currency and flag: the country and zone IP Geolocation gives it, neighbors of the same country and zone merged into one row.

Schema at a glance.

See documentation →

The schema and metadata are in the docs. It is published as CSVGZ and MMDB.

start_ipend_ipcontinentcontinent_namecountrycountry_nametimezonecurrency_codecurrency_namecurrency_symbolflag_emojiflag_unicode
1.6.0.01.7.255.255ASAsiaINIndiaAsia/KolkataINRRupee₹🇮🇳U+1F1EE U+1F1F3
1.179.103.01.179.103.255NANorth AmericaUSUnited StatesAmerica/ChicagoUSDDollar$🇺🇸U+1F1FA U+1F1F8
1.178.32.01.178.47.255SASouth AmericaBRBrazilAmerica/Sao_PauloBRLRealR$🇧🇷U+1F1E7 U+1F1F7
2.27.26.1282.27.26.159ANAntarcticaAQAntarcticaAntarctica/Syowa🇦🇶U+1F1E6 U+1F1F6
2400:1000::2400:1000:ffff:ffff:ffff:ffff:ffff:ffffASAsiaJPJapanAsia/TokyoJPYYen¥🇯🇵U+1F1EF U+1F1F5
ID
ip_country_v1
Entries
2,455,119
Refresh
Daily
CSVGZ
20.54 MB
MMDB
10.93 MB

Downloading it from code.

Database API reference →

One call gets you the current IP Country build. Every official client wraps it three ways: straight to disk, a time-limited link you hand to your own runner, or bytes in memory, and checksums() returns the published digests to verify it against.

download()
Streams the current build to a file, which lands only once the whole transfer has arrived, so a failed one never leaves a truncated file behind.
downloadUrl()
The time-limited link the API redirects to, for your own downloader, a job runner or a CDN pull.
downloadBytes()
The build in memory, for a small database or a pipeline that never touches a filesystem.
metadata()
Row count, file sizes and when the build last updated. Poll it and fetch only when a new one has landed.
checksums()
The md5, sha1, sha256 and sha512 digests of one file, to verify it once it lands.
import os
from internetdata import InternetData
client = InternetData(os.environ["INTERNETDATA_API_KEY"])
# what is in today's build, without moving the file
meta = client.database.metadata("ip_country_v1")
client.database.download("ip_country_v1", "mmdb", "./ip_country_v1.mmdb")
sums = client.database.checksums("ip_country_v1", "mmdb")
print(meta.updated, meta.entries, sums["sha256"])
load.pypip install internetdata
Also available for .NET, Ruby, Rust, Swift, Erlang, Perl and Zig. See all on GitHub →

Getting your hands on it.

Free with an account, and the file is yours: teams join IP Country against the traffic, logs and routing data they already hold, inside their own infrastructure.

Localization

Pick a visitor's language, currency and flag from the country of their address, in one lookup.

Country rules

Apply each country's terms, taxes or restrictions by where a request comes from.

Local time

Read a timestamp, or send a message, on the visitor's own clock.

Free with an account
Sign up, then download it from the console, or with your API key from the API or any official client.
Checksums published per file: md5, sha1, sha256 and sha512.
The id fixes the schema, so a new build never changes the columns your parser reads.

An official client for every major language.

All SDKs on GitHub →

Twelve official clients for the languages you ship in, each wrapping the database endpoints: list what you're licensed for, poll a build, follow the download redirect and verify what landed. Install commands are in the docs.

On this page

What is in a row?

One range, both ends inclusive, with its continent and country, each by code and name, its IANA timezone, and its country's currency and flag. IPv4 and IPv6 are in the same file.