Ahrefs is switching its Domain Rating to a new model, DR4, on 1 December 2026. Until then the old score (DR3) is still the default. If you track a few domains, now is a good moment to record both.
Here is what I learned wiring this into a small tool.
One endpoint, one parameter
Ahrefs has a free Domain Rating endpoint. According to their DR4 announcement , it returns DR3 by default and DR4 when you add version=dr4 :
GET https://api.ahrefs.com/v3/public/domain-rating-free?target = example . com & output = json GET https://api.ahrefs.com/v3/public/domain-rating-free?target = example . com & output = json & version = dr4
Enter fullscreen mode
Exit fullscreen mode
It needs an Ahrefs API token in the Authorization: Bearer ... header. Check Ahrefs' API docs for how to get one.
The rating sits at domain_rating.domain_rating in the JSON.
A tiny script for up to 10 domains
const TOKEN = process . env .…