SYNOPSIS

use ICANN::gTLD;

# get info about a specific gTLD
my $gtld = ICANN::gTLD->get('org');

printf(
    "The .%s gTLD is operated by %s and was delegated in %s.\n",
    ($gtld->uLabel || $gtld->gTLD)->name,
    $gtld->registryOperator,
    $gtld->delegationDate->year,
);

# get info about all gTLDs
my @gtlds = ICANN::gTLD->get_all;

INTRODUCTION

ICANN publishes a machine-readable database of information about generic top-level domains (TLDs) on its website. This module provides access to that database.

Note: a generic TLD is a TLD like .org or .机构 (.xn--nqv7f), as distinguished from (a) country-code TLDs such as .uk or .台灣 (.xn--kpry57d), (b) "sponsored" TLDs (specifically .gov, .mil and .edu), and (c) the special "infrastructure" TLD, .arpa.

INTERNALS

ICANN::gTLD uses Data::Mirror to synchronise a local copy of the database of gTLD information from the ICANN website. See the Data::Mirror documentation to find out how to control its behaviour.

GETTING TLD OBJECTS

my $tld = ICANN::gTLD->get($name);

my $tld = ICANN::gTLD->from_domain($name);

my @all = ICANN::gTLD->get_all;

To get information about a specific gTLD, use get(). To get information about the parent TLD of a domain name, use from_domain(). To get a list of all gTLDs, use get_all().

OBJECT METHODS

The methods listed below list the available data elements for each TLD. Note that not all fields are available or applicable for all TLDs, so all of these methods (except gTLD()) may return undef.

COPYRIGHT AND LICENSE

This software is copyright (c) 2025 by Internet Corporation for Assigned Names and Number (ICANN).

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.