TLD registry and domain extensions API client — tldfyi.com
Project description
tldfyi
Python API client for top-level domain (TLD) data. Look up TLD registry information, explore domain extension categories (gTLD, ccTLD, new gTLD), query WHOIS server details, and retrieve ICANN delegation records — all from TLDFYI, a TLD reference platform covering every active domain extension in the DNS root zone.
TLDFYI catalogs the complete IANA root zone database including TLD types, registry operators, WHOIS servers, DNSSEC status, IDN (internationalized domain name) support, and registration policies — used by domain registrars, DNS researchers, and cybersecurity analysts.
Explore TLDs at tldfyi.com — browse by type, search TLDs, and view registry details.
Table of Contents
- Install
- Quick Start
- What You Can Do
- Command-Line Interface
- MCP Server (Claude, Cursor, Windsurf)
- REST API Client
- API Reference
- Learn More About TLDs
- Also Available
- Network FYI Family
- License
Install
pip install tldfyi # Core (zero deps)
pip install "tldfyi[cli]" # + Command-line interface
pip install "tldfyi[mcp]" # + MCP server for AI assistants
pip install "tldfyi[api]" # + HTTP client for tldfyi.com API
pip install "tldfyi[all]" # Everything
Quick Start
from tldfyi.api import TLDFYI
with TLDFYI() as api:
# Look up a TLD
com = api.get_tld("com")
print(com["type"]) # gTLD
print(com["registry"]) # Verisign
print(com["whois_server"]) # whois.verisign-grs.com
print(com["dnssec"]) # True
# List TLDs by type
cctlds = api.list_tlds(type="ccTLD")
for tld in cctlds[:5]:
print(f".{tld['name']} — {tld['country']}")
# Search TLDs
results = api.search("tech")
What You Can Do
TLD Categories
The Domain Name System root zone contains over 1,500 TLDs organized into distinct categories. Each category has different governance rules, registration policies, and intended purposes.
| Category | Count | Examples | Governance |
|---|---|---|---|
| gTLD (Generic) | 22 original | .com, .net, .org, .info | ICANN contracted |
| ccTLD (Country-Code) | 250+ | .uk, .de, .jp, .kr, .br | National authorities |
| new gTLD | 1,200+ | .app, .dev, .io, .xyz | ICANN 2012 program |
| sTLD (Sponsored) | 15 | .edu, .gov, .mil, .museum | Sponsoring organizations |
| Infrastructure | 1 | .arpa | IANA (DNS infrastructure) |
| IDN ccTLD | 60+ | .xn-- (Punycode encoded) | National authorities |
from tldfyi.api import TLDFYI
with TLDFYI() as api:
# Browse TLDs by category
types = api.list_types()
for t in types:
print(f"{t['name']}: {t['count']} TLDs")
# Get all country-code TLDs
cctlds = api.list_tlds(type="ccTLD")
print(f"{len(cctlds)} country-code TLDs")
Learn more: TLD Types · Glossary
Domain Lifecycle
Every domain name follows a lifecycle from registration through expiration. Understanding these states is critical for domain management, drop-catching, and brand protection.
| State | Duration | Description |
|---|---|---|
| Available | — | Not registered, can be purchased |
| Registered | 1-10 years | Active, resolves in DNS |
| Expired | 0-45 days | Grace period, can be renewed |
| Redemption | 30 days | Higher fee to recover |
| Pending Delete | 5 days | About to be released |
| Available (again) | — | Returns to open registration |
from tldfyi.api import TLDFYI
with TLDFYI() as api:
# Look up TLD registration policies
tld = api.get_tld("com")
print(f"Registry: {tld['registry']}")
print(f"WHOIS: {tld['whois_server']}")
print(f"Registration periods: {tld.get('registration_periods')}")
Learn more: Domain Lifecycle · Glossary
WHOIS and Registration Data
WHOIS is the protocol for querying domain registration databases. Each TLD designates a WHOIS server where registrant information (subject to GDPR/privacy policies), registration dates, name servers, and expiration dates can be queried.
from tldfyi.api import TLDFYI
with TLDFYI() as api:
# Get WHOIS server information for a TLD
tld = api.get_tld("org")
print(f"WHOIS server: {tld['whois_server']}")
print(f"Registry: {tld['registry']}")
print(f"DNSSEC: {tld.get('dnssec')}")
Learn more: WHOIS Data · Guides
ICANN and DNS Governance
ICANN (Internet Corporation for Assigned Names and Numbers) coordinates the global DNS through the IANA (Internet Assigned Numbers Authority) function. The 2012 new gTLD program expanded the root zone from ~300 to 1,500+ TLDs, creating extensions like .app, .dev, and .blog.
| Organization | Role | Manages |
|---|---|---|
| ICANN | DNS coordination | gTLD policies, new TLD applications |
| IANA | Root zone maintenance | TLD delegation, IP allocation |
| Verisign | .com/.net registry | Root zone file operations |
| Country NICs | ccTLD registry | National domain policies |
| RDAP | WHOIS successor | Structured registration data access |
from tldfyi.api import TLDFYI
with TLDFYI() as api:
# Get registry operator information
tld = api.get_tld("dev")
print(f"Registry: {tld['registry']}") # Google Registry
print(f"Type: {tld['type']}") # new gTLD
print(f"DNSSEC required: {tld.get('dnssec')}")
Learn more: DNS Governance · API Documentation
Command-Line Interface
pip install "tldfyi[cli]"
tldfyi tld com # TLD details
tldfyi search "app" # Search TLDs
tldfyi type ccTLD # All country-code TLDs
tldfyi types # List TLD categories
MCP Server (Claude, Cursor, Windsurf)
pip install "tldfyi[mcp]"
{
"mcpServers": {
"tldfyi": {
"command": "uvx",
"args": ["--from", "tldfyi[mcp]", "python", "-m", "tldfyi.mcp_server"]
}
}
}
REST API Client
from tldfyi.api import TLDFYI
with TLDFYI() as api:
tld = api.get_tld("com") # GET /api/v1/tlds/com/
cctlds = api.list_tlds(type="ccTLD") # GET /api/v1/tlds/?type=ccTLD
types = api.list_types() # GET /api/v1/types/
results = api.search("tech") # GET /api/v1/search/?q=tech
Example
curl -s "https://tldfyi.com/api/v1/tlds/com/"
{
"slug": "com",
"name": "com",
"type": "gTLD",
"registry": "Verisign",
"whois_server": "whois.verisign-grs.com",
"dnssec": true
}
Full API documentation at tldfyi.com/developers/.
API Reference
| Function | Description |
|---|---|
api.get_tld(slug) |
TLD details (registry, WHOIS, DNSSEC) |
api.list_tlds(type) |
List TLDs, optionally by type |
api.list_types() |
All TLD categories with counts |
api.get_type(slug) |
Type details with TLD list |
api.search(query) |
Search TLDs by name or registry |
Learn More About TLDs
- Browse: TLD Directory · TLD Types
- Guides: Domain Guides · Glossary
- API: REST API Docs · OpenAPI Spec
Also Available
| Platform | Install | Link |
|---|---|---|
| npm | npm install tldfyi |
npm |
| MCP | uvx --from "tldfyi[mcp]" python -m tldfyi.mcp_server |
Config |
Network FYI Family
Part of the FYIPedia open-source developer tools ecosystem — internet infrastructure, cables, domains, and protocols.
| Package | PyPI | npm | Description |
|---|---|---|---|
| cablefyi | PyPI | npm | Submarine cables, landing points, operators — cablefyi.com |
| tldfyi | PyPI | npm | TLD registry, domain extensions, WHOIS — tldfyi.com |
| ipfyi | PyPI | npm | IP geolocation, ASN lookup, CIDR ranges — ipfyi.com |
| protocolcodes | PyPI | npm | HTTP status codes, protocol references — statuscodefyi.com |
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tldfyi-0.1.1.tar.gz.
File metadata
- Download URL: tldfyi-0.1.1.tar.gz
- Upload date:
- Size: 613.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
38b8a0b7811dd4e5fd66e8d0290354432e2e1153a1b95a96880b22d8fb71c238
|
|
| MD5 |
3cd5d00aec164e797c9697e2e57d5ca6
|
|
| BLAKE2b-256 |
ab5779bb67b215cb80397f9a6ea99667ab747996a15d6b8edd1d3e7d94094da4
|
File details
Details for the file tldfyi-0.1.1-py3-none-any.whl.
File metadata
- Download URL: tldfyi-0.1.1-py3-none-any.whl
- Upload date:
- Size: 9.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a48b626a08e213d9a5e281c1093ebf9cc2b40ba1ef6791c02d31dfc21ef4ade7
|
|
| MD5 |
c5687469d59c6f2854dd656a941bee86
|
|
| BLAKE2b-256 |
3fa88e0f78f755f6d45fe93e2fba3f5ccb349f1479a52e74eec3cfc0446ee1ec
|