API Documentation

Domain Age API

Domain registration dates, expiration dates, age calculation, response fields and billing.

Test API

Query the current available registration record for a domain and calculate its age in complete days. Use it with DR, traffic and backlink research; registration age does not establish website quality or website launch time.

Test Domain Age API →

Endpoint and authentication

GET https://api.goanyapi.com/api/v1/domain-age
Authorization: Bearer YOUR_API_KEY

With the current configuration, each successful request costs 1 credit.

Only requests with a valid, calculable registration age use the current configured price. An age of zero days is valid and billable. A successful response without a usable registration date is free and returns age_days=null. A missing expiration date does not affect billing. Invalid parameters, authentication errors, insufficient balance and request failures do not consume credits. Authentication and sufficient balance are checked before a live lookup, even when its eventual result is unavailable. Each live query is a separate request.

Request parameters

domain is required. Only the documented parameter is accepted, and it must occur exactly once. The domain normalization matches the Domain Rating API. Subdomains are retained rather than silently changed to a parent domain; results depend on the available registration record.

FieldTypeDescription
domainstringOne domain, for example example.com. URL prefixes, paths, ports and a trailing dot are removed; subdomains are preserved. At most 2048 input characters and 253 characters after normalization.

Request example

GET /api/v1/domain-age?domain=example.com
Authorization: Bearer YOUR_API_KEY

Response fields

FieldTypeDescription
data.endpointstringFixed API identifier: domain-age.
data.costCreditsnumberActual credits consumed using the database-configured rate. Unavailable ages and failures cost zero.
data.remainingCreditsnumberRemaining account balance after this request.
data.query.domainstringNormalized requested domain.
data.domainstringNormalized target domain; this is the requested target.
data.registrationstring / null / missingOriginal registration business value. May be empty, null or absent; it is not replaced with a fabricated date.
data.expirationstring / null / missingOriginal expiration business value. May be empty, null or absent and does not affect age billing.
data.age_daysinteger / nullComplete elapsed 24-hour periods at as_of, rounded down. ISO date-only values use midnight UTC; timestamps must have an explicit timezone. Invalid, missing or future dates return null. Zero is a valid age.
data.as_ofstringUTC ISO timestamp used for the calculation. Saved examples retain their original timestamp and age.

The original registration and expiration values are preserved, including null, empty strings and missing fields. Other unusual business values remain subject to the public field whitelist and do not by themselves fail the entire request. No registration date is fabricated. An unavailable age does not imply that the domain is unregistered.

Age calculation

age_days is floor((as_of − registration) / 86400000), using timestamps in milliseconds. It counts complete elapsed 24-hour periods, including leap days, rather than rounded years. ISO date-only values use midnight UTC; date-time values require an explicit timezone. Invalid calendar dates, missing dates and registration dates later than as_of yield null and are not billable. expiration is not used in the calculation. This endpoint does not provide historical registration events or ownership history.

Saved real response example

This example is stored locally. Its as_of and age_days remain fixed at capture time; viewing it makes no live request. Live responses also include costCredits and remainingCredits using the current configured price and account balance.

{  "code": "ok",  "message": "Saved example response",  "data": {    "endpoint": "domain-age",    "query": {      "domain": "example.com"    },    "domain": "example.com",    "registration": "1995-08-14T04:00:00Z",    "expiration": "2027-08-13T04:00:00Z",    "age_days": 11411,    "as_of": "2026-11-11T03:31:33.011Z"  }}

Errors

400 invalid_params: missing, invalid, repeated or unknown parameters; 401: authentication required; 402 insufficient_credits: insufficient balance; 429: rate limited; 503 service_not_configured: service or pricing unavailable; 502 request_failed: HTTP, business or invalid JSON response failure; 504 request_timeout: lookup timed out. Failed requests are free. A successful response containing empty dates is returned as a normal success rather than a 502.