Net::RDAP::Service(3)

πŸ“¦
version 0.43 Β· 3 versions
, in fedora 44

πŸ’– Net::RDAP::Service πŸ’–

okay so bestie, you've found the page for Net::RDAP::Service β€” it's part of the User Contributed Perl Documentation collection, and it is exactly what it says on the tin: a module that gives you an interface to one specific RDAP server. one server. your server. main character energy, but for RDAP. πŸ‘‘


✨ NAME ✨

Net::RDAP::Service β€” a module which provides an interface to an RDAP server. πŸ’…


✨ SYNOPSIS ✨

like, here's the whole vibe in code form:

use Net::RDAP::Service;

#
# create a new service object:
#

my $svc = Net::RDAP::Service->new('https://www.example.com/rdap');

#
# get a domain:
#

my $domain = $svc->domain(Net::DNS::Domain->new('example.com'));

#
# do a search:
#

my $result = $svc->domains('name' => 'ex*mple.com');

#
# get help:
#

my $help = $svc->help;

no cap, that's the entire tour. πŸ¦‹


✨ DESCRIPTION ✨

so Net::RDAP is the big-picture bestie β€” it gives you a unified interface to the whole universe of RIR, domain registry, and domain registrar RDAP services. 🌈

but Net::RDAP::Service? it's the one specific RDAP service interface. locked in, focused, obsessed with a single server.

you can do direct lookups of objects using methods of the same name that Net::RDAP provides. and on top of that, this module lets you do searches. πŸŽ€


✨ METHODS ✨

🌸 Constructor

my $svc = Net::RDAP::Service->new($url);

creates a new Net::RDAP::Service object. $url is a string or a URI object representing the base URL of the service. either one, she's flexible. πŸ’β€β™€οΈ

you can also hand her a second argument, which should be an existing Net::RDAP instance. that one gets used when fetching resources from the server. 🫢

πŸŽ€ TLD Service Constructor

my $svc = Net::RDAP::Service->new_for_tld($tld);

this method searches the IANA registry for an entry for the TLD in $tld and returns the corresponding Net::RDAP::Service object. it's giving "find my server for me bestie." ✨


🌸 Lookup Methods

you can do direct lookups of objects using these methods:

  • domain()
  • ip()
  • autnum()
  • entity()
  • nameserver()

they all work exactly the same way as the methods of the same name on Net::RDAP. no surprises, no plot twists. πŸ’–


🌸 Search Methods

you can perform searches using the following methods. heads up though: different services will support different search functions. not everyone can do everything, and that's okay. πŸ’€

$result = $svc->domains(%QUERY);

$result = $svc->entities(%QUERY);

$result = $svc->nameservers(%QUERY);

$result = $svc->ips(%QUERY);

$result = $svc->autnums(%QUERY);

in all cases, %QUERY is a set of search parameters. here are some examples:

$result = $svc->domains(name => 'ex*mple.com');

$result = $svc->entities(fn => 'Ex*ample, Inc');

$result = $svc->nameservers(ip => '192.0.2.1');

$result = $svc->ips(handle => 'FOOBAR-RIR');

$result = $svc->autnums(handle => 'FOOBAR-RIR');

πŸ¦‹ References

⚠️ note that not all RDAP servers support all search types or parameters. do a vibe check before you rely on it, fr fr.

the following parameters can be specified:

  • domains: "name" (domain name), "nsLdhName" (nameserver name), "nsIp" (nameserver IP address)
  • nameservers: "name" (host name), "ip" (IP address)
  • entities: "handle", "fn" (Formatted Name)
  • ips: "handle", "name"
  • autnums: "handle", "name"

search parameters can contain the wildcard character "*" anywhere in the string. anywhere!! 🌟

these methods all return Net::RDAP::SearchResult objects. πŸ“¦


🚨 IMPORTANT NOTE: due to a lack of server implementations to test against, reverse search. functionality is experimental and should not be relied upon in production code. like, seriously. do not. 😭

some RDAP servers implement "reverse search" which is specified in RFC 9536 https://www.rfc-editor.org/rfc/rfc9536.html. this lets you search for objects based on their relationship to some other object: for example, to search for domains that have a relationship to a specific entity. it's giving "who's connected to who" gossip but for DNS. 🫒

to perform a reverse search (on a server that supports this), pass a set of query parameters using the "entity" parameter:

$result = $svc->domains(entity => { handle => 9999 });

πŸ¦‹ RIR Relation Searches

Section 3 of draft-ietf-regext-rdap-rir-search-11 https://www.ietf.org/archive/id/draft-ietf-regext-rdap-rir-search-11.html#section-3 describes searches and link relations for finding objects and sets of objects with respect to their position within a hierarchy. very "know your place in the family tree" of it all. 🌳

some examples:

$svc->ips(up => q{2001:DB8::42});
πŸ“ since this specification is in draft, this functionality may change significantly in future versions of this module. don't get too attached bestie.

🌸 Help

each RDAP server has a "help" endpoint which provides "helpful information" β€” and yes that's in quotes in the original, we love a self-aware spec β€” which means: command syntax, terms of service, privacy policy, rate-limiting policy, supported authentication methods, supported extensions, technical support contact, etc. the whole info dump. πŸ“‹βœ¨

you get all of that by performing a "help" query:

my $help = $svc->help;

the return value is a Net::RDAP::Help object. πŸ’–


🌸 Extension Implementation

you can figure out if an RDAP server implements a particular RDAP extension using implements():

$svc->implements('lunarNic');

this will return a true value if the RDAP server advertises support for the "lunarNic" extension. πŸŒ™

how does it know? this methods works by checking the "help" response β€” and it will throw an exception if the help request fails. so like, be ready for that. πŸ™ˆ


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!! πŸŽ€ this one's from perl v5.42.2, dated 2026-06-17, and it's the Net::RDAP::Service(3) manual page β€” go forth and query responsibly, ily πŸ’œπŸ¦‹βœ¨

πŸ“¦ where this page comes from