DomDetailer API v2
API v2 returns more of the highly requested stats for the same single-credit cost and now includes DomDetailer Pretty metrics.
- All v1 Moz & Majestic metrics remain.
- Added DomDetailer Pretty stats (links in/out, page count, dofollow/nofollow split, ref domains, EDU/GOV counts).
- 1 credit returns all relevant data points.
- Cleaner JSON; social metrics are not part of v2.
Endpoints
GET /api/v2/balance?apikey=YOUR_KEY&app=YourApp
Returns JSON with remaining credits. Does not consume credits.
GET /api/v2/domain?apikey=YOUR_KEY&app=YourApp&domain=example.com&majesticChoice=root
Returns Moz, Majestic and Pretty summary metrics for a single domain.
Note: Replace the base with your environment (e.g., https://your-website-link-here.com
during staging, https://domdetailer.com
on production).
Parameters
apikey
(required) — Your account API key.app
(required) — Identifier for your application.domain
(required for Check Domain) — Target domain.majesticChoice
(optional) —root
(default),url
,subdomain
, orasis
.
Example response (v2)
{ "domain":"nojumper.com", "mozLinks":16009, "mozPA":42, "mozDA":34, "mozRank":4, "mozTrust":3, "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 examples
// curl curl -G https://your-website-link-here.com/api/v2/domain \ --data-urlencode "apikey=YOUR_KEY" \ --data-urlencode "app=YourApp" \ --data-urlencode "domain=example.com" \ --data-urlencode "majesticChoice=root"
// PHP $qs = http_build_query([ 'apikey' => 'YOUR_KEY', 'app' => 'YourApp', 'domain' => 'example.com', 'majesticChoice' => 'root' ]); $resp = file_get_contents('https://your-website-link-here.com/api/v2/domain?'.$qs); $data = json_decode($resp, true);
// Python (requests) import requests params = dict(apikey='YOUR_KEY', app='YourApp', domain='example.com', majesticChoice='root') r = requests.get('https://your-website-link-here.com/api/v2/domain', params=params) data = r.json()
// Node.js (fetch) const u = new URL('https://your-website-link-here.com/api/v2/domain'); Object.entries({apikey:'YOUR_KEY',app:'YourApp',domain:'example.com',majesticChoice:'root'}) .forEach(([k,v]) => u.searchParams.set(k,v)); const res = await fetch(u); const data = await res.json();
// Balance (any language) GET https://your-website-link-here.com/api/v2/balance?apikey=YOUR_KEY&app=YourApp // → { "credits_remaining": 123456 }
Response schema (summary)
{ "domain": string, // Moz "mozLinks": number, "mozPA": number, "mozDA": number, "mozRank": number, "mozTrust": number, // Majestic "majesticStatReturned": string, "majesticLinks": number, "majesticRefDomains": number, "majesticCF": number, "majesticTF": number, "majesticRefIPs": number, "majesticRefSubnets": number, "majesticRefEdu": number, "majesticRefGov": number, "majesticTTF0Name": string, "majesticTTF0Value": number, "majesticTTF1Name": string, "majesticTTF1Value": number, "majesticTTF2Name": string, "majesticTTF2Value": number, // Pretty "prettyLinksIn": number, "prettyLinksOut": number, "prettyPageCount": number, "prettyLinksEdu": number, "prettyLinksGov": number, "prettyLinksDofollow": number }
Errors
API v2 uses standard HTTP status codes. The body returns a small JSON object describing the error.
HTTP/1.1 400 Bad Request {"error":"missing_parameter","message":"domain is required"}
HTTP/1.1 401 Unauthorized {"error":"invalid_api_key","message":"API key not found or inactive"}
- 400 — invalid or missing parameter
- 401 — API key missing/invalid
- 402 — out of credits
- 429 — too many requests
- 5xx — transient server error
Prefer a UI? Use the online forms (same v2 data under the hood): Backlinks Tool · Domain Stats Tool.
Migrating from v1
Most v1 fields carry over to v2 unchanged. Social counters are deprecated. v2 adds new Pretty metrics and some additional Majestic fields. Here’s a quick map:
mozLinks
,mozDA
,mozPA
,mozRank
majesticLinks
,majesticRefDomains
,majesticCF
,majesticTF
majesticTTF0Name/Value
,majesticTTF1Name/Value
,majesticTTF2Name/Value
majesticStatReturned
(echoes selection)
prettyPageCount
,prettyLinksIn
,prettyLinksOut
prettyLinksDofollow
,prettyLinksEdu
,prettyLinksGov
majesticRefIPs
,majesticRefSubnets
,majesticRefEdu
,majesticRefGov
FB_shares
,FB_comments
,pinterest_pins
and other social counters.
app
, apikey
, and a domain
parameter in v1, you can generally keep the same pattern for v2. Update your parser to read the new Pretty keys, and drop references to social counters. If your integration needs the backlinks list, call the Backlinks API alongside v2.