← Back to Journal
· 4 min read

Free Domain Rating Checks in Python: Ahrefs' DR API Without a $99/mo Subscription

Domain Rating is the one SEO metric everyone wants and almost nobody wants to pay $99+/month for. It turns out Ahrefs runs a free public DR endpoint — you just need a free API key and a thin wrapper. This post shows the exact CLI setup, a real 8-domain batch run, and the uncomfortable example that proves DR measures links, not quality (example.com scores 94). Plus where DR belongs in your pipeline and where it actively misleads.

TL;DR

TL;DR — Ahrefs exposes a free domain-rating-free APIv3 endpoint that returns DR 0-100 for any domain, no paid plan required (free API key, generous limits). The zens-ink CLI wraps it into one command: python3 -m zens_ink.domain_rating a.com b.com --json, with URL normalization, a local JSON cache, and CSV export. I ran it against 8 well-known SEO tool domains: the vendor pattern is exactly what you'd expect (Semrush 92, Ahrefs 91, Backlinko 90 — these people link-bait for a living), and the trap case is example.com at DR 94, higher than nearly every real business on earth. DR measures the strength of a domain's backlink graph and nothing else. Use it for triage and monitoring; never use it to predict whether you can rank — that's a SERP-structure question.

Every SEO pipeline eventually wants the same number: how strong is this domain? Not “how good is the content,” not “how much traffic does it get” — just a single authority score you can sort a list by. The industry default is Ahrefs’ Domain Rating, and the industry default way to get it is a $99+/month subscription.

That’s a strange state of affairs, because Ahrefs also runs a free public DR endpoint. It’s buried in their APIv3 docs, returns exactly one field, and costs nothing beyond a free API key. Almost nobody uses it, because the docs show you a raw curl call and stop there.

So here’s the rest: a one-command wrapper, real output, and the test cases that teach you what DR does and doesn’t mean.

The setup

The wrapper lives in zens-ink, a zero-dependency Python package (stdlib only — no requests, no pandas):

pip install zens-ink
export AHREFS_API_KEY=your_free_api_v3_key

That’s the whole setup. The key comes from Ahrefs’ API dashboard; the free tier is enough for script-scale use. One license detail that matters: Ahrefs’ Domain Rating License requires attribution, so the tool prints and exports the credit line Domain Rating by Ahrefs — keep it in anything you publish.

One domain, one command

$ python3 -m zens_ink.domain_rating example.com
{
  "data": [
    {
      "target": "example.com",
      "domain_rating": 94.0,
      "cached": false,
      "error": null
    }
  ],
  "attribution": "Domain Rating by Ahrefs (https://ahrefs.com/)"
}

Stop and look at that number. example.com — a page of placeholder text, updated roughly never, zero content strategy — out-ranks on authority almost every actual business on the internet. It scores 94 because millions of documentation pages, RFCs, and tutorials link to it as the canonical example domain.

This is the single most important thing to understand about DR: it measures the backlink graph and nothing else. Not quality, not traffic, not relevance. A high DR means “many reasonably strong domains link here.” That’s it. The metric works exactly as designed — the design is just narrower than people assume.

A real batch: SEO vendors and everyone else

Here’s a fresh 8-domain run against the sites whose entire business is ranking for SEO keywords, plus two of ours:

$ python3 -m zens_ink.domain_rating \
    ahrefs.com semrush.com backlinko.com mangools.com \
    spyfu.com seranking.com zens.ink uzenlabs.com
  Domain Rating | 8 target(s) | Data: Domain Rating by Ahrefs (https://ahrefs.com/)

  [1/8] ahrefs.com                               DR 91 (cache)
  [2/8] semrush.com                              DR 92
  [3/8] backlinko.com                            DR 90
  [4/8] mangools.com                             DR 82
  [5/8] zens.ink                                 DR 10 (cache)
  [6/8] uzenlabs.com                             DR 33
  [7/8] spyfu.com                                DR 80
  [8/8] seranking.com                            DR 85

  ── 8/8 resolved | avg DR 70.4 | strongest: semrush.com (DR 92)

Three observations worth more than the numbers themselves:

1. Vendors cluster at 80-92 because link acquisition is their product. Every one of these companies publishes data studies, free tools, and roundups specifically engineered to accumulate links. Their DR is a marketing spend line, not an accident.

2. DR 10 and DR 33 are both viable operating positions. This journal runs on zens.ink (DR 10) and holds the #1 Google position for its own brand term — the number that matters for a young site, since brand searches are usually the first rankings a new domain wins. The lab hub one level up, uzenlabs.com, sits at 33. Neither number blocked anything — because, as covered in SERP analysis vs Domain Rating, rankings are decided per-query, by what’s actually on the SERP, not by domain-level authority averages.

3. The gap between 10 and 33 is the cost of “nobody links to tools.” Tool pages don’t get cited. Content pages do. If you want DR to move, the levers are the classic ones — original data, free utilities people reference, GitHub READMEs — not more tool features.

Batch modes for pipeline work

The wrapper accepts domains as args, from a file, or piped on stdin, and exports CSV for spreadsheet people:

# file of domains, one per line
python3 -m zens_ink.domain_rating --file serp_domains.txt --csv dr.csv

# pipe: rank tracker output -> DR enrichment
cat competing_domains.txt | python3 -m zens_ink.domain_rating --json

Input normalization is handled: https://www.example.com/page?x=1 becomes example.com before the API call, so messy SERP-scraped URLs work as-is. Results cache to a local dr-cache.json — repeat lookups are free and instant, which is also the polite way to treat a free endpoint. --no-cache forces a fresh call when you’re re-checking something that might have moved.

Where DR belongs in your pipeline — and where it lies

The failure mode isn’t the metric; it’s using DR as a ranking-difficulty oracle. “This SERP has DR-80 domains, therefore I can’t compete” is wrong often enough to be expensive — a DR-90 domain’s forum thread or thin tag page loses to a genuinely relevant DR-10 page all the time.

The split that works:

  • DR is for triage and monitoring. Sort a 500-domain competitor export by DR to find the heavyweights. Track your own DR and your top competitors’ quarterly. Screen guest-post or outreach targets for obvious authority. One number, cheap, good enough for sorting.
  • SERP structure is for deciding what to attack. Page types, homepage-vs-inner-page ratio, brand fingerprints, how many slots are actually contestable — the four-layer difficulty model covers the full method, and deliberately doesn’t lean on DR, which would require a $99/mo data plan to do properly anyway.

The two layers compose: DR tells you which domains are heavy; SERP structure tells you whether the heavy domains are actually in the fight. When a DR-20 page of a DR-90 domain ranks #1, SERP analysis flags it as beatable while DR-only logic calls it a fortress. That single distinction is most of the value of running both.

If you’re building this out, the open-source SEO tools overview maps where DR fits alongside keyword research, volume data, and site audits — and the backlink analysis guide covers what to do when you need the actual link graph, not just the score.


Domain Rating data in this post: Domain Rating by Ahrefs (https://ahrefs.com/), retrieved September 2, 2026 via the free public API.

FAQ

Is there a free way to check Ahrefs Domain Rating in bulk?

Yes. Ahrefs operates a free public endpoint (v3/public/domain-rating-free) that returns DR for any domain or URL. You need a free Ahrefs APIv3 key, then a thin wrapper handles the rest. The zens-ink CLI (pip install zens-ink) exposes it as python3 -m zens_ink.domain_rating with multi-domain args, --file/--csv batch modes, stdin piping, JSON output, and a local dr-cache.json so repeat lookups cost nothing. Ahrefs' DR License requires attribution, so keep the 'Domain Rating by Ahrefs' credit in any output you publish.

What does Domain Rating actually measure?

One thing: the strength of the backlink graph pointing at a domain, on a 0-100 logarithmic-ish scale. Domains get high DR when many reasonably strong domains link to them. DR says nothing about content quality, traffic, or topical relevance — example.com scores DR 94 purely because half the internet's documentation and specs link to it as a placeholder, while plenty of profitable niche sites sit at DR 10-20.

Can a low-DR site still rank on Google?

Yes, routinely — on queries where the SERP itself is weak. That's the core argument of SERP-structure difficulty scoring: instead of asking 'how strong are the ranking domains,' ask 'what kinds of pages rank here and how strong are those specific pages.' A DR-10 site beats DR-90 domains whenever the query is niche enough that only forum threads and thin pages compete. DR tells you about the domain; the SERP tells you about the fight.

How is this different from the paid Ahrefs API?

The free endpoint returns exactly one field (domain_rating) for one target per call. The paid API adds refdomains, backlinks, anchors, organic keywords, traffic estimates — the full index. For scripts that just need an authority number for triage, screening, or monitoring, the free endpoint covers it. When you need the actual link graph, that's what the paid tiers (or Ahrefs Webmaster Tools for your own verified sites) are for.

Want to run this analysis on your own site?

ZensInk Pro automates this pipeline. One command, from seed keywords to content plan.

Get Pro →