CMD + K

tldextract

Anaconda Verified

Accurately separate the TLD from the registered domain andsubdomains of a URL, using the Public Suffix List.

Installation

To install this package, run one of the following:

Conda
$conda install anaconda::tldextract

Usage Tracking

5.3.1
5.1.2
3.2.0
3 / 8 versions selected
Downloads (Last 6 months): 0

Description

tldextract accurately separates a URL's subdomain, domain, and public suffix, using the Public Suffix List (PSL). Say you want just the "google" part of https://www.google.com. Everybody gets this wrong. Splitting on the "." and taking the 2nd-to-last element only works for simple domains, e.g. .com. Consider http://forums.bbc.co.uk: the naive splitting method will give you "co" as the domain, instead of "bbc". Rather than juggle TLDs, gTLDs, or ccTLDs yourself, tldextract extracts the currently living public suffixes according to the Public Suffix List. A public suffix is also sometimes called an effective TLD (eTLD).

About

Summary

Accurately separate the TLD from the registered domain andsubdomains of a URL, using the Public Suffix List.

Last Updated

Jan 13, 2026 at 11:44

License

BSD-3-Clause

Total Downloads

22.9K

Supported Platforms

linux-64
linux-aarch64
macOS-arm64
win-64

Unsupported Platforms

noarch Last supported version: 3.2.0
linux-s390x Last supported version: 5.1.2
macOS-64 Last supported version: 5.1.2