pricing background

PHP SDK

Comprehensive PHP SDK documentation for the WhoisFreaks API. Install via Packagist, authenticate, and call every endpoint with ready-to-run PHP code samples.

Authentication

Every WhoisFreaks API request requires an API key, passed as theapiKey query parameter. Each SDK exposes a configuration hook so you set the key once and it is attached to every request automatically.

Get an API key

New to WhoisFreaks? Follow the step-by-step guide,Getting Started with WhoisFreaks: How to Sign Up and Get Your API Key, which walks through account creation and locating your key.

In short:

  • Sign in at https://billing.whoisfreaks.com.
  • Copy your API key from the dashboard.
  • Keep it secret. Do not commit it to source control. Prefer an environment variable such as WHOISFREAKS_API_KEY.

About

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.

Install

bash
composer require WhoisFreaks/whoisfreaks-php

Build from Source

Prefer to build the SDK yourself instead of installing from Packagist? Clone the monorepo and build the PHP package locally:

bash
git clone https://github.com/WhoisFreaks/whoisfreaks-php
cd whoisfreaks-php
composer install

Getting Started

A complete walkthrough from an empty directory to a running program:

bash
mkdir whoisfreaks-test && cd whoisfreaks-test
composer init --no-interaction
composer require WhoisFreaks/whoisfreaks-php

Create main.php:

php
<?php
require 'vendor/autoload.php';

$config = WhoisFreaks\Configuration::getDefaultConfiguration()
    ->setApiKey("apiKey", "YOUR_API_KEY");   // set once
$api = new WhoisFreaks\Api\WhoisApi(new GuzzleHttp\Client(), $config);
$result = $api->whoisLive("example.com");
print_r($result);

Run it:

bash
php main.php

Configure

See Authentication for how to obtain a key. Minimal setup:

php
<?php
// Runnable example: Live WHOIS Lookup (GET /v2.0/whois/live)
// Parameters for whoisLive (GET /v2.0/whois/live):
//   - domainName (string, required)
//   - format (string (one of: json, xml), optional)
require 'vendor/autoload.php';

$config = WhoisFreaks\Configuration::getDefaultConfiguration()
    ->setApiKey("apiKey", "YOUR_API_KEY");  // set once
$api = new WhoisFreaks\Api\WHOISApi(new GuzzleHttp\Client(), $config);
$result = $api->whoisLive("example.com", null);
print_r($result);

Endpoints

WHOIS

Live WHOIS Lookup

GET/v2.0/whois/live
ParameterTypeRequiredDescription
domainNamestringrequired
formatstring (one of: json, xml)optional
php
<?php
// Runnable example: Live WHOIS Lookup (GET /v2.0/whois/live)
// Parameters for whoisLive (GET /v2.0/whois/live):
//   - domainName (string, required)
//   - format (string (one of: json, xml), optional)
require 'vendor/autoload.php';

$config = WhoisFreaks\Configuration::getDefaultConfiguration()
    ->setApiKey("apiKey", "YOUR_API_KEY");  // set once
$api = new WhoisFreaks\Api\WHOISApi(new GuzzleHttp\Client(), $config);
$result = $api->whoisLive("example.com", null);
print_r($result);

Bulk WHOIS Lookup

POST/v2.0/bulkwhois/live
ParameterTypeRequiredDescription
formatstring (one of: json, xml)optional
bodyBulkWhoisRequestrequiredrequest body object
php
<?php
// Runnable example: Bulk WHOIS Lookup (POST /v2.0/bulkwhois/live)
// Parameters for bulkWhois (POST /v2.0/bulkwhois/live):
//   - format (string (one of: json, xml), optional)
//   - body: BulkWhoisRequest (required) -- request body object
require 'vendor/autoload.php';

$config = WhoisFreaks\Configuration::getDefaultConfiguration()
    ->setApiKey("apiKey", "YOUR_API_KEY");  // set once
$api = new WhoisFreaks\Api\WHOISApi(new GuzzleHttp\Client(), $config);
$result = $api->bulkWhois(new WhoisFreaks\Model\BulkWhoisRequest(), null);
print_r($result);

Historical WHOIS records for a domain

GET/v2.0/whois/history
ParameterTypeRequiredDescription
domainNamestringrequiredDomain to fetch historical WHOIS records for
pageintegeroptionalPage number
formatstring (one of: json, xml)optional
php
<?php
// Runnable example: Historical WHOIS records for a domain (GET /v2.0/whois/history)
// Parameters for whoisHistory (GET /v2.0/whois/history):
//   - domainName (string, required): Domain to fetch historical WHOIS records for
//   - page (integer, optional): Page number
//   - format (string (one of: json, xml), optional)
require 'vendor/autoload.php';

$config = WhoisFreaks\Configuration::getDefaultConfiguration()
    ->setApiKey("apiKey", "YOUR_API_KEY");  // set once
$api = new WhoisFreaks\Api\WHOISApi(new GuzzleHttp\Client(), $config);
$result = $api->whoisHistory("example.com", null, null);
print_r($result);

Reverse WHOIS lookup by keyword

GET/v2.0/whois/reverse
ParameterTypeRequiredDescription
keywordstringrequiredKeyword to search across WHOIS records
pageintegeroptionalPage number
formatstring (one of: json, xml)optional
php
<?php
// Runnable example: Reverse WHOIS lookup by keyword (GET /v2.0/whois/reverse)
// 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 'vendor/autoload.php';

$config = WhoisFreaks\Configuration::getDefaultConfiguration()
    ->setApiKey("apiKey", "YOUR_API_KEY");  // set once
$api = new WhoisFreaks\Api\WHOISApi(new GuzzleHttp\Client(), $config);
$result = $api->whoisReverse("value", null, null);
print_r($result);

DNS

Live DNS Lookup

GET/v2.0/dns/live
ParameterTypeRequiredDescription
domainNamestringrequired
ipAddressstringrequiredUse for PTR lookups
typestringrequiredall or comma-separated: A,MX,NS,TXT,SOA,SPF,AAAA,CNAME
formatstring (one of: json, xml)optional
php
<?php
// Runnable example: Live DNS Lookup (GET /v2.0/dns/live)
// Parameters for dnsLive (GET /v2.0/dns/live):
//   - domainName (string, required)
//   - ipAddress (string, required): 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 'vendor/autoload.php';

$config = WhoisFreaks\Configuration::getDefaultConfiguration()
    ->setApiKey("apiKey", "YOUR_API_KEY");  // set once
$api = new WhoisFreaks\Api\DNSApi(new GuzzleHttp\Client(), $config);
$result = $api->dnsLive("example.com", "8.8.8.8", "value", null);
print_r($result);

Historical DNS Lookup

GET/v2.0/dns/historical
ParameterTypeRequiredDescription
domainNamestringrequired
typestringrequired
pageintegeroptional
formatstring (one of: json, xml)optional
php
<?php
// Runnable example: Historical DNS Lookup (GET /v2.0/dns/historical)
// 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 'vendor/autoload.php';

$config = WhoisFreaks\Configuration::getDefaultConfiguration()
    ->setApiKey("apiKey", "YOUR_API_KEY");  // set once
$api = new WhoisFreaks\Api\DNSApi(new GuzzleHttp\Client(), $config);
$result = $api->dnsHistorical("example.com", "value", null, null);
print_r($result);

Reverse DNS Lookup

GET/v2.1/dns/reverse
ParameterTypeRequiredDescription
valuestringrequiredIP, CIDR, or record value
typestring (one of: a, mx, cname, ns, aaaa, txt, soa)required
exactbooleanoptional
pageintegeroptional
formatstring (one of: json, xml)optional
php
<?php
// Runnable example: Reverse DNS Lookup (GET /v2.1/dns/reverse)
// 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 'vendor/autoload.php';

$config = WhoisFreaks\Configuration::getDefaultConfiguration()
    ->setApiKey("apiKey", "YOUR_API_KEY");  // set once
$api = new WhoisFreaks\Api\DNSApi(new GuzzleHttp\Client(), $config);
$result = $api->dnsReverse("value", "a", true, null, null);
print_r($result);

Bulk DNS Lookup

POST/v2.0/dns/bulk/live
ParameterTypeRequiredDescription
typestringrequired
formatstring (one of: json, xml)optional
bodyDnsBulkRequestrequiredrequest body object
php
<?php
// Runnable example: Bulk DNS Lookup (POST /v2.0/dns/bulk/live)
// 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 'vendor/autoload.php';

$config = WhoisFreaks\Configuration::getDefaultConfiguration()
    ->setApiKey("apiKey", "YOUR_API_KEY");  // set once
$api = new WhoisFreaks\Api\DNSApi(new GuzzleHttp\Client(), $config);
$result = $api->dnsBulk("value", new WhoisFreaks\Model\DnsBulkRequest(), null);
print_r($result);

Domain Availability

Domain Availability Check with Suggestions

GET/v2.0/domain/availability
ParameterTypeRequiredDescription
domainstringrequiredThe domain name to check
sugbooleanoptionalWhether to return TLD suggestions alongside the queried domain.
countintegeroptionalNumber of TLD suggestions to return when sug=true. Maximum is 100.
formatstring (one of: json, xml)optional
php
<?php
// Runnable example: Domain Availability Check with Suggestions (GET /v2.0/domain/availability)
// 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 'vendor/autoload.php';

$config = WhoisFreaks\Configuration::getDefaultConfiguration()
    ->setApiKey("apiKey", "YOUR_API_KEY");  // set once
$api = new WhoisFreaks\Api\DomainAvailabilityApi(new GuzzleHttp\Client(), $config);
$result = $api->domainAvailabilityV2("example.com", null, null, null);
print_r($result);

Bulk Domain Availability Check

POST/v2.0/domain/availability
ParameterTypeRequiredDescription
domainstringoptionalRequired for TLD-mode bulk check (base domain).
formatstring (one of: json, xml)optional
bodyBulkDomainAvailabilityRequestrequiredrequest body object
php
<?php
// Runnable example: Bulk Domain Availability Check (POST /v2.0/domain/availability)
// 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 'vendor/autoload.php';

$config = WhoisFreaks\Configuration::getDefaultConfiguration()
    ->setApiKey("apiKey", "YOUR_API_KEY");  // set once
$api = new WhoisFreaks\Api\DomainAvailabilityApi(new GuzzleHttp\Client(), $config);
$result = $api->bulkDomainAvailabilityV2(new WhoisFreaks\Model\BulkDomainAvailabilityRequest(), null, null);
print_r($result);

Typosquatting

Typosquatting Lookup

GET/v3.0/domain/typos
ParameterTypeRequiredDescription
keywordstringoptional
patternstringoptional
pageTokenstringoptional
php
<?php
// Runnable example: Typosquatting Lookup (GET /v3.0/domain/typos)
// Parameters for typosquatting (GET /v3.0/domain/typos):
//   - keyword (string, optional)
//   - pattern (string, optional)
//   - pageToken (string, optional)
require 'vendor/autoload.php';

$config = WhoisFreaks\Configuration::getDefaultConfiguration()
    ->setApiKey("apiKey", "YOUR_API_KEY");  // set once
$api = new WhoisFreaks\Api\TyposquattingApi(new GuzzleHttp\Client(), $config);
$result = $api->typosquatting(null, null, null);
print_r($result);

SSL

SSL Certificate Lookup

GET/v1.0/ssl/live
ParameterTypeRequiredDescription
domainNamestringrequired
chainbooleanoptional
sslRawbooleanoptional
formatstring (one of: json, xml)optional
php
<?php
// Runnable example: SSL Certificate Lookup (GET /v1.0/ssl/live)
// 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 'vendor/autoload.php';

$config = WhoisFreaks\Configuration::getDefaultConfiguration()
    ->setApiKey("apiKey", "YOUR_API_KEY");  // set once
$api = new WhoisFreaks\Api\SSLApi(new GuzzleHttp\Client(), $config);
$result = $api->sslLookup("example.com", null, null, null);
print_r($result);

Geolocation

IP Geolocation Lookup

GET/v1.0/geolocation
ParameterTypeRequiredDescription
ipstringrequired
php
<?php
// Runnable example: IP Geolocation Lookup (GET /v1.0/geolocation)
// Parameters for geolocation (GET /v1.0/geolocation):
//   - ip (string, required)
require 'vendor/autoload.php';

$config = WhoisFreaks\Configuration::getDefaultConfiguration()
    ->setApiKey("apiKey", "YOUR_API_KEY");  // set once
$api = new WhoisFreaks\Api\GeolocationApi(new GuzzleHttp\Client(), $config);
$result = $api->geolocation("8.8.8.8");
print_r($result);

Bulk IP Geolocation

POST/v1.0/geolocation
ParameterTypeRequiredDescription
bodyBulkGeolocationRequestrequiredrequest body object
php
<?php
// Runnable example: Bulk IP Geolocation (POST /v1.0/geolocation)
// Parameters for bulkGeolocation (POST /v1.0/geolocation):
//   - body: BulkGeolocationRequest (required) -- request body object
require 'vendor/autoload.php';

$config = WhoisFreaks\Configuration::getDefaultConfiguration()
    ->setApiKey("apiKey", "YOUR_API_KEY");  // set once
$api = new WhoisFreaks\Api\GeolocationApi(new GuzzleHttp\Client(), $config);
$result = $api->bulkGeolocation(new WhoisFreaks\Model\BulkGeolocationRequest());
print_r($result);

Subdomains

Subdomains Lookup

GET/v1.0/subdomains
ParameterTypeRequiredDescription
domainstringrequired
afterstringoptional
beforestringoptional
statusstring (one of: active, inactive)optional
pageintegeroptional
formatstring (one of: json, xml)optional
php
<?php
// Runnable example: Subdomains Lookup (GET /v1.0/subdomains)
// 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 'vendor/autoload.php';

$config = WhoisFreaks\Configuration::getDefaultConfiguration()
    ->setApiKey("apiKey", "YOUR_API_KEY");  // set once
$api = new WhoisFreaks\Api\SubdomainsApi(new GuzzleHttp\Client(), $config);
$result = $api->subdomains("example.com", "2000-01-01", (new DateTime("today"))->format("Y-m-d"), null, null, null);
print_r($result);

IP Reputation

IP Reputation Lookup

GET/v1.0/security
ParameterTypeRequiredDescription
ipstringrequired
php
<?php
// Runnable example: IP Reputation Lookup (GET /v1.0/security)
// Parameters for ipReputation (GET /v1.0/security):
//   - ip (string, required)
require 'vendor/autoload.php';

$config = WhoisFreaks\Configuration::getDefaultConfiguration()
    ->setApiKey("apiKey", "YOUR_API_KEY");  // set once
$api = new WhoisFreaks\Api\IPReputationApi(new GuzzleHttp\Client(), $config);
$result = $api->ipReputation("8.8.8.8");
print_r($result);

Bulk IP Reputation

POST/v1.0/security
ParameterTypeRequiredDescription
bodyBulkIpReputationRequestrequiredrequest body object
php
<?php
// Runnable example: Bulk IP Reputation (POST /v1.0/security)
// Parameters for bulkIpReputation (POST /v1.0/security):
//   - body: BulkIpReputationRequest (required) -- request body object
require 'vendor/autoload.php';

$config = WhoisFreaks\Configuration::getDefaultConfiguration()
    ->setApiKey("apiKey", "YOUR_API_KEY");  // set once
$api = new WhoisFreaks\Api\IPReputationApi(new GuzzleHttp\Client(), $config);
$result = $api->bulkIpReputation(new WhoisFreaks\Model\BulkIpReputationRequest());
print_r($result);

Domain Reputation

Domain Reputation Lookup

GET/v1/domain/security
ParameterTypeRequiredDescription
domainNamestringrequiredThe domain name to assess
formatstring (one of: json, xml)optional
php
<?php
// Runnable example: Domain Reputation Lookup (GET /v1/domain/security)
// Parameters for domainReputation (GET /v1/domain/security):
//   - domainName (string, required): The domain name to assess
//   - format (string (one of: json, xml), optional)
require 'vendor/autoload.php';

$config = WhoisFreaks\Configuration::getDefaultConfiguration()
    ->setApiKey("apiKey", "YOUR_API_KEY");  // set once
$api = new WhoisFreaks\Api\DomainReputationApi(new GuzzleHttp\Client(), $config);
$result = $api->domainReputation("example.com", null);
print_r($result);

ASN WHOIS

ASN WHOIS Lookup

GET/v2.0/asn-whois
ParameterTypeRequiredDescription
asnstringrequired
formatstring (one of: json, xml)optional
php
<?php
// Runnable example: ASN WHOIS Lookup (GET /v2.0/asn-whois)
// Parameters for asnWhois (GET /v2.0/asn-whois):
//   - asn (string, required)
//   - format (string (one of: json, xml), optional)
require 'vendor/autoload.php';

$config = WhoisFreaks\Configuration::getDefaultConfiguration()
    ->setApiKey("apiKey", "YOUR_API_KEY");  // set once
$api = new WhoisFreaks\Api\ASNWHOISApi(new GuzzleHttp\Client(), $config);
$result = $api->asnWhois("AS15169", null);
print_r($result);

IP WHOIS

IP WHOIS Lookup

GET/v1.0/ip-whois
ParameterTypeRequiredDescription
ipstringrequired
formatstring (one of: json, xml)optional
php
<?php
// Runnable example: IP WHOIS Lookup (GET /v1.0/ip-whois)
// Parameters for ipWhois (GET /v1.0/ip-whois):
//   - ip (string, required)
//   - format (string (one of: json, xml), optional)
require 'vendor/autoload.php';

$config = WhoisFreaks\Configuration::getDefaultConfiguration()
    ->setApiKey("apiKey", "YOUR_API_KEY");  // set once
$api = new WhoisFreaks\Api\IPWHOISApi(new GuzzleHttp\Client(), $config);
$result = $api->ipWhois("8.8.8.8", null);
print_r($result);

Account

Rotate API Key

GET/v1.0/api-key/rotate
php
<?php
// Runnable example: Rotate API Key (GET /v1.0/api-key/rotate)
// Parameters for rotateApiKey (GET /v1.0/api-key/rotate):
//   (no parameters; the API key is set on the client)
require 'vendor/autoload.php';

$config = WhoisFreaks\Configuration::getDefaultConfiguration()
    ->setApiKey("apiKey", "YOUR_API_KEY");  // set once
$api = new WhoisFreaks\Api\AccountApi(new GuzzleHttp\Client(), $config);
$result = $api->rotateApiKey();
print_r($result);

Account Usage

GET/v1.0/whoisapi/usage
php
<?php
// Runnable example: Account Usage (GET /v1.0/whoisapi/usage)
// Parameters for accountUsage (GET /v1.0/whoisapi/usage):
//   (no parameters; the API key is set on the client)
require 'vendor/autoload.php';

$config = WhoisFreaks\Configuration::getDefaultConfiguration()
    ->setApiKey("apiKey", "YOUR_API_KEY");  // set once
$api = new WhoisFreaks\Api\AccountApi(new GuzzleHttp\Client(), $config);
$result = $api->accountUsage();
print_r($result);

Database File Status (Public)

GET/v3.3/status
php
<?php
// Runnable example: Database File Status (Public) (GET /v3.3/status)
// Parameters for databaseFileStatus (GET /v3.3/status):
//   (no parameters; the API key is set on the client)
require 'vendor/autoload.php';

$config = WhoisFreaks\Configuration::getDefaultConfiguration()
    ->setApiKey("apiKey", "YOUR_API_KEY");  // set once
$api = new WhoisFreaks\Api\AccountApi(new GuzzleHttp\Client(), $config);
$result = $api->databaseFileStatus();
print_r($result);

Databases - Newly Registered

Newly Registered gTLD (CSV)

GET/v3.1/download/domainer/gtld
ParameterTypeRequiredDescription
whoisbooleanrequired
datestringoptionalyyyy-MM-dd; omit for latest
tldsstringoptional
php
<?php
// Runnable example: Newly Registered gTLD (CSV) (GET /v3.1/download/domainer/gtld)
// 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 'vendor/autoload.php';

$config = WhoisFreaks\Configuration::getDefaultConfiguration()
    ->setApiKey("apiKey", "YOUR_API_KEY");  // set once
$api = new WhoisFreaks\Api\DatabasesNewlyRegisteredApi(new GuzzleHttp\Client(), $config);
$result = $api->dbNewlyGtld(false, (new DateTime("yesterday"))->format("Y-m-d"), null);
print_r($result);

Newly Registered ccTLD (CSV)

GET/v3.1/download/domainer/cctld
ParameterTypeRequiredDescription
whoisbooleanrequired
datestringoptionalyyyy-MM-dd; omit for latest
tldsstringoptional
php
<?php
// Runnable example: Newly Registered ccTLD (CSV) (GET /v3.1/download/domainer/cctld)
// 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 'vendor/autoload.php';

$config = WhoisFreaks\Configuration::getDefaultConfiguration()
    ->setApiKey("apiKey", "YOUR_API_KEY");  // set once
$api = new WhoisFreaks\Api\DatabasesNewlyRegisteredApi(new GuzzleHttp\Client(), $config);
$result = $api->dbNewlyCctld(false, (new DateTime("yesterday"))->format("Y-m-d"), null);
print_r($result);

Newly Registered gTLD Cleaned WHOIS (CSV)

GET/v3.1/download/domainer/gtld/cleaned
ParameterTypeRequiredDescription
datestringoptionalyyyy-MM-dd; omit for latest
php
<?php
// Runnable example: Newly Registered gTLD Cleaned WHOIS (CSV) (GET /v3.1/download/domainer/gtld/cleaned)
// Parameters for dbNewlyGtldCleaned (GET /v3.1/download/domainer/gtld/cleaned):
//   - date (string, optional): yyyy-MM-dd; omit for latest
require 'vendor/autoload.php';

$config = WhoisFreaks\Configuration::getDefaultConfiguration()
    ->setApiKey("apiKey", "YOUR_API_KEY");  // set once
$api = new WhoisFreaks\Api\DatabasesNewlyRegisteredApi(new GuzzleHttp\Client(), $config);
$result = $api->dbNewlyGtldCleaned((new DateTime("yesterday"))->format("Y-m-d"));
print_r($result);

Newly Registered ccTLD Cleaned WHOIS (CSV)

GET/v3.1/download/domainer/cctld/cleaned
ParameterTypeRequiredDescription
datestringoptionalyyyy-MM-dd; omit for latest
php
<?php
// Runnable example: Newly Registered ccTLD Cleaned WHOIS (CSV) (GET /v3.1/download/domainer/cctld/cleaned)
// Parameters for dbNewlyCctldCleaned (GET /v3.1/download/domainer/cctld/cleaned):
//   - date (string, optional): yyyy-MM-dd; omit for latest
require 'vendor/autoload.php';

$config = WhoisFreaks\Configuration::getDefaultConfiguration()
    ->setApiKey("apiKey", "YOUR_API_KEY");  // set once
$api = new WhoisFreaks\Api\DatabasesNewlyRegisteredApi(new GuzzleHttp\Client(), $config);
$result = $api->dbNewlyCctldCleaned((new DateTime("yesterday"))->format("Y-m-d"));
print_r($result);

Newly Registered gTLD (JSON)

GET/v3.1/domains/newly/gtld
ParameterTypeRequiredDescription
datestringoptionalyyyy-MM-dd; omit for latest
tldsstringoptional
php
<?php
// Runnable example: Newly Registered gTLD (JSON) (GET /v3.1/domains/newly/gtld)
// Parameters for dbNewlyGtldJson (GET /v3.1/domains/newly/gtld):
//   - date (string, optional): yyyy-MM-dd; omit for latest
//   - tlds (string, optional)
require 'vendor/autoload.php';

$config = WhoisFreaks\Configuration::getDefaultConfiguration()
    ->setApiKey("apiKey", "YOUR_API_KEY");  // set once
$api = new WhoisFreaks\Api\DatabasesNewlyRegisteredApi(new GuzzleHttp\Client(), $config);
$result = $api->dbNewlyGtldJson((new DateTime("yesterday"))->format("Y-m-d"), null);
print_r($result);

Newly Registered ccTLD (JSON)

GET/v3.1/domains/newly/cctld
ParameterTypeRequiredDescription
datestringoptionalyyyy-MM-dd; omit for latest
tldsstringoptional
php
<?php
// Runnable example: Newly Registered ccTLD (JSON) (GET /v3.1/domains/newly/cctld)
// Parameters for dbNewlyCctldJson (GET /v3.1/domains/newly/cctld):
//   - date (string, optional): yyyy-MM-dd; omit for latest
//   - tlds (string, optional)
require 'vendor/autoload.php';

$config = WhoisFreaks\Configuration::getDefaultConfiguration()
    ->setApiKey("apiKey", "YOUR_API_KEY");  // set once
$api = new WhoisFreaks\Api\DatabasesNewlyRegisteredApi(new GuzzleHttp\Client(), $config);
$result = $api->dbNewlyCctldJson((new DateTime("yesterday"))->format("Y-m-d"), null);
print_r($result);

Newly Registered With DNS

GET/v3.1/download/domainer/newly/dns
ParameterTypeRequiredDescription
datestringoptionalyyyy-MM-dd; omit for latest
php
<?php
// Runnable example: Newly Registered With DNS (GET /v3.1/download/domainer/newly/dns)
// Parameters for dbNewlyDns (GET /v3.1/download/domainer/newly/dns):
//   - date (string, optional): yyyy-MM-dd; omit for latest
require 'vendor/autoload.php';

$config = WhoisFreaks\Configuration::getDefaultConfiguration()
    ->setApiKey("apiKey", "YOUR_API_KEY");  // set once
$api = new WhoisFreaks\Api\DatabasesNewlyRegisteredApi(new GuzzleHttp\Client(), $config);
$result = $api->dbNewlyDns((new DateTime("yesterday"))->format("Y-m-d"));
print_r($result);

Databases - Expiring & Dropped

Expiring Domains

GET/v3.1/download/domainer/expired
ParameterTypeRequiredDescription
whoisbooleanrequired
datestringoptionalyyyy-MM-dd; omit for latest
php
<?php
// Runnable example: Expiring Domains (GET /v3.1/download/domainer/expired)
// Parameters for dbExpired (GET /v3.1/download/domainer/expired):
//   - whois (boolean, required)
//   - date (string, optional): yyyy-MM-dd; omit for latest
require 'vendor/autoload.php';

$config = WhoisFreaks\Configuration::getDefaultConfiguration()
    ->setApiKey("apiKey", "YOUR_API_KEY");  // set once
$api = new WhoisFreaks\Api\DatabasesExpiringDroppedApi(new GuzzleHttp\Client(), $config);
$result = $api->dbExpired(false, (new DateTime("yesterday"))->format("Y-m-d"));
print_r($result);

Expiring Cleaned WHOIS

GET/v3.1/download/domainer/expired/cleaned
ParameterTypeRequiredDescription
datestringoptionalyyyy-MM-dd; omit for latest
php
<?php
// Runnable example: Expiring Cleaned WHOIS (GET /v3.1/download/domainer/expired/cleaned)
// Parameters for dbExpiredCleaned (GET /v3.1/download/domainer/expired/cleaned):
//   - date (string, optional): yyyy-MM-dd; omit for latest
require 'vendor/autoload.php';

$config = WhoisFreaks\Configuration::getDefaultConfiguration()
    ->setApiKey("apiKey", "YOUR_API_KEY");  // set once
$api = new WhoisFreaks\Api\DatabasesExpiringDroppedApi(new GuzzleHttp\Client(), $config);
$result = $api->dbExpiredCleaned((new DateTime("yesterday"))->format("Y-m-d"));
print_r($result);

Dropped Domains

GET/v3.1/download/domainer/dropped
ParameterTypeRequiredDescription
whoisbooleanrequired
datestringoptionalyyyy-MM-dd; omit for latest
php
<?php
// Runnable example: Dropped Domains (GET /v3.1/download/domainer/dropped)
// Parameters for dbDropped (GET /v3.1/download/domainer/dropped):
//   - whois (boolean, required)
//   - date (string, optional): yyyy-MM-dd; omit for latest
require 'vendor/autoload.php';

$config = WhoisFreaks\Configuration::getDefaultConfiguration()
    ->setApiKey("apiKey", "YOUR_API_KEY");  // set once
$api = new WhoisFreaks\Api\DatabasesExpiringDroppedApi(new GuzzleHttp\Client(), $config);
$result = $api->dbDropped(false, (new DateTime("yesterday"))->format("Y-m-d"));
print_r($result);

Dropped Domains (JSON)

GET/v3.1/domains/dropped
ParameterTypeRequiredDescription
datestringoptionalyyyy-MM-dd; omit for latest
tldsstringoptional
php
<?php
// Runnable example: Dropped Domains (JSON) (GET /v3.1/domains/dropped)
// Parameters for dbDroppedJson (GET /v3.1/domains/dropped):
//   - date (string, optional): yyyy-MM-dd; omit for latest
//   - tlds (string, optional)
require 'vendor/autoload.php';

$config = WhoisFreaks\Configuration::getDefaultConfiguration()
    ->setApiKey("apiKey", "YOUR_API_KEY");  // set once
$api = new WhoisFreaks\Api\DatabasesExpiringDroppedApi(new GuzzleHttp\Client(), $config);
$result = $api->dbDroppedJson((new DateTime("yesterday"))->format("Y-m-d"), null);
print_r($result);

Databases - WHOIS

WHOIS Database Daily

GET/v3.3/download/dbupdate/daily/domains/whois
ParameterTypeRequiredDescription
datestringoptionalyyyy-MM-dd; omit for latest
php
<?php
// Runnable example: WHOIS Database Daily (GET /v3.3/download/dbupdate/daily/domains/whois)
// Parameters for dbWhoisDaily (GET /v3.3/download/dbupdate/daily/domains/whois):
//   - date (string, optional): yyyy-MM-dd; omit for latest
require 'vendor/autoload.php';

$config = WhoisFreaks\Configuration::getDefaultConfiguration()
    ->setApiKey("apiKey", "YOUR_API_KEY");  // set once
$api = new WhoisFreaks\Api\DatabasesWHOISApi(new GuzzleHttp\Client(), $config);
$result = $api->dbWhoisDaily((new DateTime("yesterday"))->format("Y-m-d"));
print_r($result);

WHOIS Database Weekly

GET/v3.3/download/dbupdate/weekly/domains/whois
ParameterTypeRequiredDescription
datestringoptionalyyyy-MM-dd; omit for latest
php
<?php
// Runnable example: WHOIS Database Weekly (GET /v3.3/download/dbupdate/weekly/domains/whois)
// Parameters for dbWhoisWeekly (GET /v3.3/download/dbupdate/weekly/domains/whois):
//   - date (string, optional): yyyy-MM-dd; omit for latest
require 'vendor/autoload.php';

$config = WhoisFreaks\Configuration::getDefaultConfiguration()
    ->setApiKey("apiKey", "YOUR_API_KEY");  // set once
$api = new WhoisFreaks\Api\DatabasesWHOISApi(new GuzzleHttp\Client(), $config);
$result = $api->dbWhoisWeekly((new DateTime("yesterday"))->format("Y-m-d"));
print_r($result);

WHOIS Database Monthly

GET/v3.3/download/dbupdate/monthly/domains/whois
ParameterTypeRequiredDescription
datestringoptionalyyyy-MM-dd; omit for latest
php
<?php
// Runnable example: WHOIS Database Monthly (GET /v3.3/download/dbupdate/monthly/domains/whois)
// Parameters for dbWhoisMonthly (GET /v3.3/download/dbupdate/monthly/domains/whois):
//   - date (string, optional): yyyy-MM-dd; omit for latest
require 'vendor/autoload.php';

$config = WhoisFreaks\Configuration::getDefaultConfiguration()
    ->setApiKey("apiKey", "YOUR_API_KEY");  // set once
$api = new WhoisFreaks\Api\DatabasesWHOISApi(new GuzzleHttp\Client(), $config);
$result = $api->dbWhoisMonthly((new DateTime("yesterday"))->format("Y-m-d"));
print_r($result);

Databases - DNS

DNS Database Daily

GET/v3.2/download/dbupdate/daily/dns
ParameterTypeRequiredDescription
datestringoptionalyyyy-MM-dd; omit for latest
php
<?php
// Runnable example: DNS Database Daily (GET /v3.2/download/dbupdate/daily/dns)
// Parameters for dbDnsDaily (GET /v3.2/download/dbupdate/daily/dns):
//   - date (string, optional): yyyy-MM-dd; omit for latest
require 'vendor/autoload.php';

$config = WhoisFreaks\Configuration::getDefaultConfiguration()
    ->setApiKey("apiKey", "YOUR_API_KEY");  // set once
$api = new WhoisFreaks\Api\DatabasesDNSApi(new GuzzleHttp\Client(), $config);
$result = $api->dbDnsDaily((new DateTime("yesterday"))->format("Y-m-d"));
print_r($result);

DNS Database Weekly

GET/v3.2/download/dbupdate/weekly/dns
ParameterTypeRequiredDescription
datestringoptionalyyyy-MM-dd; omit for latest
php
<?php
// Runnable example: DNS Database Weekly (GET /v3.2/download/dbupdate/weekly/dns)
// Parameters for dbDnsWeekly (GET /v3.2/download/dbupdate/weekly/dns):
//   - date (string, optional): yyyy-MM-dd; omit for latest
require 'vendor/autoload.php';

$config = WhoisFreaks\Configuration::getDefaultConfiguration()
    ->setApiKey("apiKey", "YOUR_API_KEY");  // set once
$api = new WhoisFreaks\Api\DatabasesDNSApi(new GuzzleHttp\Client(), $config);
$result = $api->dbDnsWeekly((new DateTime("yesterday"))->format("Y-m-d"));
print_r($result);

DNS Database Monthly

GET/v3.2/download/dbupdate/monthly/dns
ParameterTypeRequiredDescription
datestringoptionalyyyy-MM-dd; omit for latest
php
<?php
// Runnable example: DNS Database Monthly (GET /v3.2/download/dbupdate/monthly/dns)
// Parameters for dbDnsMonthly (GET /v3.2/download/dbupdate/monthly/dns):
//   - date (string, optional): yyyy-MM-dd; omit for latest
require 'vendor/autoload.php';

$config = WhoisFreaks\Configuration::getDefaultConfiguration()
    ->setApiKey("apiKey", "YOUR_API_KEY");  // set once
$api = new WhoisFreaks\Api\DatabasesDNSApi(new GuzzleHttp\Client(), $config);
$result = $api->dbDnsMonthly((new DateTime("yesterday"))->format("Y-m-d"));
print_r($result);

Databases - Subdomains

Subdomains Daily

GET/v3.2/download/dbupdate/daily/subdomains
ParameterTypeRequiredDescription
datestringoptionalyyyy-MM-dd; omit for latest
php
<?php
// Runnable example: Subdomains Daily (GET /v3.2/download/dbupdate/daily/subdomains)
// Parameters for dbSubdomainsDaily (GET /v3.2/download/dbupdate/daily/subdomains):
//   - date (string, optional): yyyy-MM-dd; omit for latest
require 'vendor/autoload.php';

$config = WhoisFreaks\Configuration::getDefaultConfiguration()
    ->setApiKey("apiKey", "YOUR_API_KEY");  // set once
$api = new WhoisFreaks\Api\DatabasesSubdomainsApi(new GuzzleHttp\Client(), $config);
$result = $api->dbSubdomainsDaily((new DateTime("yesterday"))->format("Y-m-d"));
print_r($result);

Subdomains Weekly

GET/v3.2/download/dbupdate/weekly/subdomains
ParameterTypeRequiredDescription
datestringoptionalyyyy-MM-dd; omit for latest
php
<?php
// Runnable example: Subdomains Weekly (GET /v3.2/download/dbupdate/weekly/subdomains)
// Parameters for dbSubdomainsWeekly (GET /v3.2/download/dbupdate/weekly/subdomains):
//   - date (string, optional): yyyy-MM-dd; omit for latest
require 'vendor/autoload.php';

$config = WhoisFreaks\Configuration::getDefaultConfiguration()
    ->setApiKey("apiKey", "YOUR_API_KEY");  // set once
$api = new WhoisFreaks\Api\DatabasesSubdomainsApi(new GuzzleHttp\Client(), $config);
$result = $api->dbSubdomainsWeekly((new DateTime("yesterday"))->format("Y-m-d"));
print_r($result);

Subdomains Monthly

GET/v3.2/download/dbupdate/monthly/subdomains
ParameterTypeRequiredDescription
datestringoptionalyyyy-MM-dd; omit for latest
php
<?php
// Runnable example: Subdomains Monthly (GET /v3.2/download/dbupdate/monthly/subdomains)
// Parameters for dbSubdomainsMonthly (GET /v3.2/download/dbupdate/monthly/subdomains):
//   - date (string, optional): yyyy-MM-dd; omit for latest
require 'vendor/autoload.php';

$config = WhoisFreaks\Configuration::getDefaultConfiguration()
    ->setApiKey("apiKey", "YOUR_API_KEY");  // set once
$api = new WhoisFreaks\Api\DatabasesSubdomainsApi(new GuzzleHttp\Client(), $config);
$result = $api->dbSubdomainsMonthly((new DateTime("yesterday"))->format("Y-m-d"));
print_r($result);

Databases - IP Geolocation

IP to Country Snapshot Status

GET/v3.3/status/snapshot/ip/country
php
<?php
// Runnable example: IP to Country Snapshot Status (GET /v3.3/status/snapshot/ip/country)
// Parameters for dbIpCountryStatus (GET /v3.3/status/snapshot/ip/country):
//   (no parameters; the API key is set on the client)
require 'vendor/autoload.php';

$config = WhoisFreaks\Configuration::getDefaultConfiguration()
    ->setApiKey("apiKey", "YOUR_API_KEY");  // set once
$api = new WhoisFreaks\Api\DatabasesIPGeolocationApi(new GuzzleHttp\Client(), $config);
$result = $api->dbIpCountryStatus();
print_r($result);

IP to Country Snapshot

GET/v3.3/download/snapshot/ip/country
ParameterTypeRequiredDescription
datestringrequired
php
<?php
// Runnable example: IP to Country Snapshot (GET /v3.3/download/snapshot/ip/country)
// Parameters for dbIpCountry (GET /v3.3/download/snapshot/ip/country):
//   - date (string, required)
require 'vendor/autoload.php';

$config = WhoisFreaks\Configuration::getDefaultConfiguration()
    ->setApiKey("apiKey", "YOUR_API_KEY");  // set once
$api = new WhoisFreaks\Api\DatabasesIPGeolocationApi(new GuzzleHttp\Client(), $config);
$result = $api->dbIpCountry((new DateTime("yesterday"))->format("Y-m-d"));
print_r($result);

IP to City Snapshot Status

GET/v3.3/status/snapshot/ip/city
php
<?php
// Runnable example: IP to City Snapshot Status (GET /v3.3/status/snapshot/ip/city)
// Parameters for dbIpCityStatus (GET /v3.3/status/snapshot/ip/city):
//   (no parameters; the API key is set on the client)
require 'vendor/autoload.php';

$config = WhoisFreaks\Configuration::getDefaultConfiguration()
    ->setApiKey("apiKey", "YOUR_API_KEY");  // set once
$api = new WhoisFreaks\Api\DatabasesIPGeolocationApi(new GuzzleHttp\Client(), $config);
$result = $api->dbIpCityStatus();
print_r($result);

IP to City Snapshot

GET/v3.3/download/snapshot/ip/city
ParameterTypeRequiredDescription
datestringrequired
php
<?php
// Runnable example: IP to City Snapshot (GET /v3.3/download/snapshot/ip/city)
// Parameters for dbIpCity (GET /v3.3/download/snapshot/ip/city):
//   - date (string, required)
require 'vendor/autoload.php';

$config = WhoisFreaks\Configuration::getDefaultConfiguration()
    ->setApiKey("apiKey", "YOUR_API_KEY");  // set once
$api = new WhoisFreaks\Api\DatabasesIPGeolocationApi(new GuzzleHttp\Client(), $config);
$result = $api->dbIpCity((new DateTime("yesterday"))->format("Y-m-d"));
print_r($result);

Databases - ASN WHOIS

ASN WHOIS Snapshot

GET/v3.3/download/snapshot/asn/whois
ParameterTypeRequiredDescription
datestringrequired
php
<?php
// Runnable example: ASN WHOIS Snapshot (GET /v3.3/download/snapshot/asn/whois)
// Parameters for dbAsnWhois (GET /v3.3/download/snapshot/asn/whois):
//   - date (string, required)
require 'vendor/autoload.php';

$config = WhoisFreaks\Configuration::getDefaultConfiguration()
    ->setApiKey("apiKey", "YOUR_API_KEY");  // set once
$api = new WhoisFreaks\Api\DatabasesASNWHOISApi(new GuzzleHttp\Client(), $config);
$result = $api->dbAsnWhois((new DateTime("yesterday"))->format("Y-m-d"));
print_r($result);

ASN WHOIS Snapshot Status

GET/v3.3/status/snapshot/asn/whois
php
<?php
// Runnable example: ASN WHOIS Snapshot Status (GET /v3.3/status/snapshot/asn/whois)
// Parameters for dbAsnWhoisStatus (GET /v3.3/status/snapshot/asn/whois):
//   (no parameters; the API key is set on the client)
require 'vendor/autoload.php';

$config = WhoisFreaks\Configuration::getDefaultConfiguration()
    ->setApiKey("apiKey", "YOUR_API_KEY");  // set once
$api = new WhoisFreaks\Api\DatabasesASNWHOISApi(new GuzzleHttp\Client(), $config);
$result = $api->dbAsnWhoisStatus();
print_r($result);

Databases - IP WHOIS

IP WHOIS Snapshot

GET/v3.3/download/snapshot/ip/whois
ParameterTypeRequiredDescription
datestringrequired
php
<?php
// Runnable example: IP WHOIS Snapshot (GET /v3.3/download/snapshot/ip/whois)
// Parameters for dbIpWhois (GET /v3.3/download/snapshot/ip/whois):
//   - date (string, required)
require 'vendor/autoload.php';

$config = WhoisFreaks\Configuration::getDefaultConfiguration()
    ->setApiKey("apiKey", "YOUR_API_KEY");  // set once
$api = new WhoisFreaks\Api\DatabasesIPWHOISApi(new GuzzleHttp\Client(), $config);
$result = $api->dbIpWhois((new DateTime("yesterday"))->format("Y-m-d"));
print_r($result);

IP WHOIS Snapshot Status

GET/v3.3/status/snapshot/ip/whois
php
<?php
// Runnable example: IP WHOIS Snapshot Status (GET /v3.3/status/snapshot/ip/whois)
// Parameters for dbIpWhoisStatus (GET /v3.3/status/snapshot/ip/whois):
//   (no parameters; the API key is set on the client)
require 'vendor/autoload.php';

$config = WhoisFreaks\Configuration::getDefaultConfiguration()
    ->setApiKey("apiKey", "YOUR_API_KEY");  // set once
$api = new WhoisFreaks\Api\DatabasesIPWHOISApi(new GuzzleHttp\Client(), $config);
$result = $api->dbIpWhoisStatus();
print_r($result);

Databases - IP Security

IP Security Snapshot

GET/v3.3/download/snapshot/ip/security
ParameterTypeRequiredDescription
datestringrequired
php
<?php
// Runnable example: IP Security Snapshot (GET /v3.3/download/snapshot/ip/security)
// Parameters for dbIpSecurity (GET /v3.3/download/snapshot/ip/security):
//   - date (string, required)
require 'vendor/autoload.php';

$config = WhoisFreaks\Configuration::getDefaultConfiguration()
    ->setApiKey("apiKey", "YOUR_API_KEY");  // set once
$api = new WhoisFreaks\Api\DatabasesIPSecurityApi(new GuzzleHttp\Client(), $config);
$result = $api->dbIpSecurity((new DateTime("yesterday"))->format("Y-m-d"));
print_r($result);

IP Security Snapshot Status

GET/v3.3/status/snapshot/ip/security
php
<?php
// Runnable example: IP Security Snapshot Status (GET /v3.3/status/snapshot/ip/security)
// Parameters for dbIpSecurityStatus (GET /v3.3/status/snapshot/ip/security):
//   (no parameters; the API key is set on the client)
require 'vendor/autoload.php';

$config = WhoisFreaks\Configuration::getDefaultConfiguration()
    ->setApiKey("apiKey", "YOUR_API_KEY");  // set once
$api = new WhoisFreaks\Api\DatabasesIPSecurityApi(new GuzzleHttp\Client(), $config);
$result = $api->dbIpSecurityStatus();
print_r($result);