Skip to main content

Overview

RDAP supports search queries that return multiple results. The search result types wrap collections of objects along with metadata like notices and conformance information.

DomainSearchResults

Container for domain search query results.
conformance
Vec<String>
RDAP conformance array
notices
Vec<Notice>
Informational notices about the search
domains
Vec<Domain>
Array of domain objects matching the search
lang
Option<String>
Language tag for textual content

Example

use rdap::{RdapClient, RdapRequest, QueryType, RdapObject};

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = RdapClient::new()?;
    let request = RdapRequest::new(QueryType::DomainSearch, "example*");
    let result = client.query(&request).await?;
    
    if let RdapObject::DomainSearch(search_results) = result {
        println!("Found {} domains", search_results.domains.len());
        for domain in &search_results.domains {
            if let Some(name) = &domain.ldh_name {
                println!("  - {}", name);
            }
        }
    }
    
    Ok(())
}

EntitySearchResults

Container for entity search query results.
conformance
Vec<String>
RDAP conformance array
notices
Vec<Notice>
Informational notices about the search
entities
Vec<Entity>
Array of entity objects matching the search
lang
Option<String>
Language tag for textual content

Example

use rdap::{RdapClient, RdapRequest, QueryType, RdapObject};

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = RdapClient::new()?;
    let request = RdapRequest::new(QueryType::EntitySearch, "ACME*");
    let result = client.query(&request).await?;
    
    if let RdapObject::EntitySearch(search_results) = result {
        println!("Found {} entities", search_results.entities.len());
        for entity in &search_results.entities {
            if let Some(handle) = &entity.handle {
                println!("  - {}", handle);
            }
        }
    }
    
    Ok(())
}

NameserverSearchResults

Container for nameserver search query results.
conformance
Vec<String>
RDAP conformance array
notices
Vec<Notice>
Informational notices about the search
nameservers
Vec<Nameserver>
Array of nameserver objects matching the search
lang
Option<String>
Language tag for textual content

Example

use rdap::{RdapClient, RdapRequest, QueryType, RdapObject};

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = RdapClient::new()?;
    let request = RdapRequest::new(QueryType::NameserverSearch, "ns*.example.com");
    let result = client.query(&request).await?;
    
    if let RdapObject::NameserverSearch(search_results) = result {
        println!("Found {} nameservers", search_results.nameservers.len());
        for ns in &search_results.nameservers {
            if let Some(name) = &ns.ldh_name {
                println!("  - {}", name);
            }
        }
    }
    
    Ok(())
}

Search Support

Not all RDAP servers support search queries. Check the server’s help endpoint or documentation for search capabilities.
Search queries may return partial results due to server limits. Always check the notices field for information about result truncation.

Build docs developers (and LLMs) love