Every IP range, with its country's flag.
Every IPv4 and IPv6 range matched to its country, with the flag as both an emoji and its Unicode code points, so it can be logged as plain text where emoji aren't an option.
In the lookup API: location.flag_emoji and location.flag_unicode, on every plan, free included.
Real rows, with what each column means.
See documentation โThe schema and metadata are in the docs. It is published as CSVGZ and MMDB.
| start_ip | end_ip | country | country_name | flag_emoji | flag_unicode |
|---|---|---|---|---|---|
| 37.59.158.52 | 37.59.158.55 | ES | Spain | ๐ช๐ธ | U+1F1EA U+1F1F8 |
| 201.35.200.208 | 201.35.200.215 | BR | Brazil | ๐ง๐ท | U+1F1E7 U+1F1F7 |
| 1.0.0.0 | 1.0.0.255 | AU | Australia | ๐ฆ๐บ | U+1F1E6 U+1F1FA |
| 2a09:4c0:3e0:20:: | 2a09:4c0:3e0:20:ffff:ffff:ffff:ffff | FI | Finland | ๐ซ๐ฎ | U+1F1EB U+1F1EE |
| 2001:470:19:d7:: | 2001:470:19:d7:ffff:ffff:ffff:ffff | CN | China | ๐จ๐ณ | U+1F1E8 U+1F1F3 |
Download it from your code in one call.
Database API reference โEvery official client fetches the current IP Country Flag build to disk, as a link for your own runner or into memory, and checks it against its published checksums.
download()downloadUrl()downloadBytes()metadata()checksums()import osfrom internetdata import InternetDataclient = InternetData(os.environ["INTERNETDATA_API_KEY"])# what is in today's build, without moving the filemeta = client.database.metadata("ip_country_flag_v1")client.database.download("ip_country_flag_v1", "mmdb", "./ip_country_flag_v1.mmdb")sums = client.database.checksums("ip_country_flag_v1", "mmdb")print(meta.updated, meta.entries, sums["sha256"])
Put it to work in your own systems.
Free with an account, and the file is yours: teams join IP Country Flag against the traffic, logs and routing data they already hold, inside their own infrastructure.
Interface localization
Show a flag next to a country name in a picker, a billing address or an account list without shipping your own icon set.
Call the API in your language, with an official client.
All SDKs on GitHub โThirteen official clients, one for each language you ship in and one for the browser, plus middleware for seven web frameworks. Each answers private addresses without a request, caches what it looks up and splits big batches for you.
Common questions
Where does the country come from?
It's the country IP Geolocation gives the same range, so the two files agree.
Why two flag columns?
flag_emoji for systems that render emoji, flag_unicode for logs and terminals that take only plain text.
How often is it rebuilt?
Daily. The metadata call answers when the current build landed and how many rows it holds, before you fetch it.
Which formats does a build ship in?
Gzipped CSV and MMDB, both cut from the same build. The MMDB opens in any MaxMind DB reader.
Is it really free?
Yes. Create an account and download it from the console, or with your API key from the API or any official client. It's licensed under CC BY-SA 4.0: credit InternetData and share what you build from it under the same license.
Is there a lookup API?
Yes. An address lookup answers location.flag_emoji and location.flag_unicode on every plan, free included.
What if a row looks wrong?
Send it to us and we'll tell you what we hold on it and when it was last seen. Corrections land in the next build.
Unlimited lookups, no sign-up.
Paste it into a terminal. Any address answers with its country, network, company and hostname, with no key and no daily or monthly cap. ASes and domains answer too.
{"ip": "8.8.8.8","is_bogon": false,"is_tor": false,"is_relay": false,"is_anycast": true,"is_carrier": false,"is_satellite": false,"is_ssh": false,"is_smtp": false,"is_web": true,"is_dns_resolver": true,"is_bittorrent": false,"hostname": "dns.google","location": {"continent": "NA","continent_name": "North America","country": "US","country_name": "United States","timezone": "America/Los_Angeles","currency_code": "USD","currency_name": "Dollar","currency_symbol": "$","flag_emoji": "๐บ๐ธ","flag_unicode": "U+1F1FA U+1F1F8"},"asn": {"asn": 15169,"name": "Google LLC","domain": "google.com","type": "hosting","prefix": "8.8.8.0/24"},"company": {"name": "Google LLC","domain": "google.com"},"tor": {},"relay": {},"abuse": {"email": "network-abuse@google.com"}}
All of the data on a paid plan.
A free API key answers every field for its first 100 lookups each day, with no card.