Domain metrics API
One request, one credit, three data sources. Everything the v1 API returned plus Pretty metrics and the additional Majestic fields, at no extra cost.
Authentication
Pass your key as the apikey query parameter, or as an
apikey request header. Every call also needs an app
value naming the software making it — that is what lets us tell you
which of your integrations is spending credits when you ask.
Keys are per account rather than per application, so the same key works from your own code, the desktop app and the web tools. Treat it like a password: anyone holding it can spend your credits.
Domain metrics
1 creditMoz, Majestic and Pretty metrics for one domain in a single call.
GET https://domdetailer.com/api2/checkDomain.php?apikey=YOUR_KEY&app=YourApp&domain=example.com
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
apikey |
string | Required | Your account API key. May also be sent as an apikey header. |
app |
string | Required | A short identifier for the software making the call. Used for support and usage reporting. |
domain |
string | Required | The domain to look up. Send a bare hostname; protocols and a leading www. are stripped for you. |
forceFresh |
boolean | Optional | Bypass the cached Moz record and refetch. Costs the same, takes longer. |
Response fields
| Field | Type | Meaning |
|---|---|---|
mozDA |
number | Domain Authority, 1-100. |
mozPA |
number | Page Authority of the home page, 1-100. |
mozRank |
number | MozRank, 0-10. |
mozTrust |
number | MozTrust, 0-10. |
mozSpam |
number | Spam Score, 0-17. |
mozLinks |
number | External inbound links recorded by Moz. |
| Field | Type | Meaning |
|---|---|---|
majesticTF |
number | Trust Flow, 0-100. |
majesticCF |
number | Citation Flow, 0-100. |
majesticLinks |
number | External inbound links. |
majesticRefDomains |
number | Unique referring domains. |
majesticRefIPs |
number | Unique referring IP addresses. |
majesticRefSubnets |
number | Unique referring class C subnets. |
majesticRefEdu |
number | Inbound links from .edu domains. |
majesticRefGov |
number | Inbound links from .gov domains. |
majesticStatReturned |
string | Which Majestic dataset answered. |
majesticTTF0Name |
string | First Topical Trust Flow category. |
majesticTTF0Value |
number | Trust Flow within that category. |
majesticTTF1Name |
string | Second Topical Trust Flow category. |
majesticTTF1Value |
number | Trust Flow within that category. |
majesticTTF2Name |
string | Third Topical Trust Flow category. |
majesticTTF2Value |
number | Trust Flow within that category. |
| Field | Type | Meaning |
|---|---|---|
prettyLinksIn |
number | External inbound links our crawl has observed. |
prettyLinksOut |
number | External outbound links to other domains. |
prettyPageCount |
number | Pages of this domain in our index. |
prettyLinksDofollow |
number | Inbound links without a nofollow attribute. |
prettyLinksEdu |
number | Inbound links from .edu domains. |
prettyLinksGov |
number | Inbound links from .gov domains. |
What each metric actually tells you, and which combinations catch a manipulated profile, is covered in the field reference.
Example response
{
"domain": "domainhuntergatherer.com",
"mozLinks": 16009,
"mozPA": 42,
"mozDA": 34,
"mozRank": 4,
"mozTrust": 3,
"mozSpam": 0,
"majesticStatReturned": "Default",
"majesticLinks": 82888,
"majesticRefDomains": 1849,
"majesticCF": 30,
"majesticTF": 9,
"majesticRefIPs": 1184,
"majesticRefSubnets": 969,
"majesticRefEdu": 0,
"majesticRefGov": 0,
"majesticTTF0Name": "News/Newspapers",
"majesticTTF0Value": 9,
"majesticTTF1Name": "Recreation/Travel",
"majesticTTF1Value": 5,
"majesticTTF2Name": "Arts/Literature",
"majesticTTF2Value": 5,
"prettyLinksIn": 504,
"prettyLinksOut": 2114,
"prettyPageCount": 364,
"prettyLinksEdu": 0,
"prettyLinksGov": 0,
"prettyLinksDofollow": 469
}
Code
curl -G https://domdetailer.com/api2/checkDomain.php \ --data-urlencode "apikey=YOUR_KEY" \ --data-urlencode "app=YourApp" \ --data-urlencode "domain=example.com"
import requests r = requests.get( "https://domdetailer.com/api2/checkDomain.php", params={ "apikey": "YOUR_KEY", "app": "YourApp", "domain": "example.com", }, timeout=60, ) r.raise_for_status() data = r.json()
const url = new URL("https://domdetailer.com/api2/checkDomain.php"); Object.entries({ apikey: "YOUR_KEY", app: "YourApp", domain: "example.com", }).forEach(([k, v]) => url.searchParams.set(k, v)); const res = await fetch(url); if (!res.ok) throw new Error(`HTTP ${res.status}`); const data = await res.json();
$qs = http_build_query([
'apikey' => 'YOUR_KEY',
'app' => 'YourApp',
'domain' => 'example.com',
]);
$json = file_get_contents(
'https://domdetailer.com/api2/checkDomain.php?' . $qs
);
$data = json_decode($json, true);
Credit balance
FreeHow many credits remain on the account. Never charged.
GET https://domdetailer.com/api2/checkBalance.php?apikey=YOUR_KEY&app=YourApp
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
apikey |
string | Required | Your account API key. |
app |
string | Required | A short identifier for your integration. |
simple |
boolean | Optional | Return the bare number as text/plain instead of JSON. Convenient for shell scripts. |
Response fields
| Field | Type | Meaning |
|---|---|---|
[0] |
string | The literal string UnitsLeft. |
[1] |
number | Credits remaining. |
What each metric actually tells you, and which combinations catch a manipulated profile, is covered in the field reference.
Example response
[
"UnitsLeft",
92921
]
Code
curl -G https://domdetailer.com/api2/checkBalance.php \ --data-urlencode "apikey=YOUR_KEY" \ --data-urlencode "app=YourApp"
import requests r = requests.get( "https://domdetailer.com/api2/checkBalance.php", params={ "apikey": "YOUR_KEY", "app": "YourApp", }, timeout=60, ) r.raise_for_status() data = r.json()
const url = new URL("https://domdetailer.com/api2/checkBalance.php"); Object.entries({ apikey: "YOUR_KEY", app: "YourApp", }).forEach(([k, v]) => url.searchParams.set(k, v)); const res = await fetch(url); if (!res.ok) throw new Error(`HTTP ${res.status}`); const data = await res.json();
$qs = http_build_query([
'apikey' => 'YOUR_KEY',
'app' => 'YourApp',
]);
$json = file_get_contents(
'https://domdetailer.com/api2/checkBalance.php?' . $qs
);
$data = json_decode($json, true);
Errors
Standard HTTP status codes. The body carries a small JSON object with an
error slug you can branch on and a message written
for whoever is reading the log.
| Status | error | When it happens |
|---|---|---|
| 400 | missing_parameter |
A required parameter is absent, or the domain could not be parsed as a hostname. |
| 401 | invalid_api_key |
The key is missing, malformed, or not attached to an account. |
| 402 | not_enough_credits |
The account has no credits left. Nothing was charged. |
| 404 | account_not_found |
The key or email did not match any account. |
| 429 | rate_limited |
Too many requests. The body carries retry_after in seconds - wait that long rather than retrying immediately. |
| 502 | upstream_error |
A data source failed to respond. Safe to retry after a short pause. |
| 500 | server_error |
Something went wrong on our side. If it persists, tell us what you sent. |
{
"error": "not_enough_credits",
"message": "Not enough credits."
}
Rate limits and concurrency
Requests are rate limited per account. Up to 20 concurrent connections are supported for domain metrics. The backlinks endpoint is considerably heavier, and five is a sensible ceiling there.
Exceeding the limit returns 429 with a retry_after
value in seconds. Honour it — retrying immediately extends the block
rather than clearing it.
Caching results for domains you check repeatedly is the cheapest optimisation available. These metrics move on a timescale of weeks, not minutes.
Migrating from v1
v2 is close enough to v1 that most integrations need only a new path and a few extra fields read. The parameters are unchanged.
- mozLinks
- mozDA
- mozPA
- mozRank
- majesticLinks
- majesticRefDomains
- majesticCF
- majesticTF
- majesticTTF0-2
- prettyLinksIn
- prettyLinksOut
- prettyPageCount
- prettyLinksDofollow
- prettyLinksEdu
- prettyLinksGov
- mozSpam
- majesticRefIPs
- majesticRefSubnets
- FB_shares
- FB_comments
- pinterest_pins
- stumbles
- google_plus_one
Social counters were retired when the networks behind them closed their APIs.
Start at 25,000 lookups for $34.
One balance covers the browser tools, the desktop app and the API. Nothing renews, nothing expires, and you can stop using it for six months without losing anything.