Ahrefs API by the Call: Domain Rating, Backlinks, Paid Pages
We pulled our own backlink profile through the Ahrefs API: ten referring domains, all DR 91 or higher, six dofollow links out of thirty-three.

Copy this line to your agent to pull a domain's rating and referring domains.
set up https://monid.ai/SKILL.md and use ahrefs /site-explorer/domain-rating and /site-explorer/refdomains for a domain
On 2026-09-15 we pointed the Ahrefs API at our own domain. Domain Rating 53. Ten referring domains, every one rated 91 or higher. Six dofollow links out of thirty-three. The other twenty-seven, from the most authoritative sites on the list, pass nothing. That last column is the one a subscription dashboard buries and a per-call response puts in front of you. This guide runs through Monid, the OpenRouter for agent tools.
What does the Ahrefs API return for a domain?
Typed rows from Ahrefs' Site Explorer, one report per endpoint, and the two we measured cover authority and who confers it.
Domain Rating
ahrefs/site-explorer/domain-rating for monid.ai, provider date 2026-09-14:
{ "type": "domain_rating", "data": { "domain_rating": 53, "ahrefs_rank": 550271 } }
And for a large competitor on the same day, apify.com: domain_rating 81, ahrefs_rank 11,332.
Two fields. DR is Ahrefs' 0-to-100 link authority score, logarithmic, so the gap from 53 to 81 is much larger than the arithmetic suggests. Ahrefs Rank is the domain's position among every domain Ahrefs tracks, ordered by DR, so 550,271 against 11,332 is the same gap expressed as a queue position.
Referring domains
ahrefs/site-explorer/refdomains for monid.ai, top ten by DR:
| Domain | DR | Links | Dofollow | First seen |
|---|---|---|---|---|
| youtube.com | 99 | 4 | 0 | 2026-09-09 |
| github.com | 97 | 8 | 0 | 2026-06-09 |
| substack.com | 94 | 2 | 2 | 2026-09-12 |
| arxiv.org | 93 | 1 | 1 | 2026-09-07 |
| producthunt.com | 91 | 5 | 0 | 2026-04-23 |
| pypi.org | 91 | 1 | 0 | 2026-09-10 |
| beehiiv.com | 91 | 3 | 3 | 2026-04-26 |
| luma.com | 91 | 6 | 0 | 2026-06-18 |
| dexscreener.com | 91 | 2 | 0 | 2026-04-21 |
| crunchbase.com | 91 | 1 | 0 | 2026-09-08 |
Five columns per row: domain, domain_rating, links_to_target, dofollow_links, first_seen. A last_seen field exists and was null on every row, which on Ahrefs' schema means the link is still live.
The row shape is the product
A subscription shows you this as a sortable table in a browser. The API shows it to you as ten JSON rows you can join to anything. The information is the same; what changes is that dofollow_links is a column you can filter on rather than a toggle you have to remember to click, and the next two sections are about why that column is the one that matters.
How do you call the Ahrefs API without an Ahrefs subscription?
Through a provider that resells the Site Explorer reports per row, which is what these endpoints are. You need one key, and you pay for the rows you receive.
For agents
Grab an API key at app.monid.ai, then paste this to your agent and hand it the key:
set up https://monid.ai/SKILL.md
It learns the whole discover, inspect, run workflow itself. More in the agent quickstart.
For humans
npm install -g @monid-ai/cli
monid keys add -k <your-api-key> -l main
Step 1. Get the authority score
What it does. Returns DR and Ahrefs Rank for a domain or URL.
The endpoints. ahrefs/site-explorer/domain-rating, billed per result, requires target and date.
The call.
monid run -p ahrefs -e /site-explorer/domain-rating \
--query '{"target": "monid.ai", "date": "2026-09-14"}'
date is required and must not be in the future relative to the provider. The next section is about what happens when it is.
What comes back. domain_rating and ahrefs_rank.
What it costs. A fraction of a cent for the one row, and an empty result is free. Current figures at monid.ai/tools.
Step 2. List who links to you
What it does. Returns referring domains with their authority and whether they pass it.
The endpoints. ahrefs/site-explorer/refdomains, per result, requires target, takes mode, limit, order_by, where.
The call.
monid run -p ahrefs -e /site-explorer/refdomains \
--query '{"target": "monid.ai", "mode": "domain", "limit": 10, "order_by": "domain_rating:desc"}'
limit is the cost control on a per-result endpoint: ten rows cost ten rows. Do not pass date here; this endpoint does not accept it.
What comes back. The table above.
What it costs. A few cents per row. Ten rows is pocket change; a thousand is a decision.
Step 3. Filter for the links that count
What it does. Turns a DR-sorted list into an equity-sorted one.
The call. Add a where filter so you pay only for rows that pass authority:
monid run -p ahrefs -e /site-explorer/refdomains \
--query '{"target": "monid.ai", "mode": "domain", "limit": 50, "order_by": "domain_rating:desc", "where": "{\"field\":\"dofollow_links\",\"is\":[\"gt\",0]}"}'
On our unfiltered ten, this would have returned three rows instead of ten and cost a third as much. On a per-result endpoint, the filter is not a convenience; it is the budget.
Give this to your agent![]()
Set up https://monid.ai/SKILL.md, and then use Monid to pull the top 50 referring domains for my site, keep only the ones with at least one dofollow link, and tell me how much authority I am actually receiving versus how much it looks like I have.📖 See also Find All URLs on a Domain: Why the Sitemap Route Usually Stops
Which of your backlinks actually pass authority?
The ones with dofollow_links above zero, and on our own domain that was three of the top ten.
What the sorted list showed
Sorted by DR, our backlink profile looks excellent: YouTube, GitHub, Product Hunt, PyPI, Crunchbase, Luma, all in the nineties. Sorted by what those links do, it looks like this:
passing authority substack.com (2), beehiiv.com (3), arxiv.org (1) 6 links
passing nothing youtube.com, github.com, producthunt.com, pypi.org,
luma.com, dexscreener.com, crunchbase.com 27 links
Twenty-seven of thirty-three links, from seven of the ten most authoritative domains, are nofollow. Every one of those seven is a platform where users post content: video descriptions, repository READMEs, product listings, package pages, event pages, company profiles. Platforms nofollow user-submitted links as a matter of policy, and they have done so for years.
Why this is the normal shape
Any young technical product accumulates exactly this profile first. You ship on GitHub, launch on Product Hunt, publish a package, post a video, get listed on Crunchbase. Each one is a real link from a DR 90+ domain and each one is nofollow by design. The profile that results is high on paper and passes almost nothing.
The three that do pass are a newsletter, a Substack and a paper on arXiv. Editorial placements, written by people, on platforms that allow followed links. That is the shape of a backlink that helps, and it is the shape the backlink outreach work exists to earn more of.
The rule this produces
Sort by dofollow_links, not by domain_rating. DR tells you how impressive a referring domain is. dofollow_links tells you whether it is doing anything for you. A backlink report that leads with DR is optimised to make the profile look good, and the API gives you both columns so you can lead with the honest one.
Why does the date parameter fail on some Ahrefs endpoints?
Because the sibling endpoints disagree about it, and because "today" is not the same day everywhere.
What happened
We called domain-rating with date: "2026-09-15", which was the date on our clock. The provider returned HTTP 400 with the body {"error": "bad 'date'"}. We changed it to 2026-09-14 and got a 200. The provider's clock had not reached the fifteenth.
We then called refdomains with a date parameter, since the schema for its sibling had required one. HTTP 400, Unrecognized key: "date". That endpoint does not take a date at all.
What this tells you
Required on one, rejected on the other. domain-rating is a point-in-time metric and needs to know which point; refdomains is a current-state list and does not. Same provider, same report family, different parameter sets, and the only way to know is to read each schema rather than assuming the family shares one. This is the same pattern as three sibling Crunchbase endpoints taking three identifiers.
"Today" fails ahead of UTC. If your pipeline runs in a timezone ahead of the provider and stamps date with its local date, it will 400 for a few hours every day. Use yesterday's date, or compute the date in UTC, and the failure disappears.
The 400 was free and it named the problem. Neither bad call was billed, and both error bodies said exactly what was wrong. That is the good kind of failure, and it is worth contrasting with an endpoint that accepts a bad parameter and returns an empty set, which we have measured elsewhere in a wrong enum returns zero.
Which endpoint should I use for which job?
| Endpoint | What it does | Input | Output | Best for | Billing |
|---|---|---|---|---|---|
ahrefs/site-explorer/domain-rating | Authority score | target, date | DR and Ahrefs Rank | Qualifying a domain in one row | Per result |
ahrefs/site-explorer/domain-rating-history | DR over time | target, date range | One row per period | Trend, not snapshot | Per result |
ahrefs/site-explorer/refdomains | Who links to a target | target, limit, where | Domain, DR, links, dofollow, first seen | Backlink audit | Per result |
ahrefs/site-explorer/anchors | Backlinks by anchor text | target, limit | Anchor, count, DR | Anchor profile and over-optimisation checks | Per result |
ahrefs/site-explorer/paid-pages | Landing pages a domain buys traffic to | target, date | URL, traffic, top keyword, creative count | Paid-search intelligence | Per result |
Every row was verified with monid inspect on 2026-09-15. The table gives billing shape rather than figures, because shape drives design and current numbers live on monid.ai/tools.
Every one bills per result and every one's notes say an empty result is free. That combination makes limit and where the entire cost model: you pay for rows you receive, so ask for the rows you need. The last row is the one we measured a week earlier in the Google Ads prospecting guide, where one landing page carried 1,537 ad creatives.
When is per-call Ahrefs the wrong purchase?
Four cases.
You run a daily rank tracker across hundreds of keywords. That is a steady, predictable volume, and steady volume is what a subscription prices well. Per-call is for bursty and occasional use; a nightly job over a large keyword set is neither. The structured-search route for that job is compared in automating SERP tracking.
You want the UI. Ahrefs' dashboards, alerts, content explorer and keyword tools are the product most of its customers pay for. These endpoints expose the Site Explorer reports as rows, not the workspace around them.
You need the full backlink index, not a report. refdomains at any limit is a page of a report. For a complete crawl of every link to a large domain, the volume alone argues for a direct contract.
You are sorting by DR and calling it an audit. Not a purchase mistake but a reading one, and the most common: seven of our top ten referring domains passed nothing, and a DR-sorted view would have hidden that. Filter on dofollow_links first.
And the disclosure: this is Monid's blog and we resell these endpoints. The central measurement here is that our own backlink profile is mostly nofollow, which is not the thing you publish to look good, and the recommendation is to use the where filter so you buy fewer rows.
Conclusion
The Ahrefs API, called per row through one key, returned our Domain Rating in one call and our top referring domains in another, and the second call told us something the first could not: that most of our authority is nofollow. Ten domains rated 91 and above, six dofollow links out of thirty-three, and the three that pass equity are a newsletter, a Substack and an arXiv paper rather than the platforms with the big numbers.
What matters more than the score is the column you sort by. domain_rating ranks your backlinks by how they look. dofollow_links ranks them by what they do. A per-result endpoint with a where filter lets you pay only for the second kind, and a date parameter that is required on one sibling and rejected on another is a reminder to read every schema rather than assuming the family shares one.
Free next step: run monid inspect -p ahrefs -e /site-explorer/refdomains, then pull your own top ten and count the dofollow column. It costs a few cents and it is the most honest backlink audit you will get this week. Start at monid.ai.
FAQ
Where is the Ahrefs API documentation for these endpoints?
Two places, and they answer different questions. Ahrefs publishes its own API documentation for direct subscribers, which covers every report and the filter syntax the where parameter uses. For the per-call versions here, monid inspect on any endpoint prints the exact parameters, the required ones, the enum values and the billing notes as they apply through Monid, which is the version that matches what you will actually send. Read Ahrefs' docs for the filter expressions and inspect for everything else.
Can I use the Ahrefs API from Python?
Yes, and from anything else. The endpoints are plain HTTP behind one key, so a Python script calls them the same way it calls any JSON API, and the Monid CLI works from any language's subprocess. There is no Ahrefs-specific client to install. The one thing to carry over from this article is the date handling: compute it in UTC or use yesterday, or the domain-rating call will fail for part of every day in any timezone ahead of the provider.
What is the difference between Domain Rating and Ahrefs Rank?
Domain Rating is a 0-to-100 score of a domain's backlink authority, logarithmic, so each step up is harder than the last and 53 to 81 is a very large gap. Ahrefs Rank is where that DR places the domain in the ordered list of every domain Ahrefs tracks, so a lower number is better and 11,332 against 550,271 is the same gap as a queue position. Use DR to compare two domains; use Ahrefs Rank to see how far from the top either one is.
How often does Domain Rating update?
Continuously on Ahrefs' side, as its crawler finds and loses links, and the date parameter on the domain-rating endpoint is what lets you pin a reading to a day. For a trend rather than a snapshot, domain-rating-history returns one row per period so you can see the direction without polling. Week-to-week movement of a point or two is normal; what matters for a young domain is whether followed links are being added, which is the refdomains report, not the score.
Last updated September 2026.


