tlds
Automatically updated list of valid TLDs taken directly from IANA
Decision gist · record as of 2026-08-14
Yes. The package solves a real problem—reliable TLD validation—with zero dependencies, low friction, active maintenance, and a permissive license. Daily updates ensure the list stays current with IANA. Use it whenever you need to distinguish valid TLDs from invalid ones without calling an external API.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Low install friction with no runtime dependencies.
- Actively maintained with a recent release (19 days old) and daily updates to stay current with IANA's official TLD list.
License · maintenance · safety
MIT (permissive) — MIT license permits free use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects.
last release 2026-07-26 (19 days) · last repo commit 2026-07-25 · 5 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 110,107 downloads/mo, #12,483 on PyPI
Alternatives
Verify before relying
pip install tlds
from tlds import tld_set
if 'com' in tld_set:
print('Valid TLD')
if 'pizza' in tld_set:
print('Also valid')- Whether the daily update mechanism is guaranteed to stay synchronized with IANA or if there are known lag windows
- Whether the package supports internationalized domain names (IDN) or only ASCII TLDs
What it is and what it does
tlds is a lightweight Python package that exposes a set of all valid top-level domains sourced directly from IANA's official TLD list. The package is updated automatically every day to reflect any new or modified TLDs. It provides a simple membership-test interface—you import a set called tld_set and check whether a given TLD string belongs to it, making it straightforward to validate domain extensions in applications that need to distinguish real TLDs from invalid ones.
The package has no runtime dependencies, making it quick to install and integrate. It's classified as Production/Stable and has been maintained since 2018. With a permissive MIT license and active maintenance, it's a practical choice for any application that needs reliable, up-to-date TLD validation without external API calls.
Use it for
- Validate domain extensions during email or URL parsing to reject fake or misspelled TLDs
- Filter domain lists in web scraping or DNS enumeration tools to identify only legitimate domain suffixes
- Check whether a user-supplied domain extension is real before attempting registration or DNS lookups
- Build domain classification or categorization logic that depends on knowing which TLDs are official
- Implement client-side domain validation in web forms to catch obvious TLD typos before submission
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
The package solves a real problem—reliable TLD validation—with zero dependencies, low friction, active maintenance, and a permissive license. Daily updates ensure the list stays current with IANA. Use it whenever you need to distinguish valid TLDs from invalid ones without calling an external API.
Install
tlds on PyPI
Before you install
Low install friction with no runtime dependencies. Actively maintained with a recent release (19 days old) and daily updates to stay current with IANA's official TLD list.
License in practice
MIT license permits free use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects.
Quickstart
pip install tlds
from tlds import tld_set
if 'com' in tld_set:
print('Valid TLD')
if 'pizza' in tld_set:
print('Also valid')
Verify before relying
- Whether the daily update mechanism is guaranteed to stay synchronized with IANA or if there are known lag windows
- Whether the package supports internationalized domain names (IDN) or only ASCII TLDs
Package facts
| License | MIT permissive |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Actively maintained 19 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 110,107 / month, #12,483 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableLicense :: OSI Approved :: MIT LicenseProgramming Language :: PythonTopic :: Communications |
Evidence: tlds-2026072401-py2.py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “tld validation”
- tldsProvides a set of valid top-level domains (TLDs) automatically…
- tldExtracts the top-level domain (TLD) and first-level domain (FLD) from…
- publicsuffix2Extracts the public suffix and registrable domain from a domain name…
Give your agent the search over MCP, or paste the wish link into any chat.
More Communications packages
Pyasn1 encodes and decodes ASN.1 data structures using BER, CER, DER, and native Python codecs, allowing you to serialize complex data for network protocols and file formats.
Install it if you need to work with ASN.1-based protocols or formats; it is the standard library for this in Python and has no known vulnerabilities.
Provides a collection of ASN.1 data structures expressed as Python classes, built on the pyasn1 library, for working with ASN.1-based protocols and standards.
Kombu is a messaging library that provides a high-level Python interface to AMQP and other message brokers, supporting pluggable transports for RabbitMQ, Redis, MongoDB, Amazon SQS, and others.
Install it if you are building any distributed system that requires reliable message passing.
Formats and parses numbers, file sizes, timespans, and other values into human-readable text; provides terminal interaction utilities including ANSI text styling and user prompts.
Adds colored output to Python's standard logging module using ANSI escape sequences, with automatic fallback support for Windows terminals.
However, it is abandoned and receives no maintenance, so it will not adapt to future Python changes or platform updates.
Parse, validate, format, and analyze international phone numbers across all countries, with support for extracting geographic, carrier, and timezone information from phone number data.
See also tld · tldextract · publicsuffix2 · dnstwist · tldparse · whois · publicsuffixlist · free-email-domains · urlextract · language-tags