# john-kurkowski/tldextract

Accurately separates a URL’s subdomain, domain, and public suffix, using the Public Suffix List (PSL).

Repository: https://github.com/john-kurkowski/tldextract
Canonical: https://ross.abutalabs.com/products/tldextract
Language: Python
License: BSD-3-Clause
License Family: permissive
Topics: python, tldextract, country-codes, suffix, tld, publicsuffix, publicsuffixlist
Last push: 2026-08-08T20:56:18+00:00

## Health v2 (maintenance only)
Score: 86/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 96, release rhythm 64, longevity 100
- inputs: {"age_days": 5667, "days_push": 25, "days_rel": 25, "gap_med": 187.5, "n_releases_24m": 5}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2014, forks 220 (observed 2026-08-28T04:06:05.395597+00:00)

## What it is
A Python library that accurately splits URLs into subdomain, domain, and public suffix components using the Public Suffix List. It also ships a small CLI for extraction and suffix list updates.

## Use cases
- parse domain and subdomain from a url in python
- get registrable domain from url like bbc.co.uk
- extract tld from hostname correctly
- validate whether a string is a valid domain
- group urls by root domain for analytics
- avoid naive dot-splitting when parsing hostnames

## When to choose
- you need PSL-accurate domain parsing with edge cases like co.uk handled
- you want optional support for private suffixes like blogspot.com
- you need a maintained, widely used Python solution with CLI support

## When to avoid
- you only need scheme/host/path splitting, which urllib.parse already does
- you need full URL normalization or crawling, not just hostname decomposition
- you work outside Python and need a native implementation

## Facets
- artifact type: library
- maturity: stable
- function: parser, web-scraping, developer-tools
- domain: web-development, developer-tools, apis
- platform: python, cli, cross-platform
- tags: public-suffix-list, url-parsing, domain-parsing, tld, subdomain

## Member repositories
- john-kurkowski/tldextract (main) score 86

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:05.395597+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:00:49.623295+00:00, confidence not recorded.
  - readme: https://github.com/john-kurkowski/tldextract (fetched 2026-08-28T04:06:05.395597+00:00, sha 225901ba9af4)
  - registry_pypi: https://pypi.org/pypi/tldextract/json (fetched 2026-08-29T10:40:44.215466+00:00, sha 708d1fc67c57)
- Data as of 2026-08-30T08:39:29.467469+00:00.
