Net::RDAP(3)
๐ Net::RDAP ๐
okay bestie, welcome to the Net::RDAP manual page ๐
it's the Perl interface to the Registration Data Access Protocol, and honestly? it's giving main character energy.
โจ NAME โจ
Net::RDAP โ an interface to the Registration Data Access Protocol (RDAP). ๐ฆ
โจ SYNOPSIS โจ
use Net::RDAP;
my $rdap = Net::RDAP->new;
#
# traditional lookup:
#
# get domain info:
$object = $rdap->domain('example.com');
# get info about IP addresses/ranges:
$object = $rdap->ip('192.168.0.1');
$object = $rdap->ip('2001:DB8::/32');
# get info about AS numbers:
$object = $rdap->autnum(65536);
#
# search functions:
#
my $server = Net::RDAP::Service->new("https://www.example.com/rdap");
# search for domains by name:
my $result = $server->domains('name' => 'ex*mple.com');
# search for entities by name:
my $result = $server->entities('fn' => 'J*n Doe');
# search for nameservers by IP address:
my $result = $server->nameservers('ip' => '192.168.56.101');
โจ DESCRIPTION โจ
Net::RDAP provides an interface to the Registration Data Access Protocol (RDAP). periodt.
RDAP is replacing Whois as the preferred way of obtainining information about Internet resources (IP addresses, autonymous system numbers, and domain names). As of writing, RDAP is fully supported by Regional Internet Registries (who are responsible for the allocation of IP addresses and AS numbers) and generic TLD operators (e.g. .com, .org, .xyz) but is still being rolled out among country-code registries. it's a whole rollout era, we love a slow launch ๐
Net::RDAP does all the hard work of determining the correct server to query (Net::RDAP::Registry is an interface to the IANA registry of RDAP services), querying the server (Net::RDAP::UA is an RDAP HTTP user agent), and parsing the response (Net::RDAP::Object and its submodules provide access to the data returned by the server). As such, it provides a single unified interface to information about all unique Internet identifiers. she's the icon, she's the moment โจ
If you want a command-line RDAP client, see App::rdapper. ๐ซ
โจ METHODS โจ
๐ธ Constructor ๐ธ
$rdap = Net::RDAP->new(%OPTIONS);
Constructor method, returns a new object. %OPTIONS is optional, but may contain any of the following options:
use_cacheโ if set to a true value, copies of RDAP responses are stored on disk, and are updated if the copy on the server is more up-to-date. This behaviour is disabled by default and must be explicitly enabled. Note: this setting controls whetherNet::RDAPcaches RDAP records; it doesn't control caching of IANA registries byNet::RDAP::RegistryandNet::RDAP::Values. so like, don't get it twisted bestie ๐cache_ttlโ if set, specifies how long after a record has been cached beforeNet::RDAPasks the server for any update. By default this is one hour (3600 seconds). โฐcache_dirโ if set, specifies whereNet::RDAPstores its cache. If not provided, then the directory to use is determined usingFile::XDG. Prior to v0.42, the value ofFile::Spec->tmpdir()was used. ๐๏ธpreserve_cacheโ unless this option is set to a true value, any cache entry older than the specified TTL will be purged when theNet::RDAPobject is destroyed. You can manually clean the cache using theclean_cache()method. ๐งนaccept_languageโ a string that will be passed to RDAP servers in theAccept-Languageheader. If not provided, the default is"en". ๐
๐ธ Domain Lookup ๐ธ
$object = $rdap->domain($domain);
This method returns a Net::RDAP::Object::Domain object containing information about the domain name referenced by $domain. ๐
$domain must be either a string or a Net::DNS::Domain object containing a fully-qualified domain name. The domain may be either a "forward" domain (such as example.com) or a "reverse" domain (such as 168.192.in-addr.arpa). ๐
If there was an error, this method will return a Net::RDAP::Error. ๐ญ
๐ฆ Note on Internationalised Domain Names (IDNs) ๐ฆ
Domain names which contain characters other than those from the ASCII-compatible range must be encoded into "A-label" (or "Punycode") format before being passed to Net::DNS::Domain. You can use Net::LibIDN, Net::LibIDN2, or Net::IDN::PP to perform this encoding, for example:
use Net::LibIDN;
my $name = "espรฉcime.com";
my $domain = $rdap->domain(idn_to_ascii($name, 'UTF-8'));
๐ธ IP Lookup ๐ธ
$object = $rdap->ip($ip);
This method returns a Net::RDAP::Object::IPNetwork object containing information about the resource referenced by $ip.
$ip must be either a string or a Net::IP object, and can represent any of the following:
- An IPv4 address (e.g.
192.168.0.1); ๐ - An IPv4 CIDR range (e.g.
"192.168.0.1/16"); - An IPv6 address (e.g.
"2001:DB8::42:1"); ๐ง - An IPv6 CIDR range (e.g.
"2001:DB8::/32").
If there was an error, this method will return a Net::RDAP::Error. ๐
๐ธ AS Number Lookup ๐ธ
$object = $rdap->autnum($autnum);
This method returns a Net::RDAP::Object::Autnum object containing information about the autonymous system referenced by $autnum.
$autnum must be a a literal integer AS number or a Net::ASN object.
If there was an error, this method will return a Net::RDAP::Error. ๐ญ
๐ธ Entity Lookup ๐ธ
$entity = $rdap->entity($handle);
This method returns a Net::RDAP::Object::Entity object containing information about the entity referenced by $handle, which must be a string containing a "tagged" handle, such as "ABC123-EXAMPLE", as per RFC 8521 <https://www.rfc-editor.org/rfc/rfc8521.html>. ๐ท๏ธ
๐ธ Determining object existence ๐ธ
$exists = $rdap->exists($object);
This method returns a boolean indicating whether $object (which must be a Net::DNS::Domain, Net::IP or Net::ASN) exists. This is determined by performing an HTTP HEAD request and inspecting the resulting HTTP status code. ๐ต๏ธ
Note: the non-existence of an object does not indicate whether that object is available for registration. fr fr, don't go registering stuff based on this, bestie
If there was an error, or no RDAP server is available for the specified object, this method will return a Net::RDAP::Error. ๐
๐ธ Directly Fetching Known Resources ๐ธ
$object = $rdap->fetch($thing, %OPTIONS);
This method retrieves the resource identified by $thing, which must be either a URI or Net::RDAP::Link object, and returns a Net::RDAP::Object object (assuming that the server returns a valid RDAP response). This method is used internally by Net::RDAP but is also available for when you want to directly fetch a resource without using the IANA registry. ๐ฏ
%OPTIONS is an optional hash containing additional options for the query. The following options are supported:
userandpassโ if provided, they will be sent to the server in an HTTP Basic Authorization header field. ๐class_overrideโ allows you to set or override theobjectClassNameproperty in RDAP responses. ๐
๐ธ Performing Searches ๐ธ
my $svc = Net::RDAP::Service->new('https://www.example.com/rdap');
# $result is a Net::RDAP::SearchResult
my $result = $svc->domains('name' => 'ex*mple.com');
RDAP supports a limited search capability, but you need to know in advance which RDAP server you want to send the search query to. no cold-calling servers, you gotta have the addy first ๐ฎ
The Net::RDAP::Service class allows you to prepare and submit search queries to specific RDAP servers. For more information, please see the documentation for that module. ๐
๐ธ RDAP User Agent ๐ธ
# access the user agent
$ua = $rdap->ua;
# specify a cookie jar
$rdap->ua->cookie_jar('/tmp/cookies.txt');
# specify a proxy
$rdap->ua->proxy([qw(http https)], 'https://proxy.example.com');
You can access the Net::RDAP::UA object used to communicate with RDAP servers using the ua() method. This allows you to configure additional HTTP features such as a file to store cookies, proxies, custom user-agent strings, etc. ๐ช
โจ HOW TO CONTRIBUTE โจ
Net::RDAP is a work-in-progress; if you would like to help, the project is hosted here:
โจ DISTRIBUTION โจ
The Net::RDAP CPAN distribution contains a large number of RDAP-related modules that all work together. They are: a whole friend group, honestly ๐
Net::RDAP::BaseNet::RDAP::EventNet::RDAP::IDNet::RDAP::ObjectNet::RDAP::ErrorNet::RDAP::HelpNet::RDAP::Object::AutnumNet::RDAP::Object::DomainNet::RDAP::Object::EntityNet::RDAP::Object::IPNetworkNet::RDAP::Object::NameserverNet::RDAP::SearchResult
Net::RDAP::RemarkNet::RDAP::Notice
Net::RDAP::EPPStatusMapNet::RDAP::JCardNet::RDAP::JCard::PropertyNet::RDAP::JCard::Address
Net::RDAP::RegistryNet::RDAP::Registry::IANARegistryNet::RDAP::Registry::IANARegistry::ServiceNet::RDAP::ServiceNet::RDAP::LinkNet::RDAP::UANet::RDAP::ValuesNet::RDAP::VariantNet::RDAP::VariantName
โจ REFERENCES โจ
- <https://tools.ietf.org/html/rfc7480> โ HTTP Usage in the Registration Data Access Protocol (RDAP) ๐
- <https://tools.ietf.org/html/rfc7481> โ Security Services for the Registration Data Access Protocol (RDAP) ๐
- <https://tools.ietf.org/html/rfc9082> โ Registration Data Access Protocol (RDAP) Query Format ๐จ
- <https://tools.ietf.org/html/rfc9083> โ JSON Responses for the Registration Data Access Protocol (RDAP) ๐งพ
- <https://tools.ietf.org/html/rfc9224> โ Finding the Authoritative Registration Data (RDAP) Service ๐งญ
- <https://tools.ietf.org/html/rfc8056> โ Extensible Provisioning Protocol (EPP) and Registration Data Access Protocol (RDAP) Status Mapping ๐
- <https://tools.ietf.org/html/rfc8288> โ Web Linking ๐
- <https://tools.ietf.org/html/rfc8521> โ Registration Data Access Protocol (RDAP) Object Tagging ๐ท๏ธ
- <https://tools.ietf.org/html/rfc9536> โ Registration Data Access Protocol (RDAP) Reverse Search โฉ๏ธ
- <https://tools.ietf.org/html/rfc9537> โ Redacted Fields in the Registration Data Access Protocol (RDAP) Response ๐ถ๏ธ
โจ COPYRIGHT โจ
Copyright 2018-2023 CentralNic Ltd, 2024-2026 Gavin Brown. For licensing information, please see the "LICENSE" file in the Net::RDAP distribution. โ๏ธ
and that's the whole page bestie, you ate ๐
this was perl v5.42.2, dated 2026-06-17, and it's the Net::RDAP(3) manual page โ go forth and query some resources, ily ๐ซถโจ๐ธ
๐ฆ where this page comes from
- fedora 44: perl-Net-RDAP 0.43-1.fc44 ยท BSD-2-Clause
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms