Skip to navigation

Ahrefs

Connect your AI agents to Ahrefs.
Ready to connect

Connects with credentials the end user enters, such as an API key, so you don’t need to register an OAuth app.

Authentication: API key. See 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.

list_refdomains

List referring domains linking to a target.

list_anchors

List anchor text distribution for backlinks to a target.

list_broken_backlinks

List broken backlinks pointing to a target (links returning 4xx/5xx).

batch_analyze

Analyze up to 100 domains/URLs in a single request.

get_domain_rating_history

Get Domain Rating trend over time for a target.

get_refdomains_history

Get referring domains count trend over time for a target.

list_organic_keywords

List organic keywords a target ranks for.

list_top_pages

List top pages by organic traffic for a target.

list_organic_competitors

List organic search competitors for a target.

get_keyword_overview

Get keyword metrics: search volume, difficulty, CPC, clicks, and traffic potential.

list_matching_terms

Find keyword variations matching seed keywords.

list_related_terms

Find related keywords that top-ranking pages also rank for.

list_search_suggestions

Get Google search autocomplete suggestions for seed keywords.

get_volume_history

Get monthly search volume history for a keyword over time.

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.

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).

get_domain_rating

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

get_backlinks_stats

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

get_metrics

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

get_pages_by_traffic

Get traffic distribution by page range for a target.

get_limits_and_usage

Check current API usage and subscription limits.