Blog · · 4 min read
How to Check Domain Age With an API (and When It Fails)
Look up when a domain was first registered and how old it is, as JSON. See where the date comes from, what a failure looks like, and how to handle both in code.
How old is a domain? The answer helps you judge a site before you buy a link, vet a shop, or decide whether a domain you want to buy has any history. This guide shows how to get the date as JSON, where it comes from, and what to do when no date exists.
Make the request
Send the domain as a query parameter. Send the bare domain, such as example.com, with no https:// and no path. Every call needs an API key. New accounts get 100 free credits and a first key is created automatically on sign-up (it is shown once on the dashboard). Sign in at scrapingrabbit.com/login, then send the key in the x-api-key header (a Bearer token also works). The code below reads it from the SCRAPINGRABBIT_API_KEY environment variable, so no key is ever written into your code.
curl -H "x-api-key: $SCRAPINGRABBIT_API_KEY" "https://api.scrapingrabbit.com/v1/seo/domain-age?domain=example.com"
A successful call costs 1 credit and returns the X-Credits-Charged header.
This is the real answer, read on 27 November 2026:
{
"success": true,
"data": {
"domain_name": "example.com",
"domain_creation_date": "1995-08-14",
"domain_age_years": 31,
"domain_age_months": 3,
"domain_age_days": 13,
"domain_age": "31 years, 3 months, 13 days",
"source": "RDAP"
}
}
The age fields are worked out from the creation date up to the day of the request, so they change every day. Store domain_creation_date if you need something stable, and compute the age yourself when you display it.
Where the date comes from
The source field tells you how the date was found. We saw two values:
| Source | Example | What it means |
|---|---|---|
RDAP | example.com | The registry's own record, which is the most direct source |
WHOIS | bbc.co.uk | A WHOIS lookup, used when the registry has no RDAP service |
For bbc.co.uk the answer was a creation date of 1994-12-13 with source set to WHOIS. Both sources give the same kind of result, so most code can ignore the field. It is still worth logging, because it tells you which path answered if a date ever looks wrong.
When there is no date
Two cases return a 404 with success set to false. The message tells them apart. The failure body has a code (here UPSTREAM_NOT_FOUND, meaning the source has nothing for that input) and a message. These calls are not charged.
For a name that is not registered:
{ "success": false, "code": "UPSTREAM_NOT_FOUND", "message": "thisdomaindoesnotexist98765.com is not registered" }
For a registry that does not publish creation dates. We saw this with a .de name:
{ "success": false, "code": "UPSTREAM_NOT_FOUND", "message": "No creation date found for google.de; its registry does not publish one" }
The second case is not a bug and a retry will not fix it. Some country registries simply do not share the date, so plan for a "date not available" state in your own product.
Handle both in code
async function domainAge(domain) {
const url = `https://api.scrapingrabbit.com/v1/seo/domain-age?domain=${encodeURIComponent(domain)}`;
const res = await fetch(url, { headers: { "x-api-key": process.env.SCRAPINGRABBIT_API_KEY } });
const body = await res.json();
if (!body.success) {
return { ok: false, reason: body.message };
}
return {
ok: true,
created: body.data.domain_creation_date,
years: body.data.domain_age_years,
via: body.data.source,
};
}
const result = await domainAge("example.com");
console.log(result.ok ? `${result.years} years old` : `No date: ${result.reason}`);
The same in Python:
import os
import requests
def domain_age(domain):
res = requests.get(
"https://api.scrapingrabbit.com/v1/seo/domain-age",
params={"domain": domain},
headers={"x-api-key": os.environ["SCRAPINGRABBIT_API_KEY"]},
timeout=60,
)
body = res.json()
if not body["success"]:
return None, body["message"]
return body["data"]["domain_creation_date"], None
Both functions return the reason when there is no date, so your interface can show it as it is.
Using the age wisely
A few habits keep the number useful:
- Compare with other signals. An old domain with no links and no content is not impressive. Pair the age with a link metric, such as Moz Domain Authority, and with a look at the site itself.
- Watch for recent registrations. A shop registered last week deserves more care than one registered ten years ago.
- Remember what changed hands. A domain can be sold, and the creation date stays the same. The date tells you how long the name has existed, not how long the current owner has had it.
Limits
Each key is limited per minute: 10 requests on the free plan, 60 on Starter, 120 on Pro and 300 on Scale. Going over returns a 429 with code RATE_LIMITED and a Retry-After header in seconds. Each successful call costs 1 credit. If you check a long list of domains, add a short pause between requests to stay under your plan's per-minute limit, and cache each answer, because a creation date never changes and a cached answer costs no credit.
Try it without code
The free domain age checker works in the browser with no key and shows the creation date and the age in years, months and days for any domain. When no date exists, it tells you that the name may not be registered or that its registry may not publish creation dates.
Try it yourself
Frequently asked questions
Is domain age the same as website age?
No. It is the date the domain was first registered. A site can launch years later, and a domain can change owners without the date changing.
Why do some domains return no date?
Either the name is not registered, or its registry does not publish creation dates. The error `message` says which. For example, a .de name returned a message that its registry does not publish one.
Does domain age help a site rank?
Age by itself is a weak signal. It tells you about history, which is useful when you judge a site, but it is not something you can rely on to rank.