$npx skillfedfor your agent

tld

Extract the top-level domain (TLD) from the URL given.

Worth itPyPI InternetReleased Mar 202615.9M downloads / moMPL-1.1 OR GPL-2.0-only OR LGPL-2.1-or-laterPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — tld-0.13.2-py2.py3-none-any.whl
v0.13.2 · released 2026-03-06 · Python >=3.7

Yes. tld is a stable, actively maintained utility with zero dependencies, broad Python version support, and no known vulnerabilities. Its copyleft license requires review if you distribute proprietary code, but the license terms are well-established. Install it for any project needing reliable URL-to-domain decomposition.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.7 or greater; TLD names list should be updated via `update-tld-names` if domain recognition fails.
  • Low friction: pure Python wheel with no runtime dependencies.
  • Active maintenance with recent commits and stable production status across modern Python versions (3.9–3.15).

License · maintenance · safety

MPL-1.1 OR GPL-2.0-only OR LGPL-2.1-or-later (copyleft) — Copyleft license (MPL-1.1 OR GPL-2.0-only OR LGPL-2.1-or-later) requires derivative works to be distributed under compatible terms; review your project's license compatibility before use.

last release 2026-03-06 (161 days) · last repo commit 2026-05-07 · 186 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 15,866,317 downloads/mo, #1,171 on PyPI

Verify before relying

pip install tld

from tld import get_tld

get_tld("http://www.google.co.uk")
# 'co.uk'

get_tld("http://www.google.idontexist", fail_silently=True)
# None
  • Frequency and process for updating the Public Suffix list bundled with releases.
  • Performance characteristics when parsing large batches of URLs.
  • Whether custom parser implementations are commonly used in production.
Same gist for agents: .md · .json

What it is and what it does

tld is a lightweight URL parser that extracts domain components—top-level domain, first-level domain, subdomain, and full domain—from URLs using the Mozilla Public Suffix list. It handles edge cases like multi-part TLDs (e.g., 'co.uk') and can optionally repair malformed URLs by adding missing protocols. The package offers both string and object-based return modes, validation of TLD names, and extensibility through custom TLD source parsers and lists.

The library maintains a cached copy of the Public Suffix list and provides a command-line tool to refresh it. It has no external runtime dependencies, making it simple to integrate into URL-parsing pipelines, domain validation workflows, and security tools that need reliable domain decomposition.

Use it for

  • Validate and extract domain components from user-submitted URLs in web applications.
  • Parse and categorize domains in log analysis or security monitoring tools.
  • Build domain-based access control or cookie-scoping logic in web frameworks.
  • Identify first-level domains for analytics or tracking across subdomains.
  • Validate TLD names against the Public Suffix list in data pipelines.
  • Implement custom domain parsing rules by subclassing the base parser for specialized use cases.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

Yes.

tld is a stable, actively maintained utility with zero dependencies, broad Python version support, and no known vulnerabilities. Its copyleft license requires review if you distribute proprietary code, but the license terms are well-established. Install it for any project needing reliable URL-to-domain decomposition.

Install

tld on PyPI

Before you install

Low friction: pure Python wheel with no runtime dependencies. Active maintenance with recent commits and stable production status across modern Python versions (3.9–3.15).

Requires Python 3.7 or greater; TLD names list should be updated via `update-tld-names` if domain recognition fails.

License in practice

Copyleft license (MPL-1.1 OR GPL-2.0-only OR LGPL-2.1-or-later) requires derivative works to be distributed under compatible terms; review your project's license compatibility before use.

Quickstart

pip install tld

from tld import get_tld

get_tld("http://www.google.co.uk")
# 'co.uk'

get_tld("http://www.google.idontexist", fail_silently=True)
# None

Verify before relying

  • Frequency and process for updating the Public Suffix list bundled with releases.
  • Performance characteristics when parsing large batches of URLs.
  • Whether custom parser implementations are commonly used in production.

Package facts

LicenseMPL-1.1 OR GPL-2.0-only OR LGPL-2.1-or-later copyleft
Python supportSupports the current Python release >=3.7
Install frictionLow. Pure-Python wheel
Runtime dependenciesNone
MaintenanceActively maintained 161 days since the last release
Last repo commit
First released
Downloads15,866,317 / month, #1,171 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableEnvironment :: Web EnvironmentIntended Audience :: DevelopersOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.15Programming Language :: Python :: 3.9Topic :: Internet

Evidence: tld-0.13.2-py2.py3-none-any.whl

Tags

Capabilities
extract tld from urltop level domain parserpublic suffix listdomain name extractionparse url domain partsfld first level domainvalidate tld names
Topics
url-parsingdomain-extractionpublic-suffix
PyPI keywords
tldtop-level domain namespython

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 › “extract tld from url”

  • tldExtracts the top-level domain (TLD) and first-level domain (FLD) from…
  • tldextractAccurately extracts subdomain, domain, and public suffix from URLs…
  • tldparseParses domain names into their constituent parts (subdomain, domain,…

Give your agent the search over MCP, or paste the wish link into any chat.

More Internet packages

botocore Worth it
PyPI · Internet · released Aug 2026

Botocore provides low-level, data-driven access to Amazon Web Services APIs, serving as the foundation for the AWS CLI and boto3 libraries.

Install it if you need programmatic access to AWS services.

permissive licensepure Python · 3.10+
1.5Bdownloads / mo
aiobotocore Worth it
PyPI · Internet · released Aug 2026

Provides an async client for AWS services using botocore and aiohttp, allowing you to call AWS APIs asynchronously within asyncio-based applications.

Install it if you need to call AWS services from async Python code; it is the standard way to do so.

Apache-2.0pure Python · 3.10+
1.2Bdownloads / mo
pydantic Worth it
PyPI · Python Modules · released May 2026

Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.

MITpure Python · 3.9+
1.1Bdownloads / mo
filelock Worth it
PyPI · Libraries · released Aug 2026

Provides a platform-independent file locking mechanism to coordinate access to files across processes and threads.

MITpure Python · 3.10+
717.1Mdownloads / mo
fastapi Worth it
PyPI · Software Development · released Jul 2026

FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.

MITpure Python · 3.10+
568.6Mdownloads / mo
googleapis-common-protos Worth it
PyPI · Internet · released Aug 2026

Provides common Protocol Buffer message definitions used across Google Cloud APIs, enabling Python clients to interact with Google services.

Apache-2.0pure Python · 3.10+
513.7Mdownloads / mo

See also tldextract · tlds · publicsuffix2 · urlextract · pyfaup-rs · tldparse · publicsuffixlist · python-whois · dnstwist · whois