Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Laravel Rdap

Laravel Rdap Laravel Package

spatie/laravel-rdap

Laravel package for performing RDAP lookups (WHOIS successor) to fetch domain registration data as structured JSON. Includes built-in caching for TLD server discovery and RDAP responses, plus configurable retries/timeouts for unreliable endpoints.

View on GitHub
Deep Wiki
Context7

Perform RDAP queries in a Laravel app

Frequently asked questions about Laravel Rdap
How do I perform a domain RDAP lookup in Laravel using this package?
Use the facade `Rdap::domain('example.com')` to query domain data. The response is structured as a `DomainResponse` object with methods like `getRegistrant()`, `hasStatus()`, or `getEvents()`. For IPs, use `Rdap::ip('8.8.8.8')` instead.
Which Laravel versions are supported by spatie/laravel-rdap?
The package officially supports Laravel 10 through 13.x. For older versions (e.g., Laravel 9.x), you may need to backport the package or use a fork. Always check the [GitHub releases](https://github.com/spatie/laravel-rdap/releases) for version-specific notes.
Can I cache RDAP responses to improve performance?
Yes, the package includes built-in caching for both TLD server discovery and RDAP responses. Configure caching via the `tld_servers_cache` and `response_cache` options in the published config file. Use Laravel’s cache drivers (e.g., Redis, file) for scalability.
How do I handle failed RDAP queries or unsupported TLDs?
The package throws exceptions like `RdapRequestTimedOut` or `InvalidRdapResponse` for failures. Configure retry attempts via `retry_times` in the config. For unsupported TLDs, implement fallback logic (e.g., manual data entry or WHOIS) by catching exceptions in your application layer.
Does this package support IPv6 RDAP queries?
The package supports IPv6 queries, but validation is limited. IPv4 and IPv6 registries are separate, so test thoroughly if IPv6 is critical. The changelog notes minimal IPv6-specific documentation, so review edge cases in your use case.
How can I mock RDAP responses for testing?
Use Laravel’s `Http::fake()` to mock RDAP responses in tests. The package doesn’t include built-in test doubles, but you can simulate API calls by intercepting the HTTP client. For complex scenarios, consider running a local RDAP mock server (e.g., RDAP Mock Server).
Can I use custom or private RDAP servers with this package?
Yes, pass a custom `dnsServer` parameter to `Rdap::domain()` or `Rdap::ip()` to query private or authenticated RDAP endpoints. For credentials, extend the package or use Laravel’s HTTP client middleware to inject headers/auth tokens.
What are the performance implications of high query volumes?
For high traffic, ensure your caching layer (e.g., Redis) is distributed and properly sized. The package uses Laravel’s cache, which may bottleneck under heavy load. Consider rate-limiting queries or implementing a queue system for non-critical lookups.
Are there alternatives to spatie/laravel-rdap for RDAP queries?
For lightweight needs, use PHP’s `file_get_contents()` with RDAP endpoints directly. For Laravel-specific solutions, this package is the most mature. For broader WHOIS/RDAP support, consider `rubix/rdap` (PHP-only) or commercial APIs like WhoisXML API, though they lack Laravel integration.
How do I handle PII (Personally Identifiable Information) in RDAP responses?
RDAP responses may include sensitive data like registrant names or contact details. The package doesn’t log responses by default, but you can manually sanitize or audit data before processing. For compliance (e.g., GDPR), implement custom logging or anonymization logic in your application.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
codraw/framework-extra-bundle
codraw/messenger
codraw/security
codraw/mailer
codraw/contracts
codraw/profiling
codraw/dependency-injection
codraw/tester
codraw/core
nexmo/api-specification
capell-app/block-library
axium/identity
cetria/laravel-dummy-models
cetria/reflection-helper
agropredict/sso-auth-bundle
evolvestudio/spam-protection
datacore/hub-sdk
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony