SkillAgentSearch skills...

Tldextract

Extract domain, subdomain and tld from a url

Install / Use

/learn @masylum/Tldextract
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

tldextract

Accurately separates the gTLD or ccTLD (generic or country code top-level domain) from the registered domain and subdomains of a URL.

How does it work?

var tldextract = require('tldextract');

tldextract('http://forums.news.cnn.com/', function (err, obj) {
  // obj: {subdomain: 'forums.news', domain: 'cnn', tld: 'com'}
});

tldextract('http://ye.ye.ye.ye/', function (err, obj) {
  // obj: {subdomain: 'ye', domain: 'ye', tld: 'ye.ye'}
});

tests

make

Disclaimer

This module is a port of the python module tldextract.

View on GitHub
GitHub Stars36
CategoryDevelopment
Updated1mo ago
Forks6

Languages

JavaScript

Security Score

75/100

Audited on Feb 22, 2026

No findings