> This page is for Agent Handler.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.merge.dev/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.merge.dev/_mcp/server.

# Ahrefs

**Authentication:** API key. See [Magic Link](/merge-agent-handler/features/magic-link) for the runtime auth flow.

## Sample use cases

* Audit our domain and list keywords ranked between positions 4 and 10 - those are the ones to push up.
* Compare our backlink profile against our top three competitors and surface gaps.
* Pull the top 50 referring domains gained this month and rank them by domain rating.

## Available Tools

#### list\_backlinks

List backlinks pointing to a target. Returns source URL, anchor text, domain rating, and more. Paginated with offset....

#### list\_refdomains

List referring domains linking to a target. Shows domain rating, backlink count, and first/last seen dates. Paginated...

#### list\_anchors

List anchor text distribution for backlinks to a target. Shows anchor text, backlink count, and referring domains. Pa...

#### list\_broken\_backlinks

List broken backlinks pointing to a target (links returning 4xx/5xx). Shows source URL, anchor, and HTTP status. Pagi...

#### batch\_analyze

Analyze up to 100 domains/URLs in a single request. Returns domain rating, backlinks, traffic, and more for each targ...

#### get\_domain\_rating\_history

Get Domain Rating trend over time for a target. Returns date and DR value pairs. Requires target and date\_from. Optio...

#### get\_refdomains\_history

Get referring domains count trend over time for a target. Returns date and count pairs. Requires target and date\_from...

#### list\_organic\_keywords

List organic keywords a target ranks for. Shows position, volume, traffic, difficulty, and URL. Requires target and d...

#### list\_top\_pages

List top pages by organic traffic for a target. Shows URL, traffic, keyword count, and top keyword. Requires target a...

#### list\_organic\_competitors

List organic search competitors for a target. Shows competitor domain, common keywords, traffic, and domain rating. R...

#### get\_keyword\_overview

Get keyword metrics: search volume, difficulty, CPC, clicks, and traffic potential. Pass comma-separated keywords and...

#### list\_matching\_terms

Find keyword variations matching seed keywords. Shows volume, difficulty, CPC, and traffic potential. Requires keywor...

#### list\_related\_terms

Find related keywords that top-ranking pages also rank for. Shows volume, difficulty, and traffic potential. Requires...

#### list\_search\_suggestions

Get Google search autocomplete suggestions for seed keywords. Shows volume, difficulty, and CPC. Requires keywords an...

#### get\_volume\_history

Get monthly search volume history for a keyword over time. Requires keyword and country code. Optionally specify date...

#### list\_projects

List Ahrefs projects. Free endpoint (0 API units). Optionally filter by owner email or access type.

#### create\_project

Create a new Ahrefs project for a domain. Free endpoint (0 API units). Requires target URL.

#### list\_project\_keywords

List tracked keywords for an Ahrefs project. Free endpoint (0 API units). Use list\_projects to find project IDs.

#### add\_project\_keywords

Add keywords to track in an Ahrefs project. Free endpoint (0 API units). Use list\_projects to find project IDs.

#### remove\_project\_keywords

Remove keywords from an Ahrefs project. Free endpoint (0 API units). Use list\_project\_keywords to see current keywords.

#### list\_project\_competitors

List competitors for an Ahrefs project. Free endpoint (0 API units). Use list\_projects to find project IDs.

#### add\_project\_competitors

Add competitors to an Ahrefs project. Free endpoint (0 API units). Each competitor needs url, mode, and protocol.

#### remove\_project\_competitors

Remove competitors from an Ahrefs project. Free endpoint (0 API units). Use list\_project\_competitors to see current c...

#### list\_keyword\_list\_keywords

List keywords in a keyword list. Free endpoint (0 API units). Requires keyword\_list\_id.

#### add\_keyword\_list\_keywords

Add keywords to a keyword list. Free endpoint (0 API units). Requires keyword\_list\_id and keywords array.

#### remove\_keyword\_list\_keywords

Remove keywords from a keyword list. Free endpoint (0 API units). Use list\_keyword\_list\_keywords to see current keywo...

#### get\_domain\_rating

Get Domain Rating (DR) for a domain, showing backlink profile strength on a 0-100 scale. Requires target domain and d...

#### get\_backlinks\_stats

Get backlink statistics for a target: live backlinks, all-time backlinks, live referring domains, all-time referring ...

#### get\_metrics

Get organic and paid search metrics for a target: keyword counts, traffic estimates, traffic value. Use country param...

#### get\_pages\_by\_traffic

Get traffic distribution by page range for a target. Shows how many pages fall into each traffic bucket (0, 100, 1K, ...

#### get\_limits\_and\_usage

Check current API usage and subscription limits. Free endpoint (0 API units). Shows units consumed, remaining quota, ...