This API provides access to Ahrefs' Domain Rating (DR) and Ahrefs Rank metrics for any valid domain or URL. The Domain Rating is a metric that shows the strength of a website's backlink profile compared to others in the Ahrefs database.
- β‘ Lightning-Fast Performance: Average response time of < 450ms.
- π High Reliability: Processing 30,000+ requests everyday.
- π° Competitive Pricing: Cost-effective access to premium SEO data.
- π‘οΈ Secure & Stable: Enterprise-grade infrastructure.
- π€ Excellent Support: Quick response to queries and issues.
- π Simple Integration: Easy-to-use endpoints with clear documentation.
- π Access to high-quality SEO data and SERP analysis from Ahrefs.
- π Comprehensive backlink information and link building opportunities.
- π Accurate domain metrics and organic traffic estimations.
- π Real-time data updates for competitive intelligence.
- π οΈ Easy integration with your existing SEO tools and workflows.
- π₯οΈ SEO tool developers and content optimization platforms.
- π± Marketing software companies and growth hackers.
- π΅οΈ Digital marketing agencies and online reputation management firms.
- π Data analysts, researchers, and SEO consultants.
- π SaaS platforms focused on SEO, content marketing, and website performance.
Currently, the Ahrefs API offers one powerful endpoint for search engine optimization. This endpoint allows you to retrieve the Domain Rating (DR) and Ahrefs Rank (AR) for a specified domain.
GET https://ahrefs-api.p.rapidapi.com/check-dr-ar
This endpoint provides two essential metrics for SEO analysis:
-
Domain Rating (DR) π
- Measures the strength of a website's backlink profile on a 100-point scale
- Considers the "link juice" transfer and equal distribution among linked domains
- Scaled to a 0-100 range for easy comparison of domain authority
-
Ahrefs Rank (AR) π
- Ranks websites based on the size and quality of their dofollow referring domains
- Lower AR numbers indicate higher-quality backlink profiles and better search rankings
Use this endpoint to assess the authority and backlink strength of any domain, helping you make informed decisions for your SEO strategies, link-building campaigns, and competitor analysis.
Authentication is handled through RapidAPI. Include your RapidAPI key in the request headers:
- x-rapidapi-host: ahrefs-api.p.rapidapi.com
- x-rapidapi-key: your_rapid_api_key
Name | Type | Required | Description |
---|---|---|---|
domain | string | Yes | The domain to check (required) |
curl --request GET \
--url 'https://ahrefs-api.p.rapidapi.com/check-dr-ar?domain=coder.com' \
--header 'x-rapidapi-host: ahrefs-api.p.rapidapi.com' \
--header 'x-rapidapi-key: your_rapid_api_key'
The API returns a JSON object with the following properties:
Property | Type | Description |
---|---|---|
domain | bool | Whether request was successful |
domain | string | The domain that was checked |
domain_rating | integer | Domain Rating (DR) score (0-100) |
ahrefs_rank | integer | Ahrefs Rank (AR) - lower numbers indicate higher rank |
{
"success": bool,
"domain": "string",
"domain_rating": float,
"ahrefs_rank": integer
}
curl --request GET \
--url 'https://ahrefs-api.p.rapidapi.com/check-dr-ar?domain=facebook.com' \
--header 'x-rapidapi-host: ahrefs-api.p.rapidapi.com' \
--header 'x-rapidapi-key: fd3f1114b1msh3d69719929fe501p1f1b72jsn2432d43bd3d1'
{ "success": true, "domain": "facebook.com", "domain_rating": 100, "ahrefs_rank": 1 }
- Domain Rating is domain-based, not URL-based
- Same DR applies to all subdomains and URLs of a domain
- DR values above 4.9 are rounded to the nearest integer by Ahrefs
- The API returns DR as a decimal value for precision
- We're not affiliated with Ahrefs in anyway
Status Code | Error Code | Description |
---|---|---|
400 | INVALID_URL | Invalid domain/URL format |
502 | RELAY_SERVICE_ERROR | Temporary connection issue |
503 | CONNECTION_ERROR | Unable to connect to Ahrefs |
500 | INTERNAL_SERVER_ERROR | Unexpected server error |
{ "success": false, "error": "ERROR_CODE", "details": "Error description message" }
This endpoint provides a quick way to assess the authority and popularity of a domain in the eyes of Ahrefs π. Use it to compare websites, evaluate link prospects, or track your own domain's progress over time!