# Ahrefs

## Tools Used

### site-explorer-all-backlinks
- **Purpose**: Get all backlinks for a target domain
- **Parameters**: target, mode (domain/prefix/url), limit, order_by
- **Returns**: List of backlinks with source URL, domain, DR, anchor, dofollow status

### site-explorer-backlinks-stats
- **Purpose**: Backlink statistics overview
- **Parameters**: target, mode
- **Returns**: Total backlinks, referring domains, dofollow/nofollow counts

### site-explorer-referring-domains
- **Purpose**: List all referring domains
- **Parameters**: target, mode, limit, order_by
- **Returns**: Domains with DR, backlinks count, traffic, country

### site-explorer-anchors
- **Purpose**: Anchor text distribution
- **Parameters**: target, mode, limit, order_by
- **Returns**: Anchor texts with backlink and referring domain counts

### site-explorer-broken-backlinks
- **Purpose**: Find broken backlinks for recovery
- **Parameters**: target, mode, limit, order_by
- **Returns**: Broken links with source, target URL, HTTP code, DR

### site-explorer-domain-rating
- **Purpose**: Get Domain Rating for a target
- **Parameters**: target
- **Returns**: Domain Rating value and Ahrefs rank

### site-explorer-domain-rating-history
- **Purpose**: DR trend over time
- **Parameters**: target, date_from
- **Returns**: Historical DR data points

### site-explorer-refdomains-history
- **Purpose**: Referring domains trend over time
- **Parameters**: target, mode, date_from
- **Returns**: Historical referring domain counts

### site-explorer-linked-domains
- **Purpose**: Domains linked from the target
- **Parameters**: target, mode, limit
- **Returns**: Outgoing linked domains with counts

## Configuration

- Ahrefs MCP tools are available via `mcp__ahrefs__*` prefix
- No API key needed when using MCP (handled by tool server)
- Rate limits: Follow Ahrefs plan limits (typically 500 rows/request)

## Examples

```
# Get backlink stats
mcp__ahrefs__site-explorer-backlinks-stats(target="example.com", mode="domain")

# Get referring domains sorted by DR
mcp__ahrefs__site-explorer-referring-domains(target="example.com", mode="domain", limit=500, order_by="domain_rating:desc")

# Get anchor text distribution
mcp__ahrefs__site-explorer-anchors(target="example.com", mode="domain", limit=200)

# Find broken backlinks
mcp__ahrefs__site-explorer-broken-backlinks(target="example.com", mode="domain", limit=100)
```
