APIVoid logo

Domain Age API Reference

Get the age of a domain: creation date and age in days, months and years. Useful to detect newly (and potentially suspicious) registered domains in threat analysis.

Service details and pricing: Domain Age API

POSThttps://api.apivoid.com/v2/domain-age
1 credit per successful requestPOST · JSON

Request example

Query the endpoint via an HTTPS POST request (replace YOUR_API_KEY_HERE with your API key):

curl
curl -X POST "https://api.apivoid.com/v2/domain-age" \
     -H "Content-Type: application/json" \
     -H "X-API-Key: YOUR_API_KEY_HERE" \
     -d '{"host": "example.com"}'

The same request in PHP:

php
$host = 'example.com';

$apiKey = 'YOUR_API_KEY_HERE';

$curl = curl_init('https://api.apivoid.com/v2/domain-age');
curl_setopt($curl, CURLOPT_HTTPHEADER, ['Content-Type: application/json', 'X-API-Key: ' . $apiKey]);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode(['host' => $host]));
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($curl);
$httpCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
curl_close($curl);

if ($httpCode === 200) {
    $responseData = json_decode($response, true);
    print_r($responseData);
} else {
    print_r('An error occurred: '.$response);
}

Request parameters

Required

hoststringRequired

Host to submit, e.g. google.com.

Optional

timeoutintegerDefault: 25

Set a custom timeout in seconds, can be from 5 to 30 seconds.

cache_onlybooleanDefault: false

Get data only from the cache (if present) for a faster response.

Response example

A successful request returns HTTP 200 with a JSON body:

json · 200
{
    "host": "example.com",
    "debug_message": "",
    "domain_age_found": true,
    "domain_registered": "yes",
    "domain_creation_date": "1995-08-14",
    "domain_age_in_days": 10700,
    "domain_age_in_months": 345,
    "domain_age_in_years": 29,
    "elapsed_ms": 310
}

Response fields

The fields returned in the JSON response:

hoststring

Host submitted for the domain age check.

debug_messagestring

Debug or error details about the request, if any. Empty string if none.

domain_age_foundboolean

Returns true if domain age was successfully retrieved.

domain_registeredstring

Returns "yes" if domain is registered, can be yes/no/unknown.

domain_creation_datestring

Domain registration date, format is Y-m-d (empty if unknown).

domain_age_in_daysinteger

Age of the domain in days (0 if unknown).

domain_age_in_monthsinteger

Age of the domain in months (0 if unknown).

domain_age_in_yearsinteger

Age of the domain in years (0 if unknown).

elapsed_msinteger

Time taken to process the request, in milliseconds.