The official WhoisFreaks PHP SDK: a complete client for WHOIS, DNS, SSL, domain availability, subdomain, IP geolocation, IP reputation, ASN, typosquatting, and domain reputation lookups, plus bulk database downloads. Query real-time and historical domain data, reverse WHOIS, and threat intelligence from PHP with a single API key. Generated from the WhoisFreaks OpenAPI specification and published to Packagist.
Keywords: php whois api, php whois sdk, whoisfreaks php, php domain lookup, php dns api, whois api, whois lookup, domain api, dns api, dns lookup, reverse whois, historical whois, domain availability api, ssl certificate api, ip geolocation api, ip reputation api, asn lookup, subdomain finder, typosquatting api, domain reputation, threat intelligence api, domain data api, whois sdk, domain monitoring, brand protection api
whoisfreaks/whoisfreaks-phpcomposer require whoisfreaks/whoisfreaks-php
Prefer to build the SDK yourself instead of installing from Packagist? Clone the PHP SDK repository and build it locally:
git clone https://github.com/WhoisFreaks/whoisfreaks-php
cd whoisfreaks-php
composer install
A complete walkthrough from an empty directory to a running program:
You need PHP 7.4 or later (PHP 8 supported) and Composer.
mkdir whoisfreaks-test && cd whoisfreaks-test
composer require whoisfreaks/whoisfreaks-php
main.php:<?php
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
use WhoisFreaks\Api\WHOISApi;
use WhoisFreaks\Configuration;
// Read the API key from the environment and set it once.
$config = Configuration::getDefaultConfiguration()
->setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY'));
$whois = new WHOISApi(new Client(), $config);
$record = $whois->whoisLive('whoisfreaks.com');
echo 'Registrar: ', $record->getDomainRegistrar()->getRegistrarName(), PHP_EOL;
echo 'Created: ', $record->getCreateDate(), PHP_EOL;
echo 'Expires: ', $record->getExpiryDate(), PHP_EOL;
export WHOISFREAKS_API_KEY="your_api_key"
php main.php
See Authentication for how to obtain a key. Minimal setup:
<?php
// Live WHOIS Lookup
//
// Parameters for whoisLive (GET /v2.0/whois/live):
// - domainName (string, required)
// - format (string (one of: json, xml), optional)
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
use WhoisFreaks\Api\WHOISApi;
use WhoisFreaks\ApiException;
use WhoisFreaks\Configuration;
// Read the API key from the environment and set it once.
$config = Configuration::getDefaultConfiguration()
->setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY'));
$api = new WHOISApi(new Client(), $config);
try {
$result = $api->whoisLive('whoisfreaks.com');
echo $result, PHP_EOL; // models print as JSON
} catch (ApiException $e) {
fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL);
exit(1);
}
All 94 endpoints are shown below, grouped by category. Each includes its method, path, parameters, and a runnable example. See the full endpoint reference for response shapes and field details.
GET /v2.0/whois/live
<?php
// Live WHOIS Lookup
//
// Parameters for whoisLive (GET /v2.0/whois/live):
// - domainName (string, required)
// - format (string (one of: json, xml), optional)
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
use WhoisFreaks\Api\WHOISApi;
use WhoisFreaks\ApiException;
use WhoisFreaks\Configuration;
// Read the API key from the environment and set it once.
$config = Configuration::getDefaultConfiguration()
->setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY'));
$api = new WHOISApi(new Client(), $config);
try {
$result = $api->whoisLive('whoisfreaks.com');
echo $result, PHP_EOL; // models print as JSON
} catch (ApiException $e) {
fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL);
exit(1);
}
POST /v2.0/bulkwhois/live
<?php
// Bulk WHOIS Lookup
//
// Parameters for bulkWhois (POST /v2.0/bulkwhois/live):
// - format (string (one of: json, xml), optional)
// - body: BulkWhoisRequest (required): request body object
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
use WhoisFreaks\Api\WHOISApi;
use WhoisFreaks\ApiException;
use WhoisFreaks\Configuration;
use WhoisFreaks\Model\BulkWhoisRequest;
// Read the API key from the environment and set it once.
$config = Configuration::getDefaultConfiguration()
->setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY'));
$api = new WHOISApi(new Client(), $config);
$request = new BulkWhoisRequest([
'domainNames' => ['whoisfreaks.com', 'jfreaks.com'],
]);
try {
$result = $api->bulkWhois($request);
echo $result, PHP_EOL; // models print as JSON
} catch (ApiException $e) {
fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL);
exit(1);
}
GET /v2.0/whois/history
<?php
// Historical WHOIS records for a domain
//
// Parameters for whoisHistory (GET /v2.0/whois/history):
// - domainName (string, required): Domain to fetch historical WHOIS records for
// - format (string (one of: json, xml), optional)
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
use WhoisFreaks\Api\WHOISApi;
use WhoisFreaks\ApiException;
use WhoisFreaks\Configuration;
// Read the API key from the environment and set it once.
$config = Configuration::getDefaultConfiguration()
->setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY'));
$api = new WHOISApi(new Client(), $config);
try {
$result = $api->whoisHistory('whoisfreaks.com');
echo $result, PHP_EOL; // models print as JSON
} catch (ApiException $e) {
fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL);
exit(1);
}
GET /v2.0/whois/reverse
<?php
// Reverse WHOIS lookup by keyword
//
// Parameters for whoisReverse (GET /v2.0/whois/reverse):
// - keyword (string, required): Keyword to search across WHOIS records
// - page (integer, optional): Page number
// - format (string (one of: json, xml), optional)
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
use WhoisFreaks\Api\WHOISApi;
use WhoisFreaks\ApiException;
use WhoisFreaks\Configuration;
// Read the API key from the environment and set it once.
$config = Configuration::getDefaultConfiguration()
->setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY'));
$api = new WHOISApi(new Client(), $config);
try {
$result = $api->whoisReverse('whoisfreaks', 1); // keyword, page
echo $result, PHP_EOL; // models print as JSON
} catch (ApiException $e) {
fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL);
exit(1);
}
GET /v2.0/dns/live
<?php
// Live DNS Lookup
//
// Parameters for dnsLive (GET /v2.0/dns/live):
// - domainName (string, optional)
// - ipAddress (string, optional): Use for PTR lookups
// - type (string, required): all or comma-separated: A,MX,NS,TXT,SOA,SPF,AAAA,CNAME
// - format (string (one of: json, xml), optional)
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
use WhoisFreaks\Api\DNSApi;
use WhoisFreaks\ApiException;
use WhoisFreaks\Configuration;
// Read the API key from the environment and set it once.
$config = Configuration::getDefaultConfiguration()
->setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY'));
$api = new DNSApi(new Client(), $config);
try {
$result = $api->dnsLive('A,MX,TXT', 'whoisfreaks.com'); // type, domainName
echo $result, PHP_EOL; // models print as JSON
} catch (ApiException $e) {
fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL);
exit(1);
}
GET /v2.0/dns/historical
<?php
// Historical DNS Lookup
//
// Parameters for dnsHistorical (GET /v2.0/dns/historical):
// - domainName (string, required)
// - type (string, required)
// - page (integer, optional)
// - format (string (one of: json, xml), optional)
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
use WhoisFreaks\Api\DNSApi;
use WhoisFreaks\ApiException;
use WhoisFreaks\Configuration;
// Read the API key from the environment and set it once.
$config = Configuration::getDefaultConfiguration()
->setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY'));
$api = new DNSApi(new Client(), $config);
try {
$result = $api->dnsHistorical('whoisfreaks.com', 'A,MX,TXT', 1); // domainName, type, page
echo $result, PHP_EOL; // models print as JSON
} catch (ApiException $e) {
fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL);
exit(1);
}
GET /v2.1/dns/reverse
<?php
// Reverse DNS Lookup
//
// Parameters for dnsReverse (GET /v2.1/dns/reverse):
// - value (string, required): IP, CIDR, or record value
// - type (string (one of: a, mx, cname, ns, aaaa, txt, soa), required)
// - exact (boolean, optional)
// - page (integer, optional)
// - format (string (one of: json, xml), optional)
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
use WhoisFreaks\Api\DNSApi;
use WhoisFreaks\ApiException;
use WhoisFreaks\Configuration;
// Read the API key from the environment and set it once.
$config = Configuration::getDefaultConfiguration()
->setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY'));
$api = new DNSApi(new Client(), $config);
try {
$result = $api->dnsReverse('8.8.8.8', 'a', true, 1); // value, type, exact, page
echo $result, PHP_EOL; // models print as JSON
} catch (ApiException $e) {
fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL);
exit(1);
}
GET /v2.2/dns/historical
<?php
// Historical DNS Lookup (v2.2)
//
// Parameters for dnsHistoricalV22 (GET /v2.2/dns/historical):
// - domainName (string, required)
// - type (string, required)
// - page (integer, optional)
// - sort (string (one of: asc, desc), optional): Sort direction. Omit to leave the results unsorted.
// - sortBy (string (one of: firstSeen, lastSeen), optional): Field to sort on. Only applies when sort is given.
// - format (string (one of: json, xml), optional)
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
use WhoisFreaks\Api\DNSApi;
use WhoisFreaks\ApiException;
use WhoisFreaks\Configuration;
// Read the API key from the environment and set it once.
$config = Configuration::getDefaultConfiguration()
->setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY'));
$api = new DNSApi(new Client(), $config);
try {
$result = $api->dnsHistoricalV22('whoisfreaks.com', 'A,MX,TXT', 1); // domainName, type, page
echo $result, PHP_EOL; // models print as JSON
} catch (ApiException $e) {
fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL);
exit(1);
}
GET /v2.3/dns/historical
<?php
// Historical DNS Lookup (v2.3)
//
// Parameters for dnsHistoricalV23 (GET /v2.3/dns/historical):
// - domainName (string, required)
// - type (string, required)
// - page (integer, optional)
// - sort (string (one of: asc, desc), optional): Sort direction. Omit to leave the results unsorted.
// - sortBy (string (one of: firstSeen, lastSeen), optional): Field to sort on. Only applies when sort is given.
// - format (string (one of: json, xml), optional)
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
use WhoisFreaks\Api\DNSApi;
use WhoisFreaks\ApiException;
use WhoisFreaks\Configuration;
// Read the API key from the environment and set it once.
$config = Configuration::getDefaultConfiguration()
->setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY'));
$api = new DNSApi(new Client(), $config);
try {
$result = $api->dnsHistoricalV23('whoisfreaks.com', 'A,MX,TXT', 1); // domainName, type, page
echo $result, PHP_EOL; // models print as JSON
} catch (ApiException $e) {
fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL);
exit(1);
}
GET /v2.2/dns/reverse
<?php
// Reverse DNS Lookup (v2.2)
//
// Parameters for dnsReverseV22 (GET /v2.2/dns/reverse):
// - value (string, required): IP, CIDR, or record value
// - type (string (one of: a, mx, cname, ns, aaaa, txt, soa), required)
// - exact (boolean, optional): When false the value is matched as a substring, which is far slower than an exact match...
// - page (integer, optional)
// - sort (string (one of: asc, desc), optional): Sort direction. Omit to leave the results unsorted.
// - sortBy (string (one of: firstSeen, lastSeen), optional): Field to sort on. Only applies when sort is given.
// - format (string (one of: json, xml), optional)
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
use WhoisFreaks\Api\DNSApi;
use WhoisFreaks\ApiException;
use WhoisFreaks\Configuration;
// Read the API key from the environment and set it once.
$config = Configuration::getDefaultConfiguration()
->setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY'));
$api = new DNSApi(new Client(), $config);
try {
$result = $api->dnsReverseV22('8.8.8.8', 'a', true, 1); // value, type, exact, page
echo $result, PHP_EOL; // models print as JSON
} catch (ApiException $e) {
fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL);
exit(1);
}
GET /v2.3/dns/reverse
<?php
// Reverse DNS Lookup (v2.3)
//
// Parameters for dnsReverseV23 (GET /v2.3/dns/reverse):
// - value (string, required): IP, CIDR, or record value
// - type (string (one of: a, mx, cname, ns, aaaa, txt, soa), required)
// - exact (boolean, optional): When false the value is matched as a substring, which is far slower than an exact match...
// - page (integer, optional)
// - sort (string (one of: asc, desc), optional): Sort direction. Omit to leave the results unsorted.
// - sortBy (string (one of: firstSeen, lastSeen), optional): Field to sort on. Only applies when sort is given.
// - format (string (one of: json, xml), optional)
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
use WhoisFreaks\Api\DNSApi;
use WhoisFreaks\ApiException;
use WhoisFreaks\Configuration;
// Read the API key from the environment and set it once.
$config = Configuration::getDefaultConfiguration()
->setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY'));
$api = new DNSApi(new Client(), $config);
try {
$result = $api->dnsReverseV23('8.8.8.8', 'a', true, 1); // value, type, exact, page
echo $result, PHP_EOL; // models print as JSON
} catch (ApiException $e) {
fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL);
exit(1);
}
POST /v2.0/dns/bulk/live
<?php
// Bulk DNS Lookup
//
// Parameters for dnsBulk (POST /v2.0/dns/bulk/live):
// - type (string, required)
// - format (string (one of: json, xml), optional)
// - body: DnsBulkRequest (required): request body object
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
use WhoisFreaks\Api\DNSApi;
use WhoisFreaks\ApiException;
use WhoisFreaks\Configuration;
use WhoisFreaks\Model\DnsBulkRequest;
// Read the API key from the environment and set it once.
$config = Configuration::getDefaultConfiguration()
->setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY'));
$api = new DNSApi(new Client(), $config);
$request = new DnsBulkRequest([
'domainNames' => ['whoisfreaks.com', 'example.com'],
]);
try {
$result = $api->dnsBulk('A,MX,TXT', $request); // type, dnsBulkRequest
echo $result, PHP_EOL; // models print as JSON
} catch (ApiException $e) {
fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL);
exit(1);
}
GET /v2.0/domain/availability
<?php
// Domain Availability Check with Suggestions
//
// Parameters for domainAvailabilityV2 (GET /v2.0/domain/availability):
// - domain (string, required): The domain name to check
// - sug (boolean, optional): Whether to return TLD suggestions alongside the queried domain.
// - count (integer, optional): Number of TLD suggestions to return when sug=true. Maximum is 100.
// - format (string (one of: json, xml), optional)
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
use WhoisFreaks\Api\DomainAvailabilityApi;
use WhoisFreaks\ApiException;
use WhoisFreaks\Configuration;
// Read the API key from the environment and set it once.
$config = Configuration::getDefaultConfiguration()
->setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY'));
$api = new DomainAvailabilityApi(new Client(), $config);
try {
$result = $api->domainAvailabilityV2('google.com', true, 5); // domain, sug, count
echo $result, PHP_EOL; // models print as JSON
} catch (ApiException $e) {
fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL);
exit(1);
}
POST /v2.0/domain/availability
<?php
// Bulk Domain Availability Check
//
// Parameters for bulkDomainAvailabilityV2 (POST /v2.0/domain/availability):
// - domain (string, optional): Required for TLD-mode bulk check (base domain).
// - format (string (one of: json, xml), optional)
// - body: BulkDomainAvailabilityRequest (required): request body object
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
use WhoisFreaks\Api\DomainAvailabilityApi;
use WhoisFreaks\ApiException;
use WhoisFreaks\Configuration;
use WhoisFreaks\Model\BulkDomainAvailabilityRequest;
// Read the API key from the environment and set it once.
$config = Configuration::getDefaultConfiguration()
->setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY'));
$api = new DomainAvailabilityApi(new Client(), $config);
$request = new BulkDomainAvailabilityRequest([
'domainNames' => ['whoisfreaks.com', 'example.com'],
]);
try {
$result = $api->bulkDomainAvailabilityV2($request);
echo $result, PHP_EOL; // models print as JSON
} catch (ApiException $e) {
fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL);
exit(1);
}
GET /v3.0/domain/typos
<?php
// Typosquatting Lookup
//
// Parameters for typosquatting (GET /v3.0/domain/typos):
// - keyword (string, optional)
// - pattern (string, optional)
// - pageToken (string, optional)
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
use WhoisFreaks\Api\TyposquattingApi;
use WhoisFreaks\ApiException;
use WhoisFreaks\Configuration;
// Read the API key from the environment and set it once.
$config = Configuration::getDefaultConfiguration()
->setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY'));
$api = new TyposquattingApi(new Client(), $config);
try {
$result = $api->typosquatting('whoisfreaks');
echo $result, PHP_EOL; // models print as JSON
} catch (ApiException $e) {
fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL);
exit(1);
}
GET /v1.0/ssl/live
<?php
// SSL Certificate Lookup
//
// Parameters for sslLookup (GET /v1.0/ssl/live):
// - domainName (string, required)
// - chain (boolean, optional)
// - sslRaw (boolean, optional)
// - format (string (one of: json, xml), optional)
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
use WhoisFreaks\Api\SSLApi;
use WhoisFreaks\ApiException;
use WhoisFreaks\Configuration;
// Read the API key from the environment and set it once.
$config = Configuration::getDefaultConfiguration()
->setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY'));
$api = new SSLApi(new Client(), $config);
try {
$result = $api->sslLookup('whoisfreaks.com');
echo $result, PHP_EOL; // models print as JSON
} catch (ApiException $e) {
fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL);
exit(1);
}
GET /v1.0/geolocation
<?php
// IP Geolocation Lookup
//
// Parameters for geolocation (GET /v1.0/geolocation):
// - ip (string, required)
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
use WhoisFreaks\Api\GeolocationApi;
use WhoisFreaks\ApiException;
use WhoisFreaks\Configuration;
// Read the API key from the environment and set it once.
$config = Configuration::getDefaultConfiguration()
->setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY'));
$api = new GeolocationApi(new Client(), $config);
try {
$result = $api->geolocation('8.8.8.8');
echo $result, PHP_EOL; // models print as JSON
} catch (ApiException $e) {
fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL);
exit(1);
}
POST /v1.0/geolocation
<?php
// Bulk IP Geolocation
//
// Parameters for bulkGeolocation (POST /v1.0/geolocation):
// - body: BulkGeolocationRequest (required): request body object
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
use WhoisFreaks\Api\GeolocationApi;
use WhoisFreaks\ApiException;
use WhoisFreaks\Configuration;
use WhoisFreaks\Model\BulkGeolocationRequest;
// Read the API key from the environment and set it once.
$config = Configuration::getDefaultConfiguration()
->setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY'));
$api = new GeolocationApi(new Client(), $config);
$request = new BulkGeolocationRequest([
'ips' => ['8.8.8.8', '1.1.1.1'],
]);
try {
$results = $api->bulkGeolocation($request);
foreach ($results as $result) {
echo $result, PHP_EOL; // models print as JSON
}
} catch (ApiException $e) {
fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL);
exit(1);
}
GET /v1.0/subdomains
<?php
// Subdomains Lookup
//
// Parameters for subdomains (GET /v1.0/subdomains):
// - domain (string, required)
// - after (string, optional)
// - before (string, optional)
// - status (string (one of: active, inactive), optional)
// - page (integer, optional)
// - format (string (one of: json, xml), optional)
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
use WhoisFreaks\Api\SubdomainsApi;
use WhoisFreaks\ApiException;
use WhoisFreaks\Configuration;
// Read the API key from the environment and set it once.
$config = Configuration::getDefaultConfiguration()
->setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY'));
$api = new SubdomainsApi(new Client(), $config);
try {
$result = $api->subdomains('whoisfreaks.com', null, null, null, 1); // domain, after, before, status, page
echo $result, PHP_EOL; // models print as JSON
} catch (ApiException $e) {
fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL);
exit(1);
}
GET /v1.0/security
<?php
// IP Reputation Lookup
//
// Parameters for ipReputation (GET /v1.0/security):
// - ip (string, required)
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
use WhoisFreaks\Api\IPReputationApi;
use WhoisFreaks\ApiException;
use WhoisFreaks\Configuration;
// Read the API key from the environment and set it once.
$config = Configuration::getDefaultConfiguration()
->setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY'));
$api = new IPReputationApi(new Client(), $config);
try {
$result = $api->ipReputation('8.8.8.8');
echo $result, PHP_EOL; // models print as JSON
} catch (ApiException $e) {
fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL);
exit(1);
}
POST /v1.0/security
<?php
// Bulk IP Reputation
//
// Parameters for bulkIpReputation (POST /v1.0/security):
// - body: BulkGeolocationRequest (required): request body object
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
use WhoisFreaks\Api\IPReputationApi;
use WhoisFreaks\ApiException;
use WhoisFreaks\Configuration;
use WhoisFreaks\Model\BulkGeolocationRequest;
// Read the API key from the environment and set it once.
$config = Configuration::getDefaultConfiguration()
->setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY'));
$api = new IPReputationApi(new Client(), $config);
$request = new BulkGeolocationRequest([
'ips' => ['8.8.8.8', '1.1.1.1'],
]);
try {
$results = $api->bulkIpReputation($request);
foreach ($results as $result) {
echo $result, PHP_EOL; // models print as JSON
}
} catch (ApiException $e) {
fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL);
exit(1);
}
GET /v2.0/security
<?php
// IP Reputation Lookup (v2.0)
//
// Parameters for ipReputationV2 (GET /v2.0/security):
// - ip (string, required)
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
use WhoisFreaks\Api\IPReputationApi;
use WhoisFreaks\ApiException;
use WhoisFreaks\Configuration;
// Read the API key from the environment and set it once.
$config = Configuration::getDefaultConfiguration()
->setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY'));
$api = new IPReputationApi(new Client(), $config);
try {
$result = $api->ipReputationV2('8.8.8.8');
echo $result, PHP_EOL; // models print as JSON
} catch (ApiException $e) {
fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL);
exit(1);
}
POST /v2.0/security
<?php
// Bulk IP Reputation (v2.0)
//
// Parameters for bulkIpReputationV2 (POST /v2.0/security):
// - body: BulkGeolocationRequest (required): request body object
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
use WhoisFreaks\Api\IPReputationApi;
use WhoisFreaks\ApiException;
use WhoisFreaks\Configuration;
use WhoisFreaks\Model\BulkGeolocationRequest;
// Read the API key from the environment and set it once.
$config = Configuration::getDefaultConfiguration()
->setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY'));
$api = new IPReputationApi(new Client(), $config);
$request = new BulkGeolocationRequest([
'ips' => ['1.1.1.1', '2.2.2.2', '8.8.8.8'],
]);
try {
$results = $api->bulkIpReputationV2($request);
foreach ($results as $result) {
echo $result, PHP_EOL; // models print as JSON
}
} catch (ApiException $e) {
fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL);
exit(1);
}
GET /v1/domain/security
<?php
// Domain Reputation Lookup
//
// Parameters for domainReputation (GET /v1/domain/security):
// - domainName (string, required): The domain name to assess
// - format (string (one of: json, xml), optional)
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
use WhoisFreaks\Api\DomainReputationApi;
use WhoisFreaks\ApiException;
use WhoisFreaks\Configuration;
// Read the API key from the environment and set it once.
$config = Configuration::getDefaultConfiguration()
->setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY'));
$api = new DomainReputationApi(new Client(), $config);
try {
$result = $api->domainReputation('amazon.com');
echo $result, PHP_EOL; // models print as JSON
} catch (ApiException $e) {
fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL);
exit(1);
}
GET /v2.0/asn-whois
<?php
// ASN WHOIS Lookup
//
// Parameters for asnWhois (GET /v2.0/asn-whois):
// - asn (string, required)
// - format (string (one of: json, xml), optional)
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
use WhoisFreaks\Api\ASNWHOISApi;
use WhoisFreaks\ApiException;
use WhoisFreaks\Configuration;
// Read the API key from the environment and set it once.
$config = Configuration::getDefaultConfiguration()
->setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY'));
$api = new ASNWHOISApi(new Client(), $config);
try {
$result = $api->asnWhois('as15169');
echo $result, PHP_EOL; // models print as JSON
} catch (ApiException $e) {
fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL);
exit(1);
}
GET /v1.0/ip-whois
<?php
// IP WHOIS Lookup
//
// Parameters for ipWhois (GET /v1.0/ip-whois):
// - ip (string, required)
// - format (string (one of: json, xml), optional)
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
use WhoisFreaks\Api\IPWHOISApi;
use WhoisFreaks\ApiException;
use WhoisFreaks\Configuration;
// Read the API key from the environment and set it once.
$config = Configuration::getDefaultConfiguration()
->setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY'));
$api = new IPWHOISApi(new Client(), $config);
try {
$result = $api->ipWhois('8.8.8.8');
echo $result, PHP_EOL; // models print as JSON
} catch (ApiException $e) {
fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL);
exit(1);
}
GET /v1.0/api-key/rotate
<?php
// Rotate API Key
//
// Parameters for rotateApiKey (GET /v1.0/api-key/rotate):
// (no parameters; the API key is set on the client)
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
use WhoisFreaks\Api\AccountApi;
use WhoisFreaks\ApiException;
use WhoisFreaks\Configuration;
// Read the API key from the environment and set it once.
$config = Configuration::getDefaultConfiguration()
->setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY'));
$api = new AccountApi(new Client(), $config);
try {
$newKey = $api->rotateApiKey();
// The old key stops working now: store the new one before making more calls.
echo 'New API key: ', $newKey, PHP_EOL;
} catch (ApiException $e) {
fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL);
exit(1);
}
GET /v1.0/whoisapi/usage
<?php
// Account Usage
//
// Parameters for accountUsage (GET /v1.0/whoisapi/usage):
// (no parameters; the API key is set on the client)
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
use WhoisFreaks\Api\AccountApi;
use WhoisFreaks\ApiException;
use WhoisFreaks\Configuration;
// Read the API key from the environment and set it once.
$config = Configuration::getDefaultConfiguration()
->setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY'));
$api = new AccountApi(new Client(), $config);
try {
$result = $api->accountUsage();
echo $result, PHP_EOL; // models print as JSON
} catch (ApiException $e) {
fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL);
exit(1);
}
GET /v3.4/status
<?php
// Database File Status (Public)
//
// Parameters for databaseFileStatus (GET /v3.4/status):
// (no parameters; no API key required)
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
use WhoisFreaks\Api\AccountApi;
use WhoisFreaks\ApiException;
use WhoisFreaks\Configuration;
// Read the API key from the environment and set it once.
// (This endpoint is public, so the key is not sent with this request.)
$config = Configuration::getDefaultConfiguration()
->setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY'));
$api = new AccountApi(new Client(), $config);
try {
$result = $api->databaseFileStatus();
echo $result, PHP_EOL; // models print as JSON
} catch (ApiException $e) {
fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL);
exit(1);
}
GET /v3.1/download/domainer/gtld
<?php
// Newly Registered gTLD (CSV)
//
// Parameters for dbNewlyGtld (GET /v3.1/download/domainer/gtld):
// - whois (boolean, required)
// - date (string, optional): yyyy-MM-dd; omit for latest
// - tlds (string, optional)
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
use WhoisFreaks\Api\DatabasesNewlyRegisteredApi;
use WhoisFreaks\ApiException;
use WhoisFreaks\Configuration;
// Read the API key from the environment and set it once.
$config = Configuration::getDefaultConfiguration()
->setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY'));
$api = new DatabasesNewlyRegisteredApi(new Client(), $config);
try {
$file = $api->dbNewlyGtld(true, '2026-10-01'); // whois, date
// The SDK streams the download into a temporary file: copy it somewhere permanent.
$saveAs = 'DbNewlyGtld.csv';
copy($file->getPathname(), $saveAs);
echo 'Saved ', realpath($saveAs), ' (', filesize($saveAs), ' bytes)', PHP_EOL;
} catch (ApiException $e) {
fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL);
exit(1);
}
GET /v3.1/download/domainer/cctld
<?php
// Newly Registered ccTLD (CSV)
//
// Parameters for dbNewlyCctld (GET /v3.1/download/domainer/cctld):
// - whois (boolean, required)
// - date (string, optional): yyyy-MM-dd; omit for latest
// - tlds (string, optional)
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
use WhoisFreaks\Api\DatabasesNewlyRegisteredApi;
use WhoisFreaks\ApiException;
use WhoisFreaks\Configuration;
// Read the API key from the environment and set it once.
$config = Configuration::getDefaultConfiguration()
->setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY'));
$api = new DatabasesNewlyRegisteredApi(new Client(), $config);
try {
$file = $api->dbNewlyCctld(true, '2026-10-01'); // whois, date
// The SDK streams the download into a temporary file: copy it somewhere permanent.
$saveAs = 'DbNewlyCctld.csv';
copy($file->getPathname(), $saveAs);
echo 'Saved ', realpath($saveAs), ' (', filesize($saveAs), ' bytes)', PHP_EOL;
} catch (ApiException $e) {
fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL);
exit(1);
}
GET /v3.1/download/domainer/gtld/cleaned
<?php
// Newly Registered gTLD Cleaned WHOIS (CSV)
//
// Parameters for dbNewlyGtldCleaned (GET /v3.1/download/domainer/gtld/cleaned):
// - date (string, optional): yyyy-MM-dd; omit for latest
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
use WhoisFreaks\Api\DatabasesNewlyRegisteredApi;
use WhoisFreaks\ApiException;
use WhoisFreaks\Configuration;
// Read the API key from the environment and set it once.
$config = Configuration::getDefaultConfiguration()
->setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY'));
$api = new DatabasesNewlyRegisteredApi(new Client(), $config);
try {
$file = $api->dbNewlyGtldCleaned('2026-10-01');
// The SDK streams the download into a temporary file: copy it somewhere permanent.
$saveAs = 'DbNewlyGtldCleaned.csv';
copy($file->getPathname(), $saveAs);
echo 'Saved ', realpath($saveAs), ' (', filesize($saveAs), ' bytes)', PHP_EOL;
} catch (ApiException $e) {
fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL);
exit(1);
}
GET /v3.1/download/domainer/cctld/cleaned
<?php
// Newly Registered ccTLD Cleaned WHOIS (CSV)
//
// Parameters for dbNewlyCctldCleaned (GET /v3.1/download/domainer/cctld/cleaned):
// - date (string, optional): yyyy-MM-dd; omit for latest
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
use WhoisFreaks\Api\DatabasesNewlyRegisteredApi;
use WhoisFreaks\ApiException;
use WhoisFreaks\Configuration;
// Read the API key from the environment and set it once.
$config = Configuration::getDefaultConfiguration()
->setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY'));
$api = new DatabasesNewlyRegisteredApi(new Client(), $config);
try {
$file = $api->dbNewlyCctldCleaned('2026-10-01');
// The SDK streams the download into a temporary file: copy it somewhere permanent.
$saveAs = 'DbNewlyCctldCleaned.csv';
copy($file->getPathname(), $saveAs);
echo 'Saved ', realpath($saveAs), ' (', filesize($saveAs), ' bytes)', PHP_EOL;
} catch (ApiException $e) {
fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL);
exit(1);
}
GET /v3.1/domains/newly/gtld
<?php
// Newly Registered gTLD (JSON)
//
// Parameters for dbNewlyGtldJson (GET /v3.1/domains/newly/gtld):
// - date (string, optional): yyyy-MM-dd; omit for latest
// - tlds (string, optional)
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
use WhoisFreaks\Api\DatabasesNewlyRegisteredApi;
use WhoisFreaks\ApiException;
use WhoisFreaks\Configuration;
// Read the API key from the environment and set it once.
$config = Configuration::getDefaultConfiguration()
->setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY'));
$api = new DatabasesNewlyRegisteredApi(new Client(), $config);
try {
$domains = $api->dbNewlyGtldJson('2026-10-01');
echo implode(PHP_EOL, $domains), PHP_EOL;
} catch (ApiException $e) {
fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL);
exit(1);
}
GET /v3.1/domains/newly/cctld
<?php
// Newly Registered ccTLD (JSON)
//
// Parameters for dbNewlyCctldJson (GET /v3.1/domains/newly/cctld):
// - date (string, optional): yyyy-MM-dd; omit for latest
// - tlds (string, optional)
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
use WhoisFreaks\Api\DatabasesNewlyRegisteredApi;
use WhoisFreaks\ApiException;
use WhoisFreaks\Configuration;
// Read the API key from the environment and set it once.
$config = Configuration::getDefaultConfiguration()
->setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY'));
$api = new DatabasesNewlyRegisteredApi(new Client(), $config);
try {
$domains = $api->dbNewlyCctldJson('2026-10-01');
echo implode(PHP_EOL, $domains), PHP_EOL;
} catch (ApiException $e) {
fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL);
exit(1);
}
GET /v3.1/download/domainer/newly/dns
<?php
// Newly Registered With DNS
//
// Parameters for dbNewlyDns (GET /v3.1/download/domainer/newly/dns):
// - date (string, optional): yyyy-MM-dd; omit for latest
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
use WhoisFreaks\Api\DatabasesNewlyRegisteredApi;
use WhoisFreaks\ApiException;
use WhoisFreaks\Configuration;
// Read the API key from the environment and set it once.
$config = Configuration::getDefaultConfiguration()
->setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY'));
$api = new DatabasesNewlyRegisteredApi(new Client(), $config);
try {
$file = $api->dbNewlyDns('2026-10-01');
// The SDK streams the download into a temporary file: copy it somewhere permanent.
$saveAs = 'DbNewlyDns.json';
copy($file->getPathname(), $saveAs);
echo 'Saved ', realpath($saveAs), ' (', filesize($saveAs), ' bytes)', PHP_EOL;
} catch (ApiException $e) {
fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL);
exit(1);
}
GET /v3.1/download/domainer/expired
<?php
// Expiring Domains
//
// Parameters for dbExpired (GET /v3.1/download/domainer/expired):
// - whois (boolean, required)
// - date (string, optional): yyyy-MM-dd; omit for latest
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
use WhoisFreaks\Api\DatabasesExpiringDroppedApi;
use WhoisFreaks\ApiException;
use WhoisFreaks\Configuration;
// Read the API key from the environment and set it once.
$config = Configuration::getDefaultConfiguration()
->setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY'));
$api = new DatabasesExpiringDroppedApi(new Client(), $config);
try {
$file = $api->dbExpired(true, '2026-10-01'); // whois, date
// The SDK streams the download into a temporary file: copy it somewhere permanent.
$saveAs = 'DbExpired.csv';
copy($file->getPathname(), $saveAs);
echo 'Saved ', realpath($saveAs), ' (', filesize($saveAs), ' bytes)', PHP_EOL;
} catch (ApiException $e) {
fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL);
exit(1);
}
GET /v3.1/download/domainer/expired/cleaned
<?php
// Expiring Cleaned WHOIS
//
// Parameters for dbExpiredCleaned (GET /v3.1/download/domainer/expired/cleaned):
// - date (string, optional): yyyy-MM-dd; omit for latest
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
use WhoisFreaks\Api\DatabasesExpiringDroppedApi;
use WhoisFreaks\ApiException;
use WhoisFreaks\Configuration;
// Read the API key from the environment and set it once.
$config = Configuration::getDefaultConfiguration()
->setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY'));
$api = new DatabasesExpiringDroppedApi(new Client(), $config);
try {
$file = $api->dbExpiredCleaned('2026-10-01');
// The SDK streams the download into a temporary file: copy it somewhere permanent.
$saveAs = 'DbExpiredCleaned.csv';
copy($file->getPathname(), $saveAs);
echo 'Saved ', realpath($saveAs), ' (', filesize($saveAs), ' bytes)', PHP_EOL;
} catch (ApiException $e) {
fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL);
exit(1);
}
GET /v3.1/download/domainer/dropped
<?php
// Dropped Domains
//
// Parameters for dbDropped (GET /v3.1/download/domainer/dropped):
// - whois (boolean, required)
// - date (string, optional): yyyy-MM-dd; omit for latest
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
use WhoisFreaks\Api\DatabasesExpiringDroppedApi;
use WhoisFreaks\ApiException;
use WhoisFreaks\Configuration;
// Read the API key from the environment and set it once.
$config = Configuration::getDefaultConfiguration()
->setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY'));
$api = new DatabasesExpiringDroppedApi(new Client(), $config);
try {
$file = $api->dbDropped(true, '2026-10-01'); // whois, date
// The SDK streams the download into a temporary file: copy it somewhere permanent.
$saveAs = 'DbDropped.csv';
copy($file->getPathname(), $saveAs);
echo 'Saved ', realpath($saveAs), ' (', filesize($saveAs), ' bytes)', PHP_EOL;
} catch (ApiException $e) {
fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL);
exit(1);
}
GET /v3.1/domains/dropped
<?php
// Dropped Domains (JSON)
//
// Parameters for dbDroppedJson (GET /v3.1/domains/dropped):
// - date (string, optional): yyyy-MM-dd; omit for latest
// - tlds (string, optional)
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
use WhoisFreaks\Api\DatabasesExpiringDroppedApi;
use WhoisFreaks\ApiException;
use WhoisFreaks\Configuration;
// Read the API key from the environment and set it once.
$config = Configuration::getDefaultConfiguration()
->setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY'));
$api = new DatabasesExpiringDroppedApi(new Client(), $config);
try {
$domains = $api->dbDroppedJson('2026-10-01');
echo implode(PHP_EOL, $domains), PHP_EOL;
} catch (ApiException $e) {
fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL);
exit(1);
}
GET /v3.3/download/domainer/dropped/backlinks
<?php
// Dropped With Backlinks
//
// Parameters for dbDroppedBacklinks (GET /v3.3/download/domainer/dropped/backlinks):
// - whois (boolean, optional)
// - date (string, optional): yyyy-MM-dd; omit for latest
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
use WhoisFreaks\Api\DatabasesExpiringDroppedApi;
use WhoisFreaks\ApiException;
use WhoisFreaks\Configuration;
// Read the API key from the environment and set it once.
$config = Configuration::getDefaultConfiguration()
->setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY'));
$api = new DatabasesExpiringDroppedApi(new Client(), $config);
try {
$file = $api->dbDroppedBacklinks(null, '2026-10-01'); // whois, date
// The SDK streams the download into a temporary file: copy it somewhere permanent.
$saveAs = 'DbDroppedBacklinks.csv';
copy($file->getPathname(), $saveAs);
echo 'Saved ', realpath($saveAs), ' (', filesize($saveAs), ' bytes)', PHP_EOL;
} catch (ApiException $e) {
fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL);
exit(1);
}
GET /v3.3/download/dbupdate/daily/domains/whois
<?php
// WHOIS Database Daily
//
// Parameters for dbWhoisDaily (GET /v3.3/download/dbupdate/daily/domains/whois):
// - date (string, optional): yyyy-MM-dd; omit for latest
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
use WhoisFreaks\Api\DatabasesWHOISApi;
use WhoisFreaks\ApiException;
use WhoisFreaks\Configuration;
// Read the API key from the environment and set it once.
$config = Configuration::getDefaultConfiguration()
->setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY'));
$api = new DatabasesWHOISApi(new Client(), $config);
try {
$file = $api->dbWhoisDaily('2026-10-01');
// The SDK streams the download into a temporary file: copy it somewhere permanent.
$saveAs = 'DbWhoisDaily.csv';
copy($file->getPathname(), $saveAs);
echo 'Saved ', realpath($saveAs), ' (', filesize($saveAs), ' bytes)', PHP_EOL;
} catch (ApiException $e) {
fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL);
exit(1);
}
GET /v3.3/download/dbupdate/weekly/domains/whois
<?php
// WHOIS Database Weekly
//
// Parameters for dbWhoisWeekly (GET /v3.3/download/dbupdate/weekly/domains/whois):
// - date (string, optional): yyyy-MM-dd; omit for latest
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
use WhoisFreaks\Api\DatabasesWHOISApi;
use WhoisFreaks\ApiException;
use WhoisFreaks\Configuration;
// Read the API key from the environment and set it once.
$config = Configuration::getDefaultConfiguration()
->setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY'));
$api = new DatabasesWHOISApi(new Client(), $config);
try {
$file = $api->dbWhoisWeekly('2026-10-01');
// The SDK streams the download into a temporary file: copy it somewhere permanent.
$saveAs = 'DbWhoisWeekly.csv';
copy($file->getPathname(), $saveAs);
echo 'Saved ', realpath($saveAs), ' (', filesize($saveAs), ' bytes)', PHP_EOL;
} catch (ApiException $e) {
fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL);
exit(1);
}
GET /v3.3/download/dbupdate/monthly/domains/whois
<?php
// WHOIS Database Monthly
//
// Parameters for dbWhoisMonthly (GET /v3.3/download/dbupdate/monthly/domains/whois):
// - date (string, optional): yyyy-MM-dd; omit for latest
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
use WhoisFreaks\Api\DatabasesWHOISApi;
use WhoisFreaks\ApiException;
use WhoisFreaks\Configuration;
// Read the API key from the environment and set it once.
$config = Configuration::getDefaultConfiguration()
->setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY'));
$api = new DatabasesWHOISApi(new Client(), $config);
try {
$file = $api->dbWhoisMonthly('2026-10-01');
// The SDK streams the download into a temporary file: copy it somewhere permanent.
$saveAs = 'DbWhoisMonthly.csv';
copy($file->getPathname(), $saveAs);
echo 'Saved ', realpath($saveAs), ' (', filesize($saveAs), ' bytes)', PHP_EOL;
} catch (ApiException $e) {
fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL);
exit(1);
}
GET /v3.2/download/dbupdate/daily/dns
<?php
// DNS Database Daily
//
// Parameters for dbDnsDaily (GET /v3.2/download/dbupdate/daily/dns):
// - date (string, optional): yyyy-MM-dd; omit for latest
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
use WhoisFreaks\Api\DatabasesDNSApi;
use WhoisFreaks\ApiException;
use WhoisFreaks\Configuration;
// Read the API key from the environment and set it once.
$config = Configuration::getDefaultConfiguration()
->setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY'));
$api = new DatabasesDNSApi(new Client(), $config);
try {
$file = $api->dbDnsDaily('2026-10-01');
// The SDK streams the download into a temporary file: copy it somewhere permanent.
$saveAs = 'DbDnsDaily.csv';
copy($file->getPathname(), $saveAs);
echo 'Saved ', realpath($saveAs), ' (', filesize($saveAs), ' bytes)', PHP_EOL;
} catch (ApiException $e) {
fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL);
exit(1);
}
GET /v3.2/download/dbupdate/weekly/dns
<?php
// DNS Database Weekly
//
// Parameters for dbDnsWeekly (GET /v3.2/download/dbupdate/weekly/dns):
// - date (string, optional): yyyy-MM-dd; omit for latest
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
use WhoisFreaks\Api\DatabasesDNSApi;
use WhoisFreaks\ApiException;
use WhoisFreaks\Configuration;
// Read the API key from the environment and set it once.
$config = Configuration::getDefaultConfiguration()
->setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY'));
$api = new DatabasesDNSApi(new Client(), $config);
try {
$file = $api->dbDnsWeekly('2026-10-01');
// The SDK streams the download into a temporary file: copy it somewhere permanent.
$saveAs = 'DbDnsWeekly.csv';
copy($file->getPathname(), $saveAs);
echo 'Saved ', realpath($saveAs), ' (', filesize($saveAs), ' bytes)', PHP_EOL;
} catch (ApiException $e) {
fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL);
exit(1);
}
GET /v3.2/download/dbupdate/monthly/dns
<?php
// DNS Database Monthly
//
// Parameters for dbDnsMonthly (GET /v3.2/download/dbupdate/monthly/dns):
// - date (string, optional): yyyy-MM-dd; omit for latest
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
use WhoisFreaks\Api\DatabasesDNSApi;
use WhoisFreaks\ApiException;
use WhoisFreaks\Configuration;
// Read the API key from the environment and set it once.
$config = Configuration::getDefaultConfiguration()
->setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY'));
$api = new DatabasesDNSApi(new Client(), $config);
try {
$file = $api->dbDnsMonthly('2026-10-01');
// The SDK streams the download into a temporary file: copy it somewhere permanent.
$saveAs = 'DbDnsMonthly.csv';
copy($file->getPathname(), $saveAs);
echo 'Saved ', realpath($saveAs), ' (', filesize($saveAs), ' bytes)', PHP_EOL;
} catch (ApiException $e) {
fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL);
exit(1);
}
GET /v3.2/download/dbupdate/daily/subdomains
<?php
// Subdomains Daily
//
// Parameters for dbSubdomainsDaily (GET /v3.2/download/dbupdate/daily/subdomains):
// - date (string, optional): yyyy-MM-dd; omit for latest
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
use WhoisFreaks\Api\DatabasesSubdomainsApi;
use WhoisFreaks\ApiException;
use WhoisFreaks\Configuration;
// Read the API key from the environment and set it once.
$config = Configuration::getDefaultConfiguration()
->setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY'));
$api = new DatabasesSubdomainsApi(new Client(), $config);
try {
$file = $api->dbSubdomainsDaily('2026-10-01');
// The SDK streams the download into a temporary file: copy it somewhere permanent.
$saveAs = 'DbSubdomainsDaily.csv';
copy($file->getPathname(), $saveAs);
echo 'Saved ', realpath($saveAs), ' (', filesize($saveAs), ' bytes)', PHP_EOL;
} catch (ApiException $e) {
fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL);
exit(1);
}
GET /v3.2/download/dbupdate/weekly/subdomains
<?php
// Subdomains Weekly
//
// Parameters for dbSubdomainsWeekly (GET /v3.2/download/dbupdate/weekly/subdomains):
// - date (string, optional): yyyy-MM-dd; omit for latest
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
use WhoisFreaks\Api\DatabasesSubdomainsApi;
use WhoisFreaks\ApiException;
use WhoisFreaks\Configuration;
// Read the API key from the environment and set it once.
$config = Configuration::getDefaultConfiguration()
->setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY'));
$api = new DatabasesSubdomainsApi(new Client(), $config);
try {
$file = $api->dbSubdomainsWeekly('2026-10-01');
// The SDK streams the download into a temporary file: copy it somewhere permanent.
$saveAs = 'DbSubdomainsWeekly.csv';
copy($file->getPathname(), $saveAs);
echo 'Saved ', realpath($saveAs), ' (', filesize($saveAs), ' bytes)', PHP_EOL;
} catch (ApiException $e) {
fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL);
exit(1);
}
GET /v3.2/download/dbupdate/monthly/subdomains
<?php
// Subdomains Monthly
//
// Parameters for dbSubdomainsMonthly (GET /v3.2/download/dbupdate/monthly/subdomains):
// - date (string, optional): yyyy-MM-dd; omit for latest
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
use WhoisFreaks\Api\DatabasesSubdomainsApi;
use WhoisFreaks\ApiException;
use WhoisFreaks\Configuration;
// Read the API key from the environment and set it once.
$config = Configuration::getDefaultConfiguration()
->setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY'));
$api = new DatabasesSubdomainsApi(new Client(), $config);
try {
$file = $api->dbSubdomainsMonthly('2026-10-01');
// The SDK streams the download into a temporary file: copy it somewhere permanent.
$saveAs = 'DbSubdomainsMonthly.csv';
copy($file->getPathname(), $saveAs);
echo 'Saved ', realpath($saveAs), ' (', filesize($saveAs), ' bytes)', PHP_EOL;
} catch (ApiException $e) {
fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL);
exit(1);
}
GET /v3.3/status/snapshot/ip/country
<?php
// IP to Country Snapshot Status
//
// Parameters for dbIpCountryStatus (GET /v3.3/status/snapshot/ip/country):
// (no parameters; the API key is set on the client)
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
use WhoisFreaks\Api\DatabasesIPGeolocationApi;
use WhoisFreaks\ApiException;
use WhoisFreaks\Configuration;
// Read the API key from the environment and set it once.
$config = Configuration::getDefaultConfiguration()
->setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY'));
$api = new DatabasesIPGeolocationApi(new Client(), $config);
try {
$result = $api->dbIpCountryStatus();
echo $result, PHP_EOL; // models print as JSON
} catch (ApiException $e) {
fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL);
exit(1);
}
GET /v3.3/download/snapshot/ip/country
<?php
// IP to Country Snapshot
//
// Parameters for dbIpCountry (GET /v3.3/download/snapshot/ip/country):
// - date (string, required)
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
use WhoisFreaks\Api\DatabasesIPGeolocationApi;
use WhoisFreaks\ApiException;
use WhoisFreaks\Configuration;
// Read the API key from the environment and set it once.
$config = Configuration::getDefaultConfiguration()
->setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY'));
$api = new DatabasesIPGeolocationApi(new Client(), $config);
try {
$file = $api->dbIpCountry('2026-10-01');
// The SDK streams the download into a temporary file: copy it somewhere permanent.
$saveAs = 'DbIpCountry.zip';
copy($file->getPathname(), $saveAs);
echo 'Saved ', realpath($saveAs), ' (', filesize($saveAs), ' bytes)', PHP_EOL;
} catch (ApiException $e) {
fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL);
exit(1);
}
GET /v3.3/status/snapshot/ip/city
<?php
// IP to City Snapshot Status
//
// Parameters for dbIpCityStatus (GET /v3.3/status/snapshot/ip/city):
// (no parameters; the API key is set on the client)
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
use WhoisFreaks\Api\DatabasesIPGeolocationApi;
use WhoisFreaks\ApiException;
use WhoisFreaks\Configuration;
// Read the API key from the environment and set it once.
$config = Configuration::getDefaultConfiguration()
->setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY'));
$api = new DatabasesIPGeolocationApi(new Client(), $config);
try {
$result = $api->dbIpCityStatus();
echo $result, PHP_EOL; // models print as JSON
} catch (ApiException $e) {
fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL);
exit(1);
}
GET /v3.3/download/snapshot/ip/city
<?php
// IP to City Snapshot
//
// Parameters for dbIpCity (GET /v3.3/download/snapshot/ip/city):
// - date (string, required)
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
use WhoisFreaks\Api\DatabasesIPGeolocationApi;
use WhoisFreaks\ApiException;
use WhoisFreaks\Configuration;
// Read the API key from the environment and set it once.
$config = Configuration::getDefaultConfiguration()
->setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY'));
$api = new DatabasesIPGeolocationApi(new Client(), $config);
try {
$file = $api->dbIpCity('2026-10-01');
// The SDK streams the download into a temporary file: copy it somewhere permanent.
$saveAs = 'DbIpCity.zip';
copy($file->getPathname(), $saveAs);
echo 'Saved ', realpath($saveAs), ' (', filesize($saveAs), ' bytes)', PHP_EOL;
} catch (ApiException $e) {
fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL);
exit(1);
}
GET /v3.3/download/snapshot/asn/whois
<?php
// ASN WHOIS Snapshot
//
// Parameters for dbAsnWhois (GET /v3.3/download/snapshot/asn/whois):
// - date (string, required)
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
use WhoisFreaks\Api\DatabasesASNWHOISApi;
use WhoisFreaks\ApiException;
use WhoisFreaks\Configuration;
// Read the API key from the environment and set it once.
$config = Configuration::getDefaultConfiguration()
->setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY'));
$api = new DatabasesASNWHOISApi(new Client(), $config);
try {
$file = $api->dbAsnWhois('2026-10-01');
// The SDK streams the download into a temporary file: copy it somewhere permanent.
$saveAs = 'DbAsnWhois.json.gz';
copy($file->getPathname(), $saveAs);
echo 'Saved ', realpath($saveAs), ' (', filesize($saveAs), ' bytes)', PHP_EOL;
} catch (ApiException $e) {
fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL);
exit(1);
}
GET /v3.3/status/snapshot/asn/whois
<?php
// ASN WHOIS Snapshot Status
//
// Parameters for dbAsnWhoisStatus (GET /v3.3/status/snapshot/asn/whois):
// (no parameters; the API key is set on the client)
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
use WhoisFreaks\Api\DatabasesASNWHOISApi;
use WhoisFreaks\ApiException;
use WhoisFreaks\Configuration;
// Read the API key from the environment and set it once.
$config = Configuration::getDefaultConfiguration()
->setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY'));
$api = new DatabasesASNWHOISApi(new Client(), $config);
try {
$result = $api->dbAsnWhoisStatus();
echo $result, PHP_EOL; // models print as JSON
} catch (ApiException $e) {
fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL);
exit(1);
}
GET /v3.3/download/snapshot/ip/whois
<?php
// IP WHOIS Snapshot
//
// Parameters for dbIpWhois (GET /v3.3/download/snapshot/ip/whois):
// - date (string, required)
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
use WhoisFreaks\Api\DatabasesIPWHOISApi;
use WhoisFreaks\ApiException;
use WhoisFreaks\Configuration;
// Read the API key from the environment and set it once.
$config = Configuration::getDefaultConfiguration()
->setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY'));
$api = new DatabasesIPWHOISApi(new Client(), $config);
try {
$file = $api->dbIpWhois('2026-10-01');
// The SDK streams the download into a temporary file: copy it somewhere permanent.
$saveAs = 'DbIpWhois.json.gz';
copy($file->getPathname(), $saveAs);
echo 'Saved ', realpath($saveAs), ' (', filesize($saveAs), ' bytes)', PHP_EOL;
} catch (ApiException $e) {
fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL);
exit(1);
}
GET /v3.3/status/snapshot/ip/whois
<?php
// IP WHOIS Snapshot Status
//
// Parameters for dbIpWhoisStatus (GET /v3.3/status/snapshot/ip/whois):
// (no parameters; the API key is set on the client)
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
use WhoisFreaks\Api\DatabasesIPWHOISApi;
use WhoisFreaks\ApiException;
use WhoisFreaks\Configuration;
// Read the API key from the environment and set it once.
$config = Configuration::getDefaultConfiguration()
->setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY'));
$api = new DatabasesIPWHOISApi(new Client(), $config);
try {
$result = $api->dbIpWhoisStatus();
echo $result, PHP_EOL; // models print as JSON
} catch (ApiException $e) {
fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL);
exit(1);
}
GET /v3.3/download/snapshot/ip/security
<?php
// IP Security Snapshot
//
// Parameters for dbIpSecurity (GET /v3.3/download/snapshot/ip/security):
// - date (string, required)
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
use WhoisFreaks\Api\DatabasesIPSecurityApi;
use WhoisFreaks\ApiException;
use WhoisFreaks\Configuration;
// Read the API key from the environment and set it once.
$config = Configuration::getDefaultConfiguration()
->setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY'));
$api = new DatabasesIPSecurityApi(new Client(), $config);
try {
$file = $api->dbIpSecurity('2026-10-01');
// The SDK streams the download into a temporary file: copy it somewhere permanent.
$saveAs = 'DbIpSecurity.csv';
copy($file->getPathname(), $saveAs);
echo 'Saved ', realpath($saveAs), ' (', filesize($saveAs), ' bytes)', PHP_EOL;
} catch (ApiException $e) {
fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL);
exit(1);
}
GET /v3.3/status/snapshot/ip/security
<?php
// IP Security Snapshot Status
//
// Parameters for dbIpSecurityStatus (GET /v3.3/status/snapshot/ip/security):
// (no parameters; the API key is set on the client)
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
use WhoisFreaks\Api\DatabasesIPSecurityApi;
use WhoisFreaks\ApiException;
use WhoisFreaks\Configuration;
// Read the API key from the environment and set it once.
$config = Configuration::getDefaultConfiguration()
->setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY'));
$api = new DatabasesIPSecurityApi(new Client(), $config);
try {
$result = $api->dbIpSecurityStatus();
echo $result, PHP_EOL; // models print as JSON
} catch (ApiException $e) {
fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL);
exit(1);
}
GET /v3.4/download/threat-feed/phishing
<?php
// Download the daily phishing threat feed (CSV)
//
// Parameters for downloadThreatFeedPhishing (GET /v3.4/download/threat-feed/phishing):
// - date (string, optional): Feed date (yyyy-MM-dd); omit for the full dump of the feed
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
use WhoisFreaks\Api\DatabasesThreatFeedApi;
use WhoisFreaks\ApiException;
use WhoisFreaks\Configuration;
// Read the API key from the environment and set it once.
$config = Configuration::getDefaultConfiguration()
->setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY'));
$api = new DatabasesThreatFeedApi(new Client(), $config);
try {
$file = $api->downloadThreatFeedPhishing('2026-10-01');
// The SDK streams the download into a temporary file: copy it somewhere permanent.
$saveAs = 'DownloadThreatFeedPhishing.csv';
copy($file->getPathname(), $saveAs);
echo 'Saved ', realpath($saveAs), ' (', filesize($saveAs), ' bytes)', PHP_EOL;
} catch (ApiException $e) {
fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL);
exit(1);
}
GET /v3.4/download/threat-feed/phishing/sample
<?php
// Download a sample of the phishing threat feed (CSV)
//
// Parameters for downloadThreatFeedPhishingSample (GET /v3.4/download/threat-feed/phishing/sample):
// (no parameters; the API key is set on the client)
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
use WhoisFreaks\Api\DatabasesThreatFeedApi;
use WhoisFreaks\ApiException;
use WhoisFreaks\Configuration;
// Read the API key from the environment and set it once.
$config = Configuration::getDefaultConfiguration()
->setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY'));
$api = new DatabasesThreatFeedApi(new Client(), $config);
try {
$file = $api->downloadThreatFeedPhishingSample();
// The SDK streams the download into a temporary file: copy it somewhere permanent.
$saveAs = 'DownloadThreatFeedPhishingSample.csv';
copy($file->getPathname(), $saveAs);
echo 'Saved ', realpath($saveAs), ' (', filesize($saveAs), ' bytes)', PHP_EOL;
} catch (ApiException $e) {
fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL);
exit(1);
}
GET /v3.4/download/threat-feed/malware
<?php
// Download the daily malware threat feed (CSV)
//
// Parameters for downloadThreatFeedMalware (GET /v3.4/download/threat-feed/malware):
// - date (string, optional): Feed date (yyyy-MM-dd); omit for the full dump of the feed
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
use WhoisFreaks\Api\DatabasesThreatFeedApi;
use WhoisFreaks\ApiException;
use WhoisFreaks\Configuration;
// Read the API key from the environment and set it once.
$config = Configuration::getDefaultConfiguration()
->setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY'));
$api = new DatabasesThreatFeedApi(new Client(), $config);
try {
$file = $api->downloadThreatFeedMalware('2026-10-01');
// The SDK streams the download into a temporary file: copy it somewhere permanent.
$saveAs = 'DownloadThreatFeedMalware.csv';
copy($file->getPathname(), $saveAs);
echo 'Saved ', realpath($saveAs), ' (', filesize($saveAs), ' bytes)', PHP_EOL;
} catch (ApiException $e) {
fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL);
exit(1);
}
GET /v3.4/download/threat-feed/malware/sample
<?php
// Download a sample of the malware threat feed (CSV)
//
// Parameters for downloadThreatFeedMalwareSample (GET /v3.4/download/threat-feed/malware/sample):
// (no parameters; the API key is set on the client)
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
use WhoisFreaks\Api\DatabasesThreatFeedApi;
use WhoisFreaks\ApiException;
use WhoisFreaks\Configuration;
// Read the API key from the environment and set it once.
$config = Configuration::getDefaultConfiguration()
->setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY'));
$api = new DatabasesThreatFeedApi(new Client(), $config);
try {
$file = $api->downloadThreatFeedMalwareSample();
// The SDK streams the download into a temporary file: copy it somewhere permanent.
$saveAs = 'DownloadThreatFeedMalwareSample.csv';
copy($file->getPathname(), $saveAs);
echo 'Saved ', realpath($saveAs), ' (', filesize($saveAs), ' bytes)', PHP_EOL;
} catch (ApiException $e) {
fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL);
exit(1);
}
GET /v3.4/download/threat-feed/spam
<?php
// Download the daily spam threat feed (CSV)
//
// Parameters for downloadThreatFeedSpam (GET /v3.4/download/threat-feed/spam):
// - date (string, optional): Feed date (yyyy-MM-dd); omit for the full dump of the feed
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
use WhoisFreaks\Api\DatabasesThreatFeedApi;
use WhoisFreaks\ApiException;
use WhoisFreaks\Configuration;
// Read the API key from the environment and set it once.
$config = Configuration::getDefaultConfiguration()
->setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY'));
$api = new DatabasesThreatFeedApi(new Client(), $config);
try {
$file = $api->downloadThreatFeedSpam('2026-10-01');
// The SDK streams the download into a temporary file: copy it somewhere permanent.
$saveAs = 'DownloadThreatFeedSpam.csv';
copy($file->getPathname(), $saveAs);
echo 'Saved ', realpath($saveAs), ' (', filesize($saveAs), ' bytes)', PHP_EOL;
} catch (ApiException $e) {
fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL);
exit(1);
}
GET /v3.4/download/threat-feed/spam/sample
<?php
// Download a sample of the spam threat feed (CSV)
//
// Parameters for downloadThreatFeedSpamSample (GET /v3.4/download/threat-feed/spam/sample):
// (no parameters; the API key is set on the client)
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
use WhoisFreaks\Api\DatabasesThreatFeedApi;
use WhoisFreaks\ApiException;
use WhoisFreaks\Configuration;
// Read the API key from the environment and set it once.
$config = Configuration::getDefaultConfiguration()
->setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY'));
$api = new DatabasesThreatFeedApi(new Client(), $config);
try {
$file = $api->downloadThreatFeedSpamSample();
// The SDK streams the download into a temporary file: copy it somewhere permanent.
$saveAs = 'DownloadThreatFeedSpamSample.csv';
copy($file->getPathname(), $saveAs);
echo 'Saved ', realpath($saveAs), ' (', filesize($saveAs), ' bytes)', PHP_EOL;
} catch (ApiException $e) {
fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL);
exit(1);
}
GET /v3.4/stream/threat-feed/phishing
<?php
// Stream the daily phishing threat feed (CSV)
//
// Parameters for streamThreatFeedPhishing (GET /v3.4/stream/threat-feed/phishing):
// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints.
// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are...
// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on...
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
use WhoisFreaks\Api\DatabasesStreamingApi;
use WhoisFreaks\ApiException;
use WhoisFreaks\Configuration;
// Read the API key from the environment and set it once.
$config = Configuration::getDefaultConfiguration()
->setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY'));
$api = new DatabasesStreamingApi(new Client(), $config);
try {
$result = $api->streamThreatFeedPhishing('2026-10-01');
echo $result, PHP_EOL;
} catch (ApiException $e) {
fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL);
exit(1);
}
GET /v3.4/stream/threat-feed/phishing/sample
<?php
// Stream a sample of the phishing threat feed (CSV)
//
// Parameters for streamThreatFeedPhishingSample (GET /v3.4/stream/threat-feed/phishing/sample):
// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are...
// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on...
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
use WhoisFreaks\Api\DatabasesStreamingApi;
use WhoisFreaks\ApiException;
use WhoisFreaks\Configuration;
// Read the API key from the environment and set it once.
// (This endpoint is public, so the key is not sent with this request.)
$config = Configuration::getDefaultConfiguration()
->setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY'));
$api = new DatabasesStreamingApi(new Client(), $config);
try {
$result = $api->streamThreatFeedPhishingSample();
echo $result, PHP_EOL;
} catch (ApiException $e) {
fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL);
exit(1);
}
GET /v3.4/stream/threat-feed/malware
<?php
// Stream the daily malware threat feed (CSV)
//
// Parameters for streamThreatFeedMalware (GET /v3.4/stream/threat-feed/malware):
// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints.
// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are...
// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on...
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
use WhoisFreaks\Api\DatabasesStreamingApi;
use WhoisFreaks\ApiException;
use WhoisFreaks\Configuration;
// Read the API key from the environment and set it once.
$config = Configuration::getDefaultConfiguration()
->setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY'));
$api = new DatabasesStreamingApi(new Client(), $config);
try {
$result = $api->streamThreatFeedMalware('2026-10-01');
echo $result, PHP_EOL;
} catch (ApiException $e) {
fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL);
exit(1);
}
GET /v3.4/stream/threat-feed/malware/sample
<?php
// Stream a sample of the malware threat feed (CSV)
//
// Parameters for streamThreatFeedMalwareSample (GET /v3.4/stream/threat-feed/malware/sample):
// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are...
// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on...
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
use WhoisFreaks\Api\DatabasesStreamingApi;
use WhoisFreaks\ApiException;
use WhoisFreaks\Configuration;
// Read the API key from the environment and set it once.
// (This endpoint is public, so the key is not sent with this request.)
$config = Configuration::getDefaultConfiguration()
->setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY'));
$api = new DatabasesStreamingApi(new Client(), $config);
try {
$result = $api->streamThreatFeedMalwareSample();
echo $result, PHP_EOL;
} catch (ApiException $e) {
fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL);
exit(1);
}
GET /v3.4/stream/threat-feed/spam
<?php
// Stream the daily spam threat feed (CSV)
//
// Parameters for streamThreatFeedSpam (GET /v3.4/stream/threat-feed/spam):
// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints.
// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are...
// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on...
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
use WhoisFreaks\Api\DatabasesStreamingApi;
use WhoisFreaks\ApiException;
use WhoisFreaks\Configuration;
// Read the API key from the environment and set it once.
$config = Configuration::getDefaultConfiguration()
->setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY'));
$api = new DatabasesStreamingApi(new Client(), $config);
try {
$result = $api->streamThreatFeedSpam('2026-10-01');
echo $result, PHP_EOL;
} catch (ApiException $e) {
fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL);
exit(1);
}
GET /v3.4/stream/threat-feed/spam/sample
<?php
// Stream a sample of the spam threat feed (CSV)
//
// Parameters for streamThreatFeedSpamSample (GET /v3.4/stream/threat-feed/spam/sample):
// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are...
// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on...
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
use WhoisFreaks\Api\DatabasesStreamingApi;
use WhoisFreaks\ApiException;
use WhoisFreaks\Configuration;
// Read the API key from the environment and set it once.
// (This endpoint is public, so the key is not sent with this request.)
$config = Configuration::getDefaultConfiguration()
->setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY'));
$api = new DatabasesStreamingApi(new Client(), $config);
try {
$result = $api->streamThreatFeedSpamSample();
echo $result, PHP_EOL;
} catch (ApiException $e) {
fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL);
exit(1);
}
GET /v3.3/stream/domainer/gtld
<?php
// Stream newly registered gTLD domains (CSV)
//
// Parameters for streamDomainerGtld (GET /v3.3/stream/domainer/gtld):
// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints.
// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only...
// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are...
// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on...
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
use WhoisFreaks\Api\DatabasesStreamingApi;
use WhoisFreaks\ApiException;
use WhoisFreaks\Configuration;
// Read the API key from the environment and set it once.
$config = Configuration::getDefaultConfiguration()
->setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY'));
$api = new DatabasesStreamingApi(new Client(), $config);
try {
$result = $api->streamDomainerGtld('2026-10-01');
echo $result, PHP_EOL;
} catch (ApiException $e) {
fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL);
exit(1);
}
GET /v3.3/stream/domainer/gtld/cleaned
<?php
// Stream cleaned newly registered gTLD domains (CSV)
//
// Parameters for streamDomainerGtldCleaned (GET /v3.3/stream/domainer/gtld/cleaned):
// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints.
// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only...
// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are...
// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on...
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
use WhoisFreaks\Api\DatabasesStreamingApi;
use WhoisFreaks\ApiException;
use WhoisFreaks\Configuration;
// Read the API key from the environment and set it once.
$config = Configuration::getDefaultConfiguration()
->setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY'));
$api = new DatabasesStreamingApi(new Client(), $config);
try {
$result = $api->streamDomainerGtldCleaned('2026-10-01');
echo $result, PHP_EOL;
} catch (ApiException $e) {
fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL);
exit(1);
}
GET /v3.3/stream/domainer/gtld/cleaned/email
<?php
// Stream cleaned newly registered gTLD domains with an email (CSV)
//
// Parameters for streamDomainerGtldCleanedEmail (GET /v3.3/stream/domainer/gtld/cleaned/email):
// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints.
// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only...
// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are...
// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on...
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
use WhoisFreaks\Api\DatabasesStreamingApi;
use WhoisFreaks\ApiException;
use WhoisFreaks\Configuration;
// Read the API key from the environment and set it once.
$config = Configuration::getDefaultConfiguration()
->setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY'));
$api = new DatabasesStreamingApi(new Client(), $config);
try {
$result = $api->streamDomainerGtldCleanedEmail('2026-10-01');
echo $result, PHP_EOL;
} catch (ApiException $e) {
fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL);
exit(1);
}
GET /v3.3/stream/domainer/gtld/cleaned/phone
<?php
// Stream cleaned newly registered gTLD domains with a phone (CSV)
//
// Parameters for streamDomainerGtldCleanedPhone (GET /v3.3/stream/domainer/gtld/cleaned/phone):
// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints.
// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only...
// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are...
// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on...
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
use WhoisFreaks\Api\DatabasesStreamingApi;
use WhoisFreaks\ApiException;
use WhoisFreaks\Configuration;
// Read the API key from the environment and set it once.
$config = Configuration::getDefaultConfiguration()
->setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY'));
$api = new DatabasesStreamingApi(new Client(), $config);
try {
$result = $api->streamDomainerGtldCleanedPhone('2026-10-01');
echo $result, PHP_EOL;
} catch (ApiException $e) {
fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL);
exit(1);
}
GET /v3.3/stream/domainer/cctld
<?php
// Stream newly registered ccTLD domains (CSV)
//
// Parameters for streamDomainerCctld (GET /v3.3/stream/domainer/cctld):
// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints.
// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only...
// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are...
// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on...
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
use WhoisFreaks\Api\DatabasesStreamingApi;
use WhoisFreaks\ApiException;
use WhoisFreaks\Configuration;
// Read the API key from the environment and set it once.
$config = Configuration::getDefaultConfiguration()
->setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY'));
$api = new DatabasesStreamingApi(new Client(), $config);
try {
$result = $api->streamDomainerCctld('2026-10-01');
echo $result, PHP_EOL;
} catch (ApiException $e) {
fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL);
exit(1);
}
GET /v3.3/stream/domainer/cctld/cleaned
<?php
// Stream cleaned newly registered ccTLD domains (CSV)
//
// Parameters for streamDomainerCctldCleaned (GET /v3.3/stream/domainer/cctld/cleaned):
// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints.
// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only...
// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are...
// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on...
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
use WhoisFreaks\Api\DatabasesStreamingApi;
use WhoisFreaks\ApiException;
use WhoisFreaks\Configuration;
// Read the API key from the environment and set it once.
$config = Configuration::getDefaultConfiguration()
->setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY'));
$api = new DatabasesStreamingApi(new Client(), $config);
try {
$result = $api->streamDomainerCctldCleaned('2026-10-01');
echo $result, PHP_EOL;
} catch (ApiException $e) {
fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL);
exit(1);
}
GET /v3.3/stream/domainer/cctld/cleaned/email
<?php
// Stream cleaned newly registered ccTLD domains with an email (CSV)
//
// Parameters for streamDomainerCctldCleanedEmail (GET /v3.3/stream/domainer/cctld/cleaned/email):
// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints.
// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only...
// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are...
// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on...
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
use WhoisFreaks\Api\DatabasesStreamingApi;
use WhoisFreaks\ApiException;
use WhoisFreaks\Configuration;
// Read the API key from the environment and set it once.
$config = Configuration::getDefaultConfiguration()
->setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY'));
$api = new DatabasesStreamingApi(new Client(), $config);
try {
$result = $api->streamDomainerCctldCleanedEmail('2026-10-01');
echo $result, PHP_EOL;
} catch (ApiException $e) {
fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL);
exit(1);
}
GET /v3.3/stream/domainer/cctld/cleaned/phone
<?php
// Stream cleaned newly registered ccTLD domains with a phone (CSV)
//
// Parameters for streamDomainerCctldCleanedPhone (GET /v3.3/stream/domainer/cctld/cleaned/phone):
// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints.
// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only...
// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are...
// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on...
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
use WhoisFreaks\Api\DatabasesStreamingApi;
use WhoisFreaks\ApiException;
use WhoisFreaks\Configuration;
// Read the API key from the environment and set it once.
$config = Configuration::getDefaultConfiguration()
->setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY'));
$api = new DatabasesStreamingApi(new Client(), $config);
try {
$result = $api->streamDomainerCctldCleanedPhone('2026-10-01');
echo $result, PHP_EOL;
} catch (ApiException $e) {
fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL);
exit(1);
}
GET /v3.3/stream/domainer/expired
<?php
// Stream expiring domains (CSV)
//
// Parameters for streamDomainerExpired (GET /v3.3/stream/domainer/expired):
// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints.
// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only...
// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are...
// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on...
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
use WhoisFreaks\Api\DatabasesStreamingApi;
use WhoisFreaks\ApiException;
use WhoisFreaks\Configuration;
// Read the API key from the environment and set it once.
$config = Configuration::getDefaultConfiguration()
->setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY'));
$api = new DatabasesStreamingApi(new Client(), $config);
try {
$result = $api->streamDomainerExpired('2026-10-01');
echo $result, PHP_EOL;
} catch (ApiException $e) {
fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL);
exit(1);
}
GET /v3.3/stream/domainer/expired/cleaned
<?php
// Stream cleaned expiring domains (CSV)
//
// Parameters for streamDomainerExpiredCleaned (GET /v3.3/stream/domainer/expired/cleaned):
// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints.
// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only...
// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are...
// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on...
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
use WhoisFreaks\Api\DatabasesStreamingApi;
use WhoisFreaks\ApiException;
use WhoisFreaks\Configuration;
// Read the API key from the environment and set it once.
$config = Configuration::getDefaultConfiguration()
->setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY'));
$api = new DatabasesStreamingApi(new Client(), $config);
try {
$result = $api->streamDomainerExpiredCleaned('2026-10-01');
echo $result, PHP_EOL;
} catch (ApiException $e) {
fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL);
exit(1);
}
GET /v3.3/stream/domainer/expired/cleaned/email
<?php
// Stream cleaned expiring domains with an email (CSV)
//
// Parameters for streamDomainerExpiredCleanedEmail (GET /v3.3/stream/domainer/expired/cleaned/email):
// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints.
// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only...
// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are...
// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on...
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
use WhoisFreaks\Api\DatabasesStreamingApi;
use WhoisFreaks\ApiException;
use WhoisFreaks\Configuration;
// Read the API key from the environment and set it once.
$config = Configuration::getDefaultConfiguration()
->setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY'));
$api = new DatabasesStreamingApi(new Client(), $config);
try {
$result = $api->streamDomainerExpiredCleanedEmail('2026-10-01');
echo $result, PHP_EOL;
} catch (ApiException $e) {
fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL);
exit(1);
}
GET /v3.3/stream/domainer/expired/cleaned/phone
<?php
// Stream cleaned expiring domains with a phone (CSV)
//
// Parameters for streamDomainerExpiredCleanedPhone (GET /v3.3/stream/domainer/expired/cleaned/phone):
// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints.
// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only...
// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are...
// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on...
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
use WhoisFreaks\Api\DatabasesStreamingApi;
use WhoisFreaks\ApiException;
use WhoisFreaks\Configuration;
// Read the API key from the environment and set it once.
$config = Configuration::getDefaultConfiguration()
->setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY'));
$api = new DatabasesStreamingApi(new Client(), $config);
try {
$result = $api->streamDomainerExpiredCleanedPhone('2026-10-01');
echo $result, PHP_EOL;
} catch (ApiException $e) {
fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL);
exit(1);
}
GET /v3.3/stream/domainer/dropped
<?php
// Stream dropped domains (CSV)
//
// Parameters for streamDomainerDropped (GET /v3.3/stream/domainer/dropped):
// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints.
// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only...
// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are...
// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on...
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
use WhoisFreaks\Api\DatabasesStreamingApi;
use WhoisFreaks\ApiException;
use WhoisFreaks\Configuration;
// Read the API key from the environment and set it once.
$config = Configuration::getDefaultConfiguration()
->setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY'));
$api = new DatabasesStreamingApi(new Client(), $config);
try {
$result = $api->streamDomainerDropped('2026-10-01');
echo $result, PHP_EOL;
} catch (ApiException $e) {
fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL);
exit(1);
}
GET /v3.3/stream/domainer/dropped/backlinks
<?php
// Stream dropped domains with backlinks (CSV)
//
// Parameters for streamDomainerDroppedBacklinks (GET /v3.3/stream/domainer/dropped/backlinks):
// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints.
// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only...
// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are...
// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on...
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
use WhoisFreaks\Api\DatabasesStreamingApi;
use WhoisFreaks\ApiException;
use WhoisFreaks\Configuration;
// Read the API key from the environment and set it once.
$config = Configuration::getDefaultConfiguration()
->setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY'));
$api = new DatabasesStreamingApi(new Client(), $config);
try {
$result = $api->streamDomainerDroppedBacklinks('2026-10-01');
echo $result, PHP_EOL;
} catch (ApiException $e) {
fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL);
exit(1);
}
GET /v3.3/stream/domainer/sample/gtld
<?php
// Stream a sample of newly registered gTLD domains (CSV)
//
// Parameters for streamDomainerGtldSample (GET /v3.3/stream/domainer/sample/gtld):
// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only...
// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are...
// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on...
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
use WhoisFreaks\Api\DatabasesStreamingApi;
use WhoisFreaks\ApiException;
use WhoisFreaks\Configuration;
// Read the API key from the environment and set it once.
// (This endpoint is public, so the key is not sent with this request.)
$config = Configuration::getDefaultConfiguration()
->setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY'));
$api = new DatabasesStreamingApi(new Client(), $config);
try {
$result = $api->streamDomainerGtldSample();
echo $result, PHP_EOL;
} catch (ApiException $e) {
fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL);
exit(1);
}
GET /v3.3/stream/domainer/sample/gtld/cleaned
<?php
// Stream a sample of cleaned newly registered gTLD domains (CSV)
//
// Parameters for streamDomainerGtldCleanedSample (GET /v3.3/stream/domainer/sample/gtld/cleaned):
// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only...
// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are...
// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on...
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
use WhoisFreaks\Api\DatabasesStreamingApi;
use WhoisFreaks\ApiException;
use WhoisFreaks\Configuration;
// Read the API key from the environment and set it once.
// (This endpoint is public, so the key is not sent with this request.)
$config = Configuration::getDefaultConfiguration()
->setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY'));
$api = new DatabasesStreamingApi(new Client(), $config);
try {
$result = $api->streamDomainerGtldCleanedSample();
echo $result, PHP_EOL;
} catch (ApiException $e) {
fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL);
exit(1);
}
GET /v3.3/stream/domainer/sample/cctld
<?php
// Stream a sample of newly registered ccTLD domains (CSV)
//
// Parameters for streamDomainerCctldSample (GET /v3.3/stream/domainer/sample/cctld):
// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only...
// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are...
// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on...
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
use WhoisFreaks\Api\DatabasesStreamingApi;
use WhoisFreaks\ApiException;
use WhoisFreaks\Configuration;
// Read the API key from the environment and set it once.
// (This endpoint is public, so the key is not sent with this request.)
$config = Configuration::getDefaultConfiguration()
->setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY'));
$api = new DatabasesStreamingApi(new Client(), $config);
try {
$result = $api->streamDomainerCctldSample();
echo $result, PHP_EOL;
} catch (ApiException $e) {
fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL);
exit(1);
}
GET /v3.3/stream/domainer/sample/cctld/cleaned
<?php
// Stream a sample of cleaned newly registered ccTLD domains (CSV)
//
// Parameters for streamDomainerCctldCleanedSample (GET /v3.3/stream/domainer/sample/cctld/cleaned):
// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only...
// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are...
// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on...
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
use WhoisFreaks\Api\DatabasesStreamingApi;
use WhoisFreaks\ApiException;
use WhoisFreaks\Configuration;
// Read the API key from the environment and set it once.
// (This endpoint is public, so the key is not sent with this request.)
$config = Configuration::getDefaultConfiguration()
->setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY'));
$api = new DatabasesStreamingApi(new Client(), $config);
try {
$result = $api->streamDomainerCctldCleanedSample();
echo $result, PHP_EOL;
} catch (ApiException $e) {
fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL);
exit(1);
}
GET /v3.3/stream/domainer/sample/expired
<?php
// Stream a sample of expiring domains (CSV)
//
// Parameters for streamDomainerExpiredSample (GET /v3.3/stream/domainer/sample/expired):
// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only...
// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are...
// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on...
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
use WhoisFreaks\Api\DatabasesStreamingApi;
use WhoisFreaks\ApiException;
use WhoisFreaks\Configuration;
// Read the API key from the environment and set it once.
// (This endpoint is public, so the key is not sent with this request.)
$config = Configuration::getDefaultConfiguration()
->setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY'));
$api = new DatabasesStreamingApi(new Client(), $config);
try {
$result = $api->streamDomainerExpiredSample();
echo $result, PHP_EOL;
} catch (ApiException $e) {
fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL);
exit(1);
}
GET /v3.3/stream/domainer/sample/expired/cleaned
<?php
// Stream a sample of cleaned expiring domains (CSV)
//
// Parameters for streamDomainerExpiredCleanedSample (GET /v3.3/stream/domainer/sample/expired/cleaned):
// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only...
// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are...
// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on...
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
use WhoisFreaks\Api\DatabasesStreamingApi;
use WhoisFreaks\ApiException;
use WhoisFreaks\Configuration;
// Read the API key from the environment and set it once.
// (This endpoint is public, so the key is not sent with this request.)
$config = Configuration::getDefaultConfiguration()
->setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY'));
$api = new DatabasesStreamingApi(new Client(), $config);
try {
$result = $api->streamDomainerExpiredCleanedSample();
echo $result, PHP_EOL;
} catch (ApiException $e) {
fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL);
exit(1);
}
GET /v3.3/stream/domainer/sample/dropped
<?php
// Stream a sample of dropped domains (CSV)
//
// Parameters for streamDomainerDroppedSample (GET /v3.3/stream/domainer/sample/dropped):
// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only...
// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are...
// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on...
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
use WhoisFreaks\Api\DatabasesStreamingApi;
use WhoisFreaks\ApiException;
use WhoisFreaks\Configuration;
// Read the API key from the environment and set it once.
// (This endpoint is public, so the key is not sent with this request.)
$config = Configuration::getDefaultConfiguration()
->setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY'));
$api = new DatabasesStreamingApi(new Client(), $config);
try {
$result = $api->streamDomainerDroppedSample();
echo $result, PHP_EOL;
} catch (ApiException $e) {
fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL);
exit(1);
}
GET /v3.3/stream/domainer/sample/dropped/backlinks
<?php
// Stream a sample of dropped domains with backlinks (CSV)
//
// Parameters for streamDomainerDroppedBacklinksSample (GET /v3.3/stream/domainer/sample/dropped/backlinks):
// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only...
// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are...
// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on...
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
use WhoisFreaks\Api\DatabasesStreamingApi;
use WhoisFreaks\ApiException;
use WhoisFreaks\Configuration;
// Read the API key from the environment and set it once.
// (This endpoint is public, so the key is not sent with this request.)
$config = Configuration::getDefaultConfiguration()
->setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY'));
$api = new DatabasesStreamingApi(new Client(), $config);
try {
$result = $api->streamDomainerDroppedBacklinksSample();
echo $result, PHP_EOL;
} catch (ApiException $e) {
fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL);
exit(1);
}