--- id: tlds version: "2026072401" license: MIT license_treatment: permissive maintenance: active --- # tlds — Automatically updated list of valid TLDs taken directly from IANA License: permissive · Maintenance: active · Downloads: 110.1K/mo ## 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 above — verify before relying. Provides a set of valid top-level domains (TLDs) automatically updated daily from IANA, allowing you to check whether a domain suffix is legitimate. 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 pip install tlds uv add tlds poetry add tlds ## Installing tlds 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: unspecified - Install friction: low - Maintenance: active - Downloads: 110.1K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags tld validation, domain suffix checker, iana tld list, valid tlds python, top level domain lookup, domain extension validator, tld set membership, domain-validation, iana-data [View on SkillFed](https://skillfed.io/packages/tlds) · [View on PyPI](https://pypi.org/project/tlds/)