Ahrefs
SEO toolset for backlink analysis, keyword research, and competitive research.
Ahrefs
SEO toolset for backlink analysis, keyword research, and competitive research.
Capabilities
| Integration | Available | Notes |
|---|---|---|
| API | ✓ | REST API for Site Explorer, Keywords Explorer |
| MCP | ✓ | Official remote server at https://api.ahrefs.com/mcp (docs); the older local npm server is archived, checked 2026-10-27 |
| CLI | - | Not available |
| SDK | - | API-only |
Authentication
- Type: API Token
- Header:
Authorization: Bearer {api_token} - Get token: Account Settings > API in Ahrefs dashboard
Common Agent Operations
Domain rating
GET https://api.ahrefs.com/v3/site-explorer/domain-rating?target=example.com&date=2026-09-30
Authorization: Bearer {api_token}Backlinks overview
GET https://api.ahrefs.com/v3/site-explorer/backlinks-stats?target=example.com&mode=domain
Authorization: Bearer {api_token}Referring domains
GET https://api.ahrefs.com/v3/site-explorer/refdomains?target=example.com&mode=domain&limit=100&select=domain,domain_rating,links_to_target
Authorization: Bearer {api_token}Backlinks list
GET https://api.ahrefs.com/v3/site-explorer/all-backlinks?target=example.com&mode=domain&limit=100&select=url_from,url_to,anchor,is_dofollow
Authorization: Bearer {api_token}Organic keywords
GET https://api.ahrefs.com/v3/site-explorer/organic-keywords?target=example.com&mode=domain&country=us&limit=100&date=2026-09-30&select=keyword
Authorization: Bearer {api_token}Top pages
GET https://api.ahrefs.com/v3/site-explorer/top-pages?target=example.com&mode=domain&country=us&limit=50&date=2026-09-30&select=url
Authorization: Bearer {api_token}Keyword overview
GET https://api.ahrefs.com/v3/keywords-explorer/overview?keywords=keyword1,keyword2&country=us
Authorization: Bearer {api_token}Keyword suggestions
GET https://api.ahrefs.com/v3/keywords-explorer/matching-terms?keyword=seed+keyword&country=us&limit=100
Authorization: Bearer {api_token}SERP overview
GET https://api.ahrefs.com/v3/keywords-explorer/serp-overview?keyword=target+keyword&country=us
Authorization: Bearer {api_token}Key Metrics
Domain Metrics
domain_rating- Domain Rating (DR)ahrefs_rank- Ahrefs Rankreferring_domains- Referring domains countbacklinks- Total backlinksorganic_traffic- Estimated organic traffic
Keyword Metrics
volume- Monthly search volumekeyword_difficulty- KD score (0-100)cpc- Cost per clickclicks- Estimated monthly clicksglobal_volume- Global search volume
Backlink Fields
url_from- Source URLurl_to- Target URLanchor- Anchor textdomain_rating_source- Source DRfirst_seen- First discovery date
Modes
domain- Entire domainsubdomains- Domain + subdomainsprefix- URL prefixexact- Exact URL
When to Use
- Backlink analysis
- Link building research
- Keyword research
- Competitive analysis
- Content gap analysis
- Site audits
Rate Limits
- Varies by plan
- 500-5000 rows per request
Relevant Skills
- seo-audit
- content-strategy
- competitors
Dated reports in the CLI
domain-rating get, keywords organic, and top-pages list accept an explicit --date YYYY-MM-DD, defaulting to today's UTC date when omitted. Organic keywords and top pages supply default columns; --select overrides them. The CLI validates calendar dates and rejects empty column lists before a request. Choose fields from the provider response schema:
Backlink report columns
backlinks list calls all-backlinks and defaults to url_from,url_to,anchor,is_dofollow. refdomains list defaults to domain,domain_rating,links_to_target. Both APIs require select; use --select to choose other columns. These defaults omit columns marked with additional unit costs in the schemas. Requests still consume API units.
Source: https://github.com/coreyhaines31/marketingskills/blob/main/tools/integrations/ahrefs.md
Author: coreyhaines31, Marketing skills. License: MIT.
Shown here with formatting for the web. Keep the author and license notice when you reuse it.
Related entries
There are more like this in the members library
The Codex library holds 7,009 entries. Members can search all of them by meaning and read every one in full.