# Ahrefs

Ahrefs is an SEO and marketing platform offering site audits, keyword research, content analysis, and competitive insights to improve search rankings and drive organic traffic

- **Category:** marketing automation
- **Auth:** API_KEY
- **Composio Managed App Available?** N/A
- **Tools:** 40
- **Triggers:** 0
- **Slug:** `AHREFS`
- **Version:** 20260211_00

## Tools

### Backlinks stats retrieval

**Slug:** `AHREFS_BACKLINKS_STATS_RETRIEVAL`

Retrieves comprehensive backlink statistics for a specified website or URL using Ahrefs' Site Explorer tool. This endpoint provides crucial data for SEO analysis, including the total number of backlinks, referring domains, and potentially the Domain Rating (DR). It's essential for understanding a site's link profile, assessing its SEO performance, and conducting competitive analysis. The tool is particularly useful when users need detailed insights into a website's backlink structure or when comparing the backlink profiles of multiple domains. Note that the data returned is based on Ahrefs' extensive web crawl and may not include very recent backlinks.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `date` | string | Yes | A date to report metrics on in YYYY-MM-DD format. |
| `mode` | string ("exact" | "prefix" | "domain" | "subdomains") | No | The scope of the search based on the target you entered. |
| `output` | string ("json" | "csv" | "xml" | "php") | No | The output format. |
| `target` | string | Yes | The target of the search: a domain or a URL. |
| `protocol` | string ("both" | "http" | "https") | No | The protocol of your target. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Batch Url Analysis

**Slug:** `AHREFS_BATCH_URL_ANALYSIS`

Performs a batch analysis on multiple URLs or domains using Ahrefs' powerful SEO metrics. This endpoint allows users to retrieve key SEO data for up to 100 targets simultaneously, streamlining the process of analyzing multiple websites or pages. It's particularly useful for comparing competitors, analyzing site sections, or processing large sets of URLs efficiently. The endpoint offers customization options for selecting specific metrics, filtering by country, and choosing the calculation mode for volume-based metrics. While it provides comprehensive data, users should be aware of the 100-target limit per request and ensure they have sufficient API quota for large-scale analyses.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `output` | string ("json" | "php") | No | The output format. |
| `select` | array | Yes | A list of columns to return. See response schema for valid column identifiers.  |
| `country` | string ("ad" | "ae" | "af" | "ag" | "ai" | "al" | "am" | "ao" | "ar" | "as" | "at" | "au" | "aw" | "az" | "ba" | "bb" | "bd" | "be" | "bf" | "bg" | "bh" | "bi" | "bj" | "bn" | "bo" | "br" | "bs" | "bt" | "bw" | "by" | "bz" | "ca" | "cd" | "cf" | "cg" | "ch" | "ci" | "ck" | "cl" | "cm" | "cn" | "co" | "cr" | "cu" | "cv" | "cy" | "cz" | "de" | "dj" | "dk" | "dm" | "do" | "dz" | "ec" | "ee" | "eg" | "es" | "et" | "fi" | "fj" | "fm" | "fo" | "fr" | "ga" | "gb" | "gd" | "ge" | "gf" | "gg" | "gh" | "gi" | "gl" | "gm" | "gn" | "gp" | "gq" | "gr" | "gt" | "gu" | "gy" | "hk" | "hn" | "hr" | "ht" | "hu" | "id" | "ie" | "il" | "im" | "in" | "iq" | "is" | "it" | "je" | "jm" | "jo" | "jp" | "ke" | "kg" | "kh" | "ki" | "kn" | "kr" | "kw" | "ky" | "kz" | "la" | "lb" | "lc" | "li" | "lk" | "ls" | "lt" | "lu" | "lv" | "ly" | "ma" | "mc" | "md" | "me" | "mg" | "mk" | "ml" | "mm" | "mn" | "mq" | "mr" | "ms" | "mt" | "mu" | "mv" | "mw" | "mx" | "my" | "mz" | "na" | "nc" | "ne" | "ng" | "ni" | "nl" | "no" | "np" | "nr" | "nu" | "nz" | "om" | "pa" | "pe" | "pf" | "pg" | "ph" | "pk" | "pl" | "pn" | "pr" | "ps" | "pt" | "py" | "qa" | "re" | "ro" | "rs" | "ru" | "rw" | "sa" | "sb" | "sc" | "se" | "sg" | "sh" | "si" | "sk" | "sl" | "sm" | "sn" | "so" | "sr" | "st" | "sv" | "td" | "tg" | "th" | "tj" | "tk" | "tl" | "tm" | "tn" | "to" | "tr" | "tt" | "tw" | "tz" | "ua" | "ug" | "us" | "uy" | "uz" | "vc" | "ve" | "vg" | "vi" | "vn" | "vu" | "ws" | "ye" | "yt" | "za" | "zm" | "zw") | No | A two-letter country code (ISO 3166-1 alpha-2). |
| `targets` | array | Yes | A list of targets to do batch analysis. |
| `order_by` | string | No | A column to order results by. See response schema for valid column identifiers.  |
| `volume_mode` | string ("monthly" | "average") | No | The search volume calculation mode: monthly or average. It affects volume, traffic, and traffic value.  |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Domain rating for site explorer

**Slug:** `AHREFS_DOMAIN_RATING_FOR_SITE_EXPLORER`

Retrieves the Domain Rating (DR) for a specified domain. Domain Rating is an Ahrefs metric that measures the strength and authority of a website's backlink profile on a logarithmic scale from 0 to 100. This endpoint should be used when you need to quickly assess the overall SEO strength of a domain based on its backlink profile. It's particularly useful for competitive analysis, link building research, and evaluating potential partnership opportunities. The tool provides a single, easy-to-understand metric but does not offer detailed information about the backlinks themselves or other SEO factors. For more comprehensive backlink analysis, consider using other Ahrefs endpoints that provide more detailed backlink data.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `date` | string | Yes | A date to report metrics on in YYYY-MM-DD format. |
| `output` | string ("json" | "csv" | "xml" | "php") | No | The output format. |
| `target` | string | Yes | The target of the search: a domain or a URL. |
| `protocol` | string ("both" | "http" | "https") | No | The protocol of your target. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Domain rating history

**Slug:** `AHREFS_DOMAIN_RATING_HISTORY`

Retrieves the historical Domain Rating (DR) data for a specified domain over time. This endpoint is part of Ahrefs' Site Explorer tool and provides insights into how a domain's authority has changed. It's useful for tracking the impact of SEO efforts, analyzing competitors, or understanding long-term trends in domain strength. The tool returns a time series of Domain Rating values, allowing users to visualize changes in a domain's perceived authority according to Ahrefs' metrics. It should be used when analyzing the historical performance of a domain in terms of its overall SEO strength and backlink profile quality. Note that this endpoint focuses solely on Domain Rating and does not provide other metrics like backlink counts or organic traffic data.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `output` | string ("json" | "csv" | "xml" | "php") | No | The output format. |
| `target` | string | Yes | The target of the search: a domain or a URL. |
| `date_to` | string | No | The end date of the historical period in YYYY-MM-DD format. |
| `date_from` | string | Yes | The start date of the historical period in YYYY-MM-DD format. |
| `history_grouping` | string ("daily" | "weekly" | "monthly") | No | The time interval used to group historical data. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Explore keywords overview

**Slug:** `AHREFS_EXPLORE_KEYWORDS_OVERVIEW`

Retrieves a comprehensive overview of keyword data from Ahrefs' Keywords Explorer tool. This endpoint provides essential insights for SEO professionals and content strategists, offering a summary of key metrics such as search volume, keyword difficulty, and potential traffic. It's ideal for users looking to get a quick snapshot of keyword performance and opportunities without diving into specific keyword details. The overview likely includes aggregate data and trends, helping users to make informed decisions about their keyword strategy. While it offers a broad perspective, it may not provide in-depth analysis of individual keywords. Use this endpoint when you need a high-level view of your keyword landscape or to identify general trends in your niche.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `limit` | integer | No | The number of results to return. |
| `where` | string | No | The filter expression. The following column identifiers are recognized (this differs from the identifiers recognized by the `select` parameter). **clicks**: The average monthly number of clicks on the search results that people make while searching for the target keyword.   type: integer nullable **cpc**: Cost Per Click shows the average price that advertisers pay for each ad click in paid search results for a keyword, in USD cents.   type: integer nullable **cps**: Clicks Per Search (or CPS) is the ratio of Clicks to Keyword Search volume. It shows how many different search results get clicked, on average, when people search for the target keyword in a given country.   type: float nullable **difficulty** (10 units): An estimation of how hard it is to rank in the top 10 organic search results for a keyword on a 100-point scale.   type: integer nullable **first_seen**: The date when we first checked search engine results for a keyword.   type: datetime nullable **global_volume** (10 units): How many times per month, on average, people search for the target keyword across all countries in our database.   type: integer nullable **intents** (10 units): Indicates the purpose behind the user"s search query. Object fields: `informational`, `navigational`, `commercial`, `transactional`, `branded` or `local`. All the fields are of type `bool`, with posible values `true` or `false`.   type: object nullable **keyword**:    type: string **parent_topic**: Parent Topic determines if you can rank for your target keyword while targeting a more general topic on your page instead. To identify the Parent Topic, we take the #1 ranking page for your keyword and find the keyword responsible for sending the most traffic to that page.   type: string nullable **parent_volume** (10 units): The search volume of the parent topic.   type: integer nullable **serp_domain_rating_top10_min**: The keyword must have at least one ranking position in the top 10 results with a DR of up to this value.   type: float nullable **serp_domain_rating_top5_min**: The keyword must have at least one ranking position in the top 5 results with a DR of up to this value.   type: float nullable **serp_features**: The enriched results on a search engine results page (SERP) that are not traditional organic results.   type: array(string)   enum: `"ai_overview_sitelink"` `"snippet"` `"ai_overview"` `"local_pack"` `"sitelink"` `"news"` `"image"` `"video"` `"discussion"` `"tweet"` `"paid_top"` `"paid_bottom"` `"paid_sitelink"` `"shopping"` `"knowledge_card"` `"knowledge_panel"` `"question"` `"image_th"` `"video_th"` `"organic_shopping"` **serp_last_update**: The date when we last checked search engine results for a keyword.   type: datetime nullable **traffic_potential** (10 units): The sum of organic traffic that the #1 ranking page for your target keyword receives from all the keywords that it ranks for.   type: integer nullable **volume** (10 units): An estimation of the average monthly number of searches for a keyword over the latest known 12 months of data.   type: integer nullable **volume_desktop_pct**: The percentage of searches for a keyword performed on desktop devices.   type: float nullable **volume_mobile_pct**: The percentage of searches for a keyword performed on mobile devices.   type: float nullable **word_count**:    type: integer  |
| `offset` | integer | No | [Deprecated on 31 May 2024]. |
| `output` | string ("json" | "csv" | "xml" | "php") | No | The output format. |
| `select` | string | Yes | A comma-separated list of columns to return. See response schema for valid column identifiers.  |
| `target` | string | No | The target of the search: a domain or a URL. |
| `country` | string ("ad" | "ae" | "af" | "ag" | "ai" | "al" | "am" | "ao" | "ar" | "as" | "at" | "au" | "aw" | "az" | "ba" | "bb" | "bd" | "be" | "bf" | "bg" | "bh" | "bi" | "bj" | "bn" | "bo" | "br" | "bs" | "bt" | "bw" | "by" | "bz" | "ca" | "cd" | "cf" | "cg" | "ch" | "ci" | "ck" | "cl" | "cm" | "cn" | "co" | "cr" | "cu" | "cv" | "cy" | "cz" | "de" | "dj" | "dk" | "dm" | "do" | "dz" | "ec" | "ee" | "eg" | "es" | "et" | "fi" | "fj" | "fm" | "fo" | "fr" | "ga" | "gb" | "gd" | "ge" | "gf" | "gg" | "gh" | "gi" | "gl" | "gm" | "gn" | "gp" | "gq" | "gr" | "gt" | "gu" | "gy" | "hk" | "hn" | "hr" | "ht" | "hu" | "id" | "ie" | "il" | "im" | "in" | "iq" | "is" | "it" | "je" | "jm" | "jo" | "jp" | "ke" | "kg" | "kh" | "ki" | "kn" | "kr" | "kw" | "ky" | "kz" | "la" | "lb" | "lc" | "li" | "lk" | "ls" | "lt" | "lu" | "lv" | "ly" | "ma" | "mc" | "md" | "me" | "mg" | "mk" | "ml" | "mm" | "mn" | "mq" | "mr" | "ms" | "mt" | "mu" | "mv" | "mw" | "mx" | "my" | "mz" | "na" | "nc" | "ne" | "ng" | "ni" | "nl" | "no" | "np" | "nr" | "nu" | "nz" | "om" | "pa" | "pe" | "pf" | "pg" | "ph" | "pk" | "pl" | "pn" | "pr" | "ps" | "pt" | "py" | "qa" | "re" | "ro" | "rs" | "ru" | "rw" | "sa" | "sb" | "sc" | "se" | "sg" | "sh" | "si" | "sk" | "sl" | "sm" | "sn" | "so" | "sr" | "st" | "sv" | "td" | "tg" | "th" | "tj" | "tk" | "tl" | "tm" | "tn" | "to" | "tr" | "tt" | "tw" | "tz" | "ua" | "ug" | "us" | "uy" | "uz" | "vc" | "ve" | "vg" | "vi" | "vn" | "vu" | "ws" | "ye" | "yt" | "za" | "zm" | "zw") | Yes | A two-letter country code (ISO 3166-1 alpha-2). |
| `timeout` | integer | No | A manual timeout duration in seconds. |
| `keywords` | string | No | A comma-separated list of keywords to show metrics for. |
| `order_by` | string | No | A column to order results by. See response schema for valid column identifiers.  |
| `target_mode` | string ("exact" | "prefix" | "domain" | "subdomains") | No | The scope of the target URL you specified. |
| `search_engine` | string ("google") | No | [Deprecated on 5 Aug 2024]. |
| `keyword_list_id` | integer | No | The id of an existing keyword list to show metrics for. |
| `target_position` | string ("in_top10" | "in_top100") | No | Filters keywords based on the ranking position of the specified `target`.  |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Explore keyword volume by country

**Slug:** `AHREFS_EXPLORE_KEYWORD_VOLUME_BY_COUNTRY`

Retrieves the search volume data for specified keywords across different countries using Ahrefs' Keywords Explorer tool. This endpoint allows users to obtain accurate search volume information, helping in keyword research and content strategy planning for specific geographic regions. It's particularly useful for SEO professionals and content marketers looking to optimize their targeting for different markets. The endpoint provides monthly search volume data, which can be used to gauge the popularity and potential traffic of keywords in various countries. Note that the data is based on Ahrefs' extensive database and may not always exactly match real-time Google search volumes.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `limit` | integer | No | The number of results to return. |
| `output` | string ("json" | "csv" | "xml" | "php") | No | The output format. |
| `keyword` | string | Yes | The keyword to show metrics for. |
| `search_engine` | string ("google") | No | [Deprecated on 5 Aug 2024]. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Explore linked domains of a site

**Slug:** `AHREFS_EXPLORE_LINKED_DOMAINS_OF_A_SITE`

Retrieves a list of external domains that the specified target website or URL links to, using Ahrefs' Site Explorer functionality. This endpoint is crucial for analyzing a website's external linking structure, which can provide insights into its content strategy, partnerships, and overall SEO approach. It's particularly useful for competitive analysis, link building strategies, and identifying potential opportunities or risks in a website's outbound link profile. The endpoint returns detailed information about each linked domain, including the number of links pointing to it from the target site.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `mode` | string ("exact" | "prefix" | "domain" | "subdomains") | No | The scope of the search based on the target you entered. |
| `limit` | integer | No | The number of results to return. |
| `where` | string | No | The filter expression. The following column identifiers are recognized (this differs from the identifiers recognized by the `select` parameter). **anchor**: The clickable words in a link that point to a URL.   type: string **dofollow_linked_domains**: The number of unique root domains with dofollow links linked from the linked domain.   type: integer **dofollow_links**: The number of links from your target to the linked domain that don"t have the "nofollow" attribute.   type: integer **dofollow_refdomains** (5 units): The number of unique domains with dofollow links to the linked domain.   type: integer **domain**: A linked domain that has at least one link from your target.   type: string **domain_rating**: The strength of a domain"s backlink profile compared to the others in our database on a 100-point scale.   type: float **first_seen**: The date we first found a link to the linked domain from your target.   type: datetime **is_content**: The link was found in the biggest piece of content on the page.   type: boolean **is_dofollow**: The link has no special nofollow attribute.   type: boolean **is_nofollow**: The link or the referring page has the nofollow attribute set.   type: boolean **is_non_html**: The link points to a URL with non-HTML content.   type: boolean **is_root_domain**: The domain name is a root domain name.   type: boolean **is_sponsored**: The link has the Sponsored attribute set in the referring page HTML.   type: boolean **is_ugc**: The link has the User Generated Content attribute set in the referring page HTML.   type: boolean **languages**: The languages listed in the referring page metadata or detected by the crawler to appear in the HTML.   type: array(string) **len_url_redirect**: The number of redirect chain URLs.   type: integer **link_type**: The kind of the backlink.   type: string   enum: `"redirect"` `"frame"` `"text"` `"form"` `"canonical"` `"alternate"` `"rss"` `"image"` **linked_domain_traffic** (10 units): The linked domain"s estimated monthly organic traffic from search   type: integer **linked_domains**: The number of unique root domains linked from the referring page.   type: integer **linked_pages**: The number of the domain"s pages linked from your target.   type: integer **links_external**: The number of external links from the referring page.   type: integer **links_from_target**: The number of links to the linked domain from your target.   type: integer **port_source**: The network port of the referring page URL.   type: integer **port_target**: The network port of the target page URL.   type: integer **positions**: The number of keywords that the referring page ranks for in the top 100 positions.   type: integer **powered_by**: Web technologies used to build and serve the referring page content.   type: array(string) **refdomains** (5 units): The number of unique referring domains linking to the referring page.   type: integer **root_domain_name**: The root domain name of the referring domain, not including subdomains.   type: string **snippet_left**: The snippet of text appearing just before the link.   type: string **snippet_right**: The snippet of text appearing just after the link.   type: string **title**: The html title of the referring page.   type: string **traffic_page** (10 units): The referring page"s estimated monthly organic traffic from search.   type: integer **url_from**: The URL of the page containing a link from your target.   type: string **url_redirect**: A redirect chain the target URL of the link points to.   type: array(url) **url_redirect_with_target**: The target URL of the link with its redirect chain.   type: array(string) **url_to**: The URL the outgoing link points to.   type: string  |
| `offset` | integer | No | [Deprecated on 31 May 2024]. |
| `output` | string ("json" | "csv" | "xml" | "php") | No | The output format. |
| `select` | string | Yes | A comma-separated list of columns to return. See response schema for valid column identifiers.  |
| `target` | string | Yes | The target of the search: a domain or a URL. |
| `timeout` | integer | No | A manual timeout duration in seconds. |
| `order_by` | string | No | A column to order results by. See response schema for valid column identifiers.  |
| `protocol` | string ("both" | "http" | "https") | No | The protocol of your target. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Explore matching terms for keywords

**Slug:** `AHREFS_EXPLORE_MATCHING_TERMS_FOR_KEYWORDS`

The keywords_explorer_matching_terms endpoint retrieves a list of keyword phrases that match or contain the specified keyword from Ahrefs' vast database. This tool is part of Ahrefs' Keyword Explorer functionality and is designed to assist in comprehensive keyword research for SEO purposes. It returns matching terms along with their relevant metrics such as search volume, keyword difficulty, and potential traffic. This endpoint is particularly useful when expanding a seed keyword list, finding long-tail variations, or discovering closely related search terms. The tool takes into account the specified country for localized results, allowing for targeted keyword strategies in different markets. It's important to note that while this tool provides valuable keyword suggestions, it should be used in conjunction with other Ahrefs features for a complete SEO strategy.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `limit` | integer | No | The number of results to return. |
| `terms` | string ("all" | "questions") | No | All keywords ideas or keywords ideas phrased as questions. |
| `where` | string | No | The filter expression. The following column identifiers are recognized (this differs from the identifiers recognized by the `select` parameter). **cpc**: Cost Per Click shows the average price that advertisers pay for each ad click in paid search results for a keyword, in USD cents.   type: integer nullable **cps**: Clicks Per Search (or CPS) is the ratio of Clicks to Keyword Search volume. It shows how many different search results get clicked, on average, when people search for the target keyword in a given country.   type: float nullable **difficulty** (10 units): An estimation of how hard it is to rank in the top 10 organic search results for a keyword on a 100-point scale.   type: integer nullable **first_seen**: The date when we first checked search engine results for a keyword.   type: datetime nullable **global_volume** (10 units): How many times per month, on average, people search for the target keyword across all countries in our database.   type: integer nullable **intents** (10 units): Indicates the purpose behind the user"s search query. Object fields: `informational`, `navigational`, `commercial`, `transactional`, `branded` or `local`. All the fields are of type `bool`, with posible values `true` or `false`.   type: object nullable **keyword**:    type: string **parent_topic**: Parent Topic determines if you can rank for your target keyword while targeting a more general topic on your page instead. To identify the Parent Topic, we take the #1 ranking page for your keyword and find the keyword responsible for sending the most traffic to that page.   type: string nullable **serp_domain_rating_top10_min**: The keyword must have at least one ranking position in the top 10 results with a DR of up to this value.   type: float nullable **serp_domain_rating_top5_min**: The keyword must have at least one ranking position in the top 5 results with a DR of up to this value.   type: float nullable **serp_features**: The enriched results on a search engine results page (SERP) that are not traditional organic results.   type: array(string)   enum: `"ai_overview_sitelink"` `"snippet"` `"ai_overview"` `"local_pack"` `"sitelink"` `"news"` `"image"` `"video"` `"discussion"` `"tweet"` `"paid_top"` `"paid_bottom"` `"paid_sitelink"` `"shopping"` `"knowledge_card"` `"knowledge_panel"` `"question"` `"image_th"` `"video_th"` `"organic_shopping"` **serp_last_update**: The date when we last checked search engine results for a keyword.   type: datetime nullable **traffic_potential** (10 units): The sum of organic traffic that the #1 ranking page for your target keyword receives from all the keywords that it ranks for.   type: integer nullable **volume** (10 units): An estimation of the average monthly number of searches for a keyword over the latest known 12 months of data.   type: integer nullable **volume_desktop_pct**: The percentage of searches for a keyword performed on desktop devices.   type: float nullable **volume_mobile_pct**: The percentage of searches for a keyword performed on mobile devices.   type: float nullable **word_count**:    type: integer  |
| `offset` | integer | No | [Deprecated on 31 May 2024]. |
| `output` | string ("json" | "csv" | "xml" | "php") | No | The output format. |
| `select` | string | Yes | A comma-separated list of columns to return. See response schema for valid column identifiers.  |
| `country` | string ("ad" | "ae" | "af" | "ag" | "ai" | "al" | "am" | "ao" | "ar" | "as" | "at" | "au" | "aw" | "az" | "ba" | "bb" | "bd" | "be" | "bf" | "bg" | "bh" | "bi" | "bj" | "bn" | "bo" | "br" | "bs" | "bt" | "bw" | "by" | "bz" | "ca" | "cd" | "cf" | "cg" | "ch" | "ci" | "ck" | "cl" | "cm" | "cn" | "co" | "cr" | "cu" | "cv" | "cy" | "cz" | "de" | "dj" | "dk" | "dm" | "do" | "dz" | "ec" | "ee" | "eg" | "es" | "et" | "fi" | "fj" | "fm" | "fo" | "fr" | "ga" | "gb" | "gd" | "ge" | "gf" | "gg" | "gh" | "gi" | "gl" | "gm" | "gn" | "gp" | "gq" | "gr" | "gt" | "gu" | "gy" | "hk" | "hn" | "hr" | "ht" | "hu" | "id" | "ie" | "il" | "im" | "in" | "iq" | "is" | "it" | "je" | "jm" | "jo" | "jp" | "ke" | "kg" | "kh" | "ki" | "kn" | "kr" | "kw" | "ky" | "kz" | "la" | "lb" | "lc" | "li" | "lk" | "ls" | "lt" | "lu" | "lv" | "ly" | "ma" | "mc" | "md" | "me" | "mg" | "mk" | "ml" | "mm" | "mn" | "mq" | "mr" | "ms" | "mt" | "mu" | "mv" | "mw" | "mx" | "my" | "mz" | "na" | "nc" | "ne" | "ng" | "ni" | "nl" | "no" | "np" | "nr" | "nu" | "nz" | "om" | "pa" | "pe" | "pf" | "pg" | "ph" | "pk" | "pl" | "pn" | "pr" | "ps" | "pt" | "py" | "qa" | "re" | "ro" | "rs" | "ru" | "rw" | "sa" | "sb" | "sc" | "se" | "sg" | "sh" | "si" | "sk" | "sl" | "sm" | "sn" | "so" | "sr" | "st" | "sv" | "td" | "tg" | "th" | "tj" | "tk" | "tl" | "tm" | "tn" | "to" | "tr" | "tt" | "tw" | "tz" | "ua" | "ug" | "us" | "uy" | "uz" | "vc" | "ve" | "vg" | "vi" | "vn" | "vu" | "ws" | "ye" | "yt" | "za" | "zm" | "zw") | Yes | A two-letter country code (ISO 3166-1 alpha-2). |
| `timeout` | integer | No | A manual timeout duration in seconds. |
| `keywords` | string | No | A comma-separated list of keywords to show metrics for. |
| `order_by` | string | No | A column to order results by. See response schema for valid column identifiers.  |
| `match_mode` | string ("terms" | "phrase") | No | Keyword ideas contain the words from your query in any order (terms mode) or in the exact order they are written (phrase mode).  |
| `search_engine` | string ("google") | No | [Deprecated on 5 Aug 2024]. |
| `keyword_list_id` | integer | No | The id of an existing keyword list to show metrics for. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Fetch all backlinks

**Slug:** `AHREFS_FETCH_ALL_BACKLINKS`

Retrieves a comprehensive list of backlinks for a specified website or URL using Ahrefs' Site Explorer tool. This endpoint provides detailed information about the backlink profile of the target, including the source URLs, link attributes, and potentially other SEO metrics like Domain Rating (DR) or URL Rating (UR) of the linking pages. It's particularly useful for analyzing a website's link-building efforts, identifying potential link-building opportunities, and assessing the overall health of a site's backlink profile. The endpoint can handle large-scale backlink data, making it suitable for in-depth SEO analysis and competitive research. However, users should be aware that for websites with a substantial number of backlinks, multiple API calls or pagination may be necessary to retrieve the complete dataset.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `mode` | string ("exact" | "prefix" | "domain" | "subdomains") | No | The scope of the search based on the target you entered. |
| `limit` | integer | No | The number of results to return. |
| `where` | string | No | The filter expression. The following column identifiers are recognized (this differs from the identifiers recognized by the `select` parameter). **ahrefs_rank_source**: The strength of the referring domain"s backlink profile compared to the other websites in our database, with rank #1 being the strongest.   type: integer **ahrefs_rank_target**: The strength of the target domain"s backlink profile compared to the other websites in our database, with rank #1 being the strongest.   type: integer **alt**: The alt attribute of the link.   type: string nullable **anchor**: The clickable words in a link that point to a URL.   type: string **broken_redirect_new_target**: The new destination of a modified redirect.   type: string nullable **broken_redirect_reason**: The reason the redirect was considered broken during the last crawl.   type: string nullable   enum: `"droppedmanual"` `"droppedtooold"` `"dropped"` `"codechanged"` `"nxdomain"` `"robotsdisallowed"` `"curlerror"` `"invalidtarget"` `"nomorecanonical"` `"isnowparked"` `"targetchanged"` **broken_redirect_source**: The redirecting URL that was modified, causing the redirect to become broken.   type: string nullable **class_c** (5 units): The number of unique class_c subnets linking to the referring page.   type: integer **discovered_status**: The reason the link was discovered during the last crawl: the page was crawled for the first time, the link was added to the page, or the link re-appeared after being removed.   type: string nullable   enum: `"pagefound"` `"linkfound"` `"linkrestored"` **domain_rating_source**: The strength of the referring domain"s backlink profile compared to the others in our database on a 100-point scale.   type: float **domain_rating_target**: The strength of the referring domain"s backlink profile compared to the others in our database on a 100-point scale.   type: float **drop_reason**: The reason we removed the link from our index.   type: string nullable   enum: `"manual"` `"noratingunused"` `"notop"` `"tooold"` `"oldunavailable"` `"rescursive"` `"duplicate"` `"nxdomain"` `"malformed"` `"blockedport"` `"disallowed"` `"unlinked"` **encoding**: The character set encoding of the referring page HTML.   type: string **first_seen**: The date the referring page URL was first discovered.   type: datetime **first_seen_link**: The date we first found a backlink to your target on a given referring page.   type: datetime **http_code**: The return code from HTTP protocol returned during the referring page crawl.   type: integer **http_crawl**: The link was discovered without executing javascript and rendering the page.   type: boolean **ip_source**: The referring domain IP address.   type: string nullable **is_alternate**: The link with the rel=“alternate” attribute.   type: boolean **is_canonical**: The link with the rel=“canonical” attribute.   type: boolean **is_content**: The link was found in the biggest piece of content on the page.   type: boolean **is_dofollow**: The link has no special nofollow attribute.   type: boolean **is_form**: The link was found in a form HTML tag.   type: boolean **is_frame**: The link was found in an iframe HTML tag.   type: boolean **is_homepage_link**: The link was found on the homepage of a referring website.   type: boolean **is_image**: The link is a regular link that has an image inside their href attribute.   type: boolean **is_lost**: The link currently does not exist anymore.   type: boolean **is_new**: The link was discovered on the last crawl.   type: boolean **is_nofollow**: The link or the referring page has the nofollow attribute set.   type: boolean **is_non_html**: The link points to a URL with non-HTML content.   type: boolean **is_redirect**: The link pointing to your target via a redirect.   type: boolean **is_redirect_lost**: The redirected link currently does not exist anymore.   type: boolean **is_root_source**: The referring domain name is a root domain name.   type: boolean **is_root_target**: The target domain name is a root domain name.   type: boolean **is_rss**: The link was found in an RSS feed.   type: boolean **is_sponsored**: The link has the Sponsored attribute set in the referring page HTML.   type: boolean **is_text**: The link is a standard href hyperlink.   type: boolean **is_ugc**: The link has the User Generated Content attribute set in the referring page HTML.   type: boolean **js_crawl**: The link was discovered after executing javascript and rendering the page.   type: boolean **languages**: The languages listed in the referring page metadata or detected by the crawler to appear in the HTML.   type: array(string) **last_seen**: The date we discovered that the link was lost.   type: datetime nullable **last_visited**: The date we last verified a live link to your target page.   type: datetime **len_url_redirect**: The number of redirect chain URLs.   type: integer **link_group_count**: The number of backlinks that were grouped together based on the aggregation parameter. This field cannot be used with aggregation "all".   type: integer **link_type**: The kind of the backlink.   type: string   enum: `"redirect"` `"frame"` `"text"` `"form"` `"canonical"` `"alternate"` `"rss"` `"image"` **linked_domains_source_domain**: The number of unique root domains linked from the referring domain.   type: integer **linked_domains_source_page**: The number of unique root domains linked from the referring page.   type: integer **linked_domains_target_domain**: The number of unique root domains linked from the target domain.   type: integer **links_external**: The number of external links from the referring page.   type: integer **links_internal**: The number of internal links from the referring page.   type: integer **lost_reason**: The reason the link was lost during the last crawl.   type: string nullable   enum: `"removedfromhtml"` `"notcanonical"` `"noindex"` `"pageredirected"` `"pageerror"` `"lostredirect"` `"notfound"` **name_source**: The complete referring domain name, including subdomains.   type: string **name_target**: The complete target domain name, including subdomains.   type: string **noindex**: The referring page has the noindex meta attribute.   type: boolean **page_size**: The size in bytes of the referring page content.   type: integer **port_source**: The network port of the referring page URL.   type: integer **port_target**: The network port of the target page URL.   type: integer **positions**: The number of keywords that the referring page ranks for in the top 100 positions.   type: integer **positions_source_domain**: The number of keywords that the referring domain ranks for in the top 100 positions.   type: integer **powered_by**: Web technologies used to build and serve the referring page content.   type: array(string) **redirect_code**: The HTTP status code of a referring page pointing to your target via a redirect.   type: integer nullable **redirect_kind**: The HTTP status codes returned by the target redirecting URL or redirect chain.   type: array(integer) **refdomains_source** (5 units): The number of unique referring domains linking to the referring page.   type: integer **refdomains_source_domain** (5 units): The number of unique referring domains linking to the referring domain.   type: integer **refdomains_target_domain** (5 units): The number of unique referring domains linking to the target domain.   type: integer **root_name_source**: The root domain name of the referring domain, not including subdomains.   type: string **root_name_target**: The root domain name of the target domain, not including subdomains.   type: string **snippet_left**: The snippet of text appearing just before the link.   type: string **snippet_right**: The snippet of text appearing just after the link.   type: string **source_page_author**: The author of the referring page.   type: string nullable **source_page_publish_date**: the date we identified the page was published   type: date nullable **title**: The html title of the referring page.   type: string **tld_class_source**: The top level domain class of the referring domain.   type: string   enum: `"gov"` `"edu"` `"normal"` **tld_class_target**: The top level domain class of the target domain.   type: string   enum: `"gov"` `"edu"` `"normal"` **traffic** (10 units): The referring page"s estimated monthly organic traffic from search.   type: integer **traffic_domain** (10 units): The referring domain"s estimated monthly organic traffic from search.   type: integer **url_from**: The URL of the page containing a link to your target.   type: string **url_from_plain**: The referring page URL optimized for use as a filter.   type: string **url_rating_source**: The strength of the referring page"s backlink profile compared to the others in our database on a 100-point scale.   type: float **url_redirect**: A redirect chain the target URL of the link points to.   type: array(url) **url_redirect_with_target**: The target URL of the link with its redirect chain.   type: array(string) **url_to**: The URL the backlink points to.   type: string **url_to_plain**: The target page URL optimized for use as a filter.   type: string  |
| `offset` | integer | No | [Deprecated on 31 May 2024]. |
| `output` | string ("json" | "csv" | "xml" | "php") | No | The output format. |
| `select` | string | Yes | A comma-separated list of columns to return. See response schema for valid column identifiers.  |
| `target` | string | Yes | The target of the search: a domain or a URL. |
| `history` | string | No | A time frame to add lost backlinks to the report. Choose between `live` (no history), `since:<date>` (history since a specified date), and `all_time` (full history). The date should be in YYYY-MM-DD format.  |
| `timeout` | integer | No | A manual timeout duration in seconds. |
| `order_by` | string | No | A column to order results by. See response schema for valid column identifiers.  |
| `protocol` | string ("both" | "http" | "https") | No | The protocol of your target. |
| `aggregation` | string ("similar_links" | "1_per_domain" | "all") | No | The backlinks grouping mode. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Fetch broken backlinks data

**Slug:** `AHREFS_FETCH_BROKEN_BACKLINKS_DATA`

Retrieves a list of broken backlinks for a specified website using Ahrefs' Site Explorer tool. This endpoint helps identify and analyze backlinks that are no longer functional, potentially affecting the website's SEO performance. It should be used when conducting a backlink audit, cleaning up a website's link profile, or identifying opportunities for link reclamation. The tool provides detailed information about each broken backlink, including the referring page, anchor text, and the specific broken URL. It's important to note that this endpoint may have limitations on the number of results returned and may require additional API calls for pagination if there are many broken backlinks.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `mode` | string ("exact" | "prefix" | "domain" | "subdomains") | No | The scope of the search based on the target you entered. |
| `limit` | integer | No | The number of results to return. |
| `where` | string | No | The filter expression. The following column identifiers are recognized (this differs from the identifiers recognized by the `select` parameter). **ahrefs_rank_source**: The strength of the referring domain"s backlink profile compared to the other websites in our database, with rank #1 being the strongest.   type: integer **ahrefs_rank_target**: The strength of the target domain"s backlink profile compared to the other websites in our database, with rank #1 being the strongest.   type: integer **alt**: The alt attribute of the link.   type: string nullable **anchor**: The clickable words in a link that point to a URL.   type: string **class_c** (5 units): The number of unique class_c subnets linking to the referring page.   type: integer **domain_rating_source**: The strength of the referring domain"s backlink profile compared to the others in our database on a 100-point scale.   type: float **domain_rating_target**: The strength of the referring domain"s backlink profile compared to the others in our database on a 100-point scale.   type: float **encoding**: The character set encoding of the referring page HTML.   type: string **first_seen**: The date the referring page URL was first discovered.   type: datetime **first_seen_link**: The date we first found a backlink to your target on a given referring page.   type: datetime **http_code**: The return code from HTTP protocol returned during the referring page crawl.   type: integer **http_code_target**: The return code from HTTP protocol returned during the target page crawl.   type: integer nullable **http_crawl**: The link was discovered without executing javascript and rendering the page.   type: boolean **ip_source**: The referring domain IP address.   type: string nullable **is_alternate**: The link with the rel=“alternate” attribute.   type: boolean **is_canonical**: The link with the rel=“canonical” attribute.   type: boolean **is_content**: The link was found in the biggest piece of content on the page.   type: boolean **is_dofollow**: The link has no special nofollow attribute.   type: boolean **is_form**: The link was found in a form HTML tag.   type: boolean **is_frame**: The link was found in an iframe HTML tag.   type: boolean **is_homepage_link**: The link was found on the homepage of a referring website.   type: boolean **is_image**: The link is a regular link that has an image inside their href attribute.   type: boolean **is_nofollow**: The link or the referring page has the nofollow attribute set.   type: boolean **is_non_html**: The link points to a URL with non-HTML content.   type: boolean **is_redirect**: The link pointing to your target via a redirect.   type: boolean **is_root_source**: The referring domain name is a root domain name.   type: boolean **is_root_target**: The target domain name is a root domain name.   type: boolean **is_rss**: The link was found in an RSS feed.   type: boolean **is_sponsored**: The link has the Sponsored attribute set in the referring page HTML.   type: boolean **is_text**: The link is a standard href hyperlink.   type: boolean **is_ugc**: The link has the User Generated Content attribute set in the referring page HTML.   type: boolean **js_crawl**: The link was discovered after executing javascript and rendering the page.   type: boolean **languages**: The languages listed in the referring page metadata or detected by the crawler to appear in the HTML.   type: array(string) **last_seen**: The date we discovered that the link was lost.   type: datetime nullable **last_visited**: The date we last re-crawled the referring page to verify the backlink is alive.   type: datetime **last_visited_target**: The date we last re-crawled the target page to verify that it is broken.   type: datetime nullable **len_url_redirect**: The number of redirect chain URLs.   type: integer **link_group_count**: The number of backlinks that were grouped together based on the aggregation parameter. This field cannot be used with aggregation "all".   type: integer **link_type**: The kind of the backlink.   type: string   enum: `"redirect"` `"frame"` `"text"` `"form"` `"canonical"` `"alternate"` `"rss"` `"image"` **linked_domains_source_domain**: The number of unique root domains linked from the referring domain.   type: integer **linked_domains_source_page**: The number of unique root domains linked from the referring page.   type: integer **linked_domains_target_domain**: The number of unique root domains linked from the target domain.   type: integer **links_external**: The number of external links from the referring page.   type: integer **links_internal**: The number of internal links from the referring page.   type: integer **name_source**: The complete referring domain name, including subdomains.   type: string **name_target**: The complete target domain name, including subdomains.   type: string **page_size**: The size in bytes of the referring page content.   type: integer **port_source**: The network port of the referring page URL.   type: integer **port_target**: The network port of the target page URL.   type: integer **positions**: The number of keywords that the referring page ranks for in the top 100 positions.   type: integer **positions_source_domain**: The number of keywords that the referring domain ranks for in the top 100 positions.   type: integer **powered_by**: Web technologies used to build and serve the referring page content.   type: array(string) **redirect_code**: The HTTP status code of a referring page pointing to your target via a redirect.   type: integer nullable **redirect_kind**: The HTTP status codes returned by the target redirecting URL or redirect chain.   type: array(integer) **refdomains_source** (5 units): The number of unique referring domains linking to the referring page.   type: integer **refdomains_source_domain** (5 units): The number of unique referring domains linking to the referring domain.   type: integer **refdomains_target_domain** (5 units): The number of unique referring domains linking to the target domain.   type: integer **root_name_source**: The root domain name of the referring domain, not including subdomains.   type: string **root_name_target**: The root domain name of the target domain, not including subdomains.   type: string **snippet_left**: The snippet of text appearing just before the link.   type: string **snippet_right**: The snippet of text appearing just after the link.   type: string **source_page_author**: The author of the referring page.   type: string nullable **title**: The html title of the referring page.   type: string **tld_class_source**: The top level domain class of the referring domain.   type: string   enum: `"gov"` `"edu"` `"normal"` **tld_class_target**: The top level domain class of the target domain.   type: string   enum: `"gov"` `"edu"` `"normal"` **traffic** (10 units): The referring page"s estimated monthly organic traffic from search.   type: integer **traffic_domain** (10 units): The referring domain"s estimated monthly organic traffic from search.   type: integer **url_from**: The URL of the page containing a link to your target.   type: string **url_from_plain**: The referring page URL optimized for use as a filter.   type: string **url_rating_source**: The strength of the referring page"s backlink profile compared to the others in our database on a 100-point scale.   type: float **url_redirect**: A redirect chain the target URL of the link points to.   type: array(url) **url_redirect_with_target**: The target URL of the link with its redirect chain.   type: array(string) **url_to**: The URL the backlink points to.   type: string **url_to_plain**: The target page URL optimized for use as a filter.   type: string  |
| `offset` | integer | No | [Deprecated on 31 May 2024]. |
| `output` | string ("json" | "csv" | "xml" | "php") | No | The output format. |
| `select` | string | Yes | A comma-separated list of columns to return. See response schema for valid column identifiers.  |
| `target` | string | Yes | The target of the search: a domain or a URL. |
| `timeout` | integer | No | A manual timeout duration in seconds. |
| `order_by` | string | No | A column to order results by. See response schema for valid column identifiers.  |
| `protocol` | string ("both" | "http" | "https") | No | The protocol of your target. |
| `aggregation` | string ("similar_links" | "1_per_domain" | "all") | No | The backlinks grouping mode. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Fetch competitors overview

**Slug:** `AHREFS_FETCH_COMPETITORS_OVERVIEW`

Retrieves a comprehensive overview of competitor data in relation to keyword rankings and organic search performance. This endpoint is part of Ahrefs' Rank Tracker feature and provides a comparative analysis of your website against multiple competitors. It offers insights into keyword positions, traffic share, and SERP features across all tracked keywords. Use this endpoint when you need a high-level view of your SEO performance relative to your competitors. The data returned helps identify ranking opportunities, track your market share in organic search, and understand how you stack up against your competition in terms of visibility and traffic. Note that this endpoint may have limitations on the number of competitors it compares against and the historical data range available.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `date` | string | Yes | A date to report metrics on in YYYY-MM-DD format. |
| `limit` | integer | No | The number of results to return. |
| `where` | string | No | The filter expression. The following column identifiers are recognized (this differs from the identifiers recognized by the `select` parameter). **country**: The country that a given keyword is being tracked in. A two-letter country code (ISO 3166-1 alpha-2).   type: string   enum: `"AD"` `"AE"` `"AF"` `"AG"` `"AI"` `"AL"` `"AM"` `"AO"` `"AQ"` `"AR"` `"AS"` `"AT"` `"AU"` `"AW"` `"AX"` `"AZ"` `"BA"` `"BB"` `"BD"` `"BE"` `"BF"` `"BG"` `"BH"` `"BI"` `"BJ"` `"BL"` `"BM"` `"BN"` `"BO"` `"BQ"` `"BR"` `"BS"` `"BT"` `"BV"` `"BW"` `"BY"` `"BZ"` `"CA"` `"CC"` `"CD"` `"CF"` `"CG"` `"CH"` `"CI"` `"CK"` `"CL"` `"CM"` `"CN"` `"CO"` `"CR"` `"CU"` `"CV"` `"CW"` `"CX"` `"CY"` `"CZ"` `"DE"` `"DJ"` `"DK"` `"DM"` `"DO"` `"DZ"` `"EC"` `"EE"` `"EG"` `"EH"` `"ER"` `"ES"` `"ET"` `"FI"` `"FJ"` `"FK"` `"FM"` `"FO"` `"FR"` `"GA"` `"GB"` `"GD"` `"GE"` `"GF"` `"GG"` `"GH"` `"GI"` `"GL"` `"GM"` `"GN"` `"GP"` `"GQ"` `"GR"` `"GS"` `"GT"` `"GU"` `"GW"` `"GY"` `"HK"` `"HM"` `"HN"` `"HR"` `"HT"` `"HU"` `"ID"` `"IE"` `"IL"` `"IM"` `"IN"` `"IO"` `"IQ"` `"IR"` `"IS"` `"IT"` `"JE"` `"JM"` `"JO"` `"JP"` `"KE"` `"KG"` `"KH"` `"KI"` `"KM"` `"KN"` `"KP"` `"KR"` `"KW"` `"KY"` `"KZ"` `"LA"` `"LB"` `"LC"` `"LI"` `"LK"` `"LR"` `"LS"` `"LT"` `"LU"` `"LV"` `"LY"` `"MA"` `"MC"` `"MD"` `"ME"` `"MF"` `"MG"` `"MH"` `"MK"` `"ML"` `"MM"` `"MN"` `"MO"` `"MP"` `"MQ"` `"MR"` `"MS"` `"MT"` `"MU"` `"MV"` `"MW"` `"MX"` `"MY"` `"MZ"` `"NA"` `"NC"` `"NE"` `"NF"` `"NG"` `"NI"` `"NL"` `"NO"` `"NP"` `"NR"` `"NU"` `"NZ"` `"OM"` `"OTHER"` `"PA"` `"PE"` `"PF"` `"PG"` `"PH"` `"PK"` `"PL"` `"PM"` `"PN"` `"PR"` `"PS"` `"PT"` `"PW"` `"PY"` `"QA"` `"RE"` `"RO"` `"RS"` `"RU"` `"RW"` `"SA"` `"SB"` `"SC"` `"SD"` `"SE"` `"SG"` `"SH"` `"SI"` `"SJ"` `"SK"` `"SL"` `"SM"` `"SN"` `"SO"` `"SR"` `"SS"` `"ST"` `"SV"` `"SX"` `"SY"` `"SZ"` `"TC"` `"TD"` `"TF"` `"TG"` `"TH"` `"TJ"` `"TK"` `"TL"` `"TM"` `"TN"` `"TO"` `"TR"` `"TT"` `"TV"` `"TW"` `"TZ"` `"UA"` `"UG"` `"UM"` `"US"` `"UY"` `"UZ"` `"VA"` `"VC"` `"VE"` `"VG"` `"VI"` `"VN"` `"VU"` `"WF"` `"WS"` `"YE"` `"YT"` `"ZA"` `"ZM"` `"ZW"` **keyword**: The keyword your target ranks for.   type: string **keyword_difficulty**: An estimation of how hard it is to rank in the top 10 organic search results for a keyword on a 100-point scale.   type: integer nullable **keyword_has_data**: Will return `false` if the keyword is still processing and no SERP has been fetched yet.   type: boolean **keyword_is_frozen**: Indicates whether a keyword has exceeded the tracked keywords limit on your plan. Such keywords are "frozen", meaning they do not have their rankings updated.   type: boolean **language**: The SERP language that a given keyword is being tracked for.   type: string **location**: The location (country, state/province, or city) that a given keyword is being tracked in.   type: string **serp_features**: The SERP features that appear in search results for a keyword.   type: array(string)   enum: `"paid_top"` `"paid_bottom"` `"paid_right"` `"paid_sitelink"` `"organic"` `"sitelink"` `"snippet"` `"image"` `"article"` `"knowledge_card"` `"knowledge_panel"` `"local_pack"` `"local_teaser"` `"news"` `"question"` `"review"` `"shopping"` `"tweet"` `"spelling"` `"video"` `"discussion"` `"ai_overview"` `"ai_overview_sitelink"` `"organic_shopping"` `"image_th"` `"video_th"` `"ai_overview_found"` **serp_updated**: The date when we last checked search engine results for a keyword.   type: datetime nullable **tags**: A list of tags assigned to a given keyword.   type: array(string) **volume**: An estimation of the average monthly number of searches for a keyword over the latest month or over the latest known 12 months of data depending on the "volume_mode" parameter.   type: integer nullable  |
| `device` | string ("desktop" | "mobile") | Yes | Choose between mobile and desktop rankings. |
| `offset` | integer | No | [Deprecated on 31 May 2024]. |
| `output` | string ("json" | "csv" | "xml" | "php") | No | The output format. |
| `select` | string | Yes | A comma-separated list of columns to return. See response schema for valid column identifiers.  |
| `timeout` | integer | No | A manual timeout duration in seconds. |
| `order_by` | string | No | A column to order results by. See response schema for valid column identifiers.  |
| `project_id` | integer | Yes | The unique identifier of the project. You can find it in the URL of your Rank Tracker project in Ahrefs: `https://app.ahrefs.com/rank-tracker/overview/#project_id#`  |
| `volume_mode` | string ("monthly" | "average") | No | The search volume calculation mode: monthly or average. It affects volume, traffic, and traffic value.  |
| `date_compared` | string | No | A date to compare metrics with in YYYY-MM-DD format. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Fetch rank tracker overview

**Slug:** `AHREFS_FETCH_RANK_TRACKER_OVERVIEW`

The GetRankTrackerOverview endpoint retrieves a comprehensive summary of keyword rankings and SEO performance data from Ahrefs' Rank Tracker tool. It provides a high-level overview of a website's ranking positions, SERP features, and performance against competitors across multiple search engines and countries. This endpoint is ideal for quickly assessing the overall SEO health and progress of a website without delving into specific keyword details. It should be used when you need a snapshot of your SEO performance or to track changes in your overall ranking landscape over time. Note that while this overview gives a broad picture, it may not include in-depth data for individual keywords or specific SERP features.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `date` | string | Yes | A date to report metrics on in YYYY-MM-DD format. |
| `limit` | integer | No | The number of results to return. |
| `where` | string | No | The filter expression. The following column identifiers are recognized (this differs from the identifiers recognized by the `select` parameter). **best_position_has_thumbnail**: The top position has a thumbnail.   type: boolean nullable **best_position_has_thumbnail_previous**: The top position has a thumbnail on the comparison date.   type: boolean nullable **best_position_has_video_preview**: The top position has a video preview.   type: boolean nullable **best_position_has_video_preview_previous**: The top position has a video preview on the comparison date.   type: boolean nullable **best_position_kind**: The kind of the top position: organic, paid, or a SERP feature.   type: string nullable   enum: `"paid_top"` `"paid_bottom"` `"paid_right"` `"paid_sitelink"` `"organic"` `"sitelink"` `"snippet"` `"image"` `"article"` `"knowledge_card"` `"knowledge_panel"` `"local_pack"` `"local_teaser"` `"news"` `"question"` `"review"` `"shopping"` `"tweet"` `"spelling"` `"video"` `"discussion"` `"ai_overview"` `"ai_overview_sitelink"` `"organic_shopping"` **best_position_kind_previous**: The kind of the top position on the comparison date.   type: string nullable   enum: `"paid_top"` `"paid_bottom"` `"paid_right"` `"paid_sitelink"` `"organic"` `"sitelink"` `"snippet"` `"image"` `"article"` `"knowledge_card"` `"knowledge_panel"` `"local_pack"` `"local_teaser"` `"news"` `"question"` `"review"` `"shopping"` `"tweet"` `"spelling"` `"video"` `"discussion"` `"ai_overview"` `"ai_overview_sitelink"` `"organic_shopping"` **clicks**: Clicks metric refers to the average monthly number of clicks on the search results that people make while searching for the target keyword. Some searches generate clicks on multiple results, while others might not end in any clicks at all.   type: integer nullable **clicks_per_search**: Clicks Per Search is the ratio of Clicks to Keyword Search volume. It shows how many different search results get clicked, on average, when people search for the target keyword in a given country.   type: float nullable **cost_per_click**: Cost Per Click shows the average price that advertisers pay for each ad click in paid search results for a keyword.   type: integer nullable **country**: The country that a given keyword is being tracked in. A two-letter country code (ISO 3166-1 alpha-2).   type: string   enum: `"AD"` `"AE"` `"AF"` `"AG"` `"AI"` `"AL"` `"AM"` `"AO"` `"AQ"` `"AR"` `"AS"` `"AT"` `"AU"` `"AW"` `"AX"` `"AZ"` `"BA"` `"BB"` `"BD"` `"BE"` `"BF"` `"BG"` `"BH"` `"BI"` `"BJ"` `"BL"` `"BM"` `"BN"` `"BO"` `"BQ"` `"BR"` `"BS"` `"BT"` `"BV"` `"BW"` `"BY"` `"BZ"` `"CA"` `"CC"` `"CD"` `"CF"` `"CG"` `"CH"` `"CI"` `"CK"` `"CL"` `"CM"` `"CN"` `"CO"` `"CR"` `"CU"` `"CV"` `"CW"` `"CX"` `"CY"` `"CZ"` `"DE"` `"DJ"` `"DK"` `"DM"` `"DO"` `"DZ"` `"EC"` `"EE"` `"EG"` `"EH"` `"ER"` `"ES"` `"ET"` `"FI"` `"FJ"` `"FK"` `"FM"` `"FO"` `"FR"` `"GA"` `"GB"` `"GD"` `"GE"` `"GF"` `"GG"` `"GH"` `"GI"` `"GL"` `"GM"` `"GN"` `"GP"` `"GQ"` `"GR"` `"GS"` `"GT"` `"GU"` `"GW"` `"GY"` `"HK"` `"HM"` `"HN"` `"HR"` `"HT"` `"HU"` `"ID"` `"IE"` `"IL"` `"IM"` `"IN"` `"IO"` `"IQ"` `"IR"` `"IS"` `"IT"` `"JE"` `"JM"` `"JO"` `"JP"` `"KE"` `"KG"` `"KH"` `"KI"` `"KM"` `"KN"` `"KP"` `"KR"` `"KW"` `"KY"` `"KZ"` `"LA"` `"LB"` `"LC"` `"LI"` `"LK"` `"LR"` `"LS"` `"LT"` `"LU"` `"LV"` `"LY"` `"MA"` `"MC"` `"MD"` `"ME"` `"MF"` `"MG"` `"MH"` `"MK"` `"ML"` `"MM"` `"MN"` `"MO"` `"MP"` `"MQ"` `"MR"` `"MS"` `"MT"` `"MU"` `"MV"` `"MW"` `"MX"` `"MY"` `"MZ"` `"NA"` `"NC"` `"NE"` `"NF"` `"NG"` `"NI"` `"NL"` `"NO"` `"NP"` `"NR"` `"NU"` `"NZ"` `"OM"` `"OTHER"` `"PA"` `"PE"` `"PF"` `"PG"` `"PH"` `"PK"` `"PL"` `"PM"` `"PN"` `"PR"` `"PS"` `"PT"` `"PW"` `"PY"` `"QA"` `"RE"` `"RO"` `"RS"` `"RU"` `"RW"` `"SA"` `"SB"` `"SC"` `"SD"` `"SE"` `"SG"` `"SH"` `"SI"` `"SJ"` `"SK"` `"SL"` `"SM"` `"SN"` `"SO"` `"SR"` `"SS"` `"ST"` `"SV"` `"SX"` `"SY"` `"SZ"` `"TC"` `"TD"` `"TF"` `"TG"` `"TH"` `"TJ"` `"TK"` `"TL"` `"TM"` `"TN"` `"TO"` `"TR"` `"TT"` `"TV"` `"TW"` `"TZ"` `"UA"` `"UG"` `"UM"` `"US"` `"UY"` `"UZ"` `"VA"` `"VC"` `"VE"` `"VG"` `"VI"` `"VN"` `"VU"` `"WF"` `"WS"` `"YE"` `"YT"` `"ZA"` `"ZM"` `"ZW"` **country_prev**: The country that a given keyword is being tracked in on the comparison date. A two-letter country code (ISO 3166-1 alpha-2).   type: string   enum: `"AD"` `"AE"` `"AF"` `"AG"` `"AI"` `"AL"` `"AM"` `"AO"` `"AQ"` `"AR"` `"AS"` `"AT"` `"AU"` `"AW"` `"AX"` `"AZ"` `"BA"` `"BB"` `"BD"` `"BE"` `"BF"` `"BG"` `"BH"` `"BI"` `"BJ"` `"BL"` `"BM"` `"BN"` `"BO"` `"BQ"` `"BR"` `"BS"` `"BT"` `"BV"` `"BW"` `"BY"` `"BZ"` `"CA"` `"CC"` `"CD"` `"CF"` `"CG"` `"CH"` `"CI"` `"CK"` `"CL"` `"CM"` `"CN"` `"CO"` `"CR"` `"CU"` `"CV"` `"CW"` `"CX"` `"CY"` `"CZ"` `"DE"` `"DJ"` `"DK"` `"DM"` `"DO"` `"DZ"` `"EC"` `"EE"` `"EG"` `"EH"` `"ER"` `"ES"` `"ET"` `"FI"` `"FJ"` `"FK"` `"FM"` `"FO"` `"FR"` `"GA"` `"GB"` `"GD"` `"GE"` `"GF"` `"GG"` `"GH"` `"GI"` `"GL"` `"GM"` `"GN"` `"GP"` `"GQ"` `"GR"` `"GS"` `"GT"` `"GU"` `"GW"` `"GY"` `"HK"` `"HM"` `"HN"` `"HR"` `"HT"` `"HU"` `"ID"` `"IE"` `"IL"` `"IM"` `"IN"` `"IO"` `"IQ"` `"IR"` `"IS"` `"IT"` `"JE"` `"JM"` `"JO"` `"JP"` `"KE"` `"KG"` `"KH"` `"KI"` `"KM"` `"KN"` `"KP"` `"KR"` `"KW"` `"KY"` `"KZ"` `"LA"` `"LB"` `"LC"` `"LI"` `"LK"` `"LR"` `"LS"` `"LT"` `"LU"` `"LV"` `"LY"` `"MA"` `"MC"` `"MD"` `"ME"` `"MF"` `"MG"` `"MH"` `"MK"` `"ML"` `"MM"` `"MN"` `"MO"` `"MP"` `"MQ"` `"MR"` `"MS"` `"MT"` `"MU"` `"MV"` `"MW"` `"MX"` `"MY"` `"MZ"` `"NA"` `"NC"` `"NE"` `"NF"` `"NG"` `"NI"` `"NL"` `"NO"` `"NP"` `"NR"` `"NU"` `"NZ"` `"OM"` `"OTHER"` `"PA"` `"PE"` `"PF"` `"PG"` `"PH"` `"PK"` `"PL"` `"PM"` `"PN"` `"PR"` `"PS"` `"PT"` `"PW"` `"PY"` `"QA"` `"RE"` `"RO"` `"RS"` `"RU"` `"RW"` `"SA"` `"SB"` `"SC"` `"SD"` `"SE"` `"SG"` `"SH"` `"SI"` `"SJ"` `"SK"` `"SL"` `"SM"` `"SN"` `"SO"` `"SR"` `"SS"` `"ST"` `"SV"` `"SX"` `"SY"` `"SZ"` `"TC"` `"TD"` `"TF"` `"TG"` `"TH"` `"TJ"` `"TK"` `"TL"` `"TM"` `"TN"` `"TO"` `"TR"` `"TT"` `"TV"` `"TW"` `"TZ"` `"UA"` `"UG"` `"UM"` `"US"` `"UY"` `"UZ"` `"VA"` `"VC"` `"VE"` `"VG"` `"VI"` `"VN"` `"VU"` `"WF"` `"WS"` `"YE"` `"YT"` `"ZA"` `"ZM"` `"ZW"` **is_main_position**: Excludes positions in Sitelinks, Top stories, Image packs, and posts on X (Twitter).   type: boolean **is_main_position_prev**: Excludes positions in Sitelinks, Top stories, Image packs, and posts on X (Twitter) on the comparison date.   type: boolean **keyword**: The keyword your target ranks for.   type: string **keyword_difficulty**: An estimation of how hard it is to rank in the top 10 organic search results for a keyword on a 100-point scale.   type: integer nullable **keyword_has_data**: Will return `false` if the keyword is still processing and no SERP has been fetched yet.   type: boolean **keyword_is_frozen**: Indicates whether a keyword has exceeded the tracked keywords limit on your plan. Such keywords are "frozen", meaning they do not have their rankings updated.   type: boolean **keyword_prev**: The keyword your target ranks for on the comparison date.   type: string **keyword_words**: The number of words in a keyword.   type: integer **keyword_words_prev**: The number of words in a keyword on the comparison date.   type: integer **language**: The SERP language that a given keyword is being tracked for.   type: string **language_prev**: The SERP language on the comparison date.   type: string **location**: The location (country, state/province, or city) that a given keyword is being tracked in.   type: string **location_prev**: The location (country, state/province, or city) that a given keyword is being tracked in on the comparison date.   type: string **parent_topic**: Parent Topic determines if you can rank for your target keyword while targeting a more general topic on your page instead.  To identify the Parent Topic, we take the #1 ranking page for your keyword and find the keyword responsible for sending the most traffic to that page.   type: string nullable **position**: The top position your target ranks for in the organic search results for a keyword.   type: integer nullable **position_diff**: The change in position between your selected dates.   type: integer nullable **position_prev**: The top position on the comparison date.   type: integer nullable **search_type_image**: Search type Image shows the percentage of searches for a keyword made for images, highlighting interest in visual content.   type: float nullable **search_type_news**: Search type News shows the percentage of searches for a keyword made for news articles.   type: float nullable **search_type_video**: Search type Video shows the percentage of searches for a keyword made for video, reflecting interest in video content.   type: float nullable **search_type_web**: Search type Web shows the percentage of searches for a keyword made for general web content, indicating interest in a wide range of information.   type: float nullable **serp_features**: The SERP features that appear in search results for a keyword.   type: array(string)   enum: `"paid_top"` `"paid_bottom"` `"paid_right"` `"paid_sitelink"` `"organic"` `"sitelink"` `"snippet"` `"image"` `"article"` `"knowledge_card"` `"knowledge_panel"` `"local_pack"` `"local_teaser"` `"news"` `"question"` `"review"` `"shopping"` `"tweet"` `"spelling"` `"video"` `"discussion"` `"ai_overview"` `"ai_overview_sitelink"` `"organic_shopping"` `"image_th"` `"video_th"` `"ai_overview_found"` **serp_updated**: The date when we last checked search engine results for a keyword.   type: datetime nullable **serp_updated_prev**: The date when we checked search engine results up to the comparison date.   type: datetime nullable **tags**: A list of tags assigned to a given keyword.   type: array(string) **tags_prev**: A list of tags assigned to a given keyword on the comparison date.   type: array(string) **target_positions_count**: The number of target URLs ranking for a keyword.   type: integer **traffic**: An estimation of the number of monthly visits that a page gets from organic search over the latest month or over the latest known 12 months of data depending on the "volume_mode" parameter.   type: integer nullable **traffic_diff**: The change in traffic between your selected dates.   type: integer nullable **traffic_prev**: An estimation of the number of monthly visits that a page gets from organic search over the latest month or over the latest known 12 months of data depending on the "volume_mode" parameter.   type: integer nullable **url**: The top ranking URL in organic search results for a given keyword.   type: string nullable **url_prev**: The top ranking URL in organic search results for a given keyword on the comparison date.   type: string nullable **volume**: An estimation of the average monthly number of searches for a keyword over the latest month or over the latest known 12 months of data depending on the "volume_mode" parameter.   type: integer nullable  |
| `device` | string ("desktop" | "mobile") | Yes | Choose between mobile and desktop rankings. |
| `offset` | integer | No | [Deprecated on 31 May 2024]. |
| `output` | string ("json" | "csv" | "xml" | "php") | No | The output format. |
| `select` | string | Yes | A comma-separated list of columns to return. See response schema for valid column identifiers.  |
| `timeout` | integer | No | A manual timeout duration in seconds. |
| `order_by` | string | No | A column to order results by. See response schema for valid column identifiers.  |
| `project_id` | integer | Yes | The unique identifier of the project. You can find it in the URL of your Rank Tracker project in Ahrefs: `https://app.ahrefs.com/rank-tracker/overview/#project_id#`  |
| `volume_mode` | string ("monthly" | "average") | No | The search volume calculation mode: monthly or average. It affects volume, traffic, and traffic value.  |
| `date_compared` | string | No | A date to compare metrics with in YYYY-MM-DD format. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Fetch site explorer referring domains

**Slug:** `AHREFS_FETCH_SITE_EXPLORER_REFERRING_DOMAINS`

Retrieves a list of domains that have backlinks pointing to a specified target website. This endpoint is essential for conducting comprehensive backlink analysis, allowing users to identify and evaluate the sources of incoming links to their website. It provides valuable data for assessing the strength and quality of a site's backlink profile, which is crucial for SEO strategies and competitor analysis. The endpoint returns detailed information about each referring domain, likely including metrics such as Domain Rating (DR), number of backlinks, and first seen date. It should be used when analyzing a website's backlink structure, identifying potential link-building opportunities, or auditing the quality of incoming links. Note that while this endpoint provides aggregate data about referring domains, it does not offer specifics about individual backlinks or anchor texts.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `mode` | string ("exact" | "prefix" | "domain" | "subdomains") | No | The scope of the search based on the target you entered. |
| `limit` | integer | No | The number of results to return. |
| `where` | string | No | The filter expression. The following column identifiers are recognized (this differs from the identifiers recognized by the `select` parameter). **anchor**: The clickable words in a link that point to a URL.   type: string **discovered_status**: The reason the link was discovered during the last crawl: the page was crawled for the first time, the link was added to the page, or the link re-appeared after being removed.   type: string nullable   enum: `"pagefound"` `"linkfound"` `"linkrestored"` **dofollow_linked_domains**: The number of unique root domains with dofollow links linked from the referring domain.   type: integer **dofollow_links**: The number of links from the referring domain to your target that don"t have the "nofollow" attribute.   type: integer **dofollow_refdomains** (5 units): The number of unique domains with dofollow links to the referring domain.   type: integer **domain**: A referring domain that has at least one link to your target.   type: string **domain_rating**: The strength of a domain"s backlink profile compared to the others in our database on a 100-point scale.   type: float **drop_reason**: The reason we removed the link from our index.   type: string nullable   enum: `"manual"` `"noratingunused"` `"notop"` `"tooold"` `"oldunavailable"` `"rescursive"` `"duplicate"` `"nxdomain"` `"malformed"` `"blockedport"` `"disallowed"` `"unlinked"` **first_seen**: The date we first found a backlink to your target from the referring domain.   type: datetime **ip_source**: The referring domain IP address.   type: string nullable **is_content**: The link was found in the biggest piece of content on the page.   type: boolean **is_dofollow**: The link has no special nofollow attribute.   type: boolean **is_homepage_link**: The link was found on the homepage of a referring website.   type: boolean **is_nofollow**: The link or the referring page has the nofollow attribute set.   type: boolean **is_non_html**: The link points to a URL with non-HTML content.   type: boolean **is_root_domain**: The domain name is a root domain name.   type: boolean **is_sponsored**: The link has the Sponsored attribute set in the referring page HTML.   type: boolean **is_ugc**: The link has the User Generated Content attribute set in the referring page HTML.   type: boolean **languages**: The languages listed in the referring page metadata or detected by the crawler to appear in the HTML.   type: array(string) **last_seen**: The date your target lost its last live backlink for the referring domain.   type: datetime nullable **len_url_redirect**: The number of redirect chain URLs.   type: integer **link_type**: The kind of the backlink.   type: string   enum: `"redirect"` `"frame"` `"text"` `"form"` `"canonical"` `"alternate"` `"rss"` `"image"` **linked_domains**: The number of unique root domains linked from the referring page.   type: integer **links_external**: The number of external links from the referring page.   type: integer **links_to_target**: The number of backlinks from the referring domain to your target.   type: integer **lost_links**: The number of backlinks lost from the referring domain for the selected time period.   type: integer **lost_reason**: The reason the link was lost during the last crawl.   type: string nullable   enum: `"removedfromhtml"` `"notcanonical"` `"noindex"` `"pageredirected"` `"pageerror"` `"lostredirect"` `"notfound"` **new_links**: The number of new backlinks found from the referring domain for the selected time period.   type: integer **noindex**: The referring page has the noindex meta attribute.   type: boolean **port_source**: The network port of the referring page URL.   type: integer **port_target**: The network port of the target page URL.   type: integer **positions**: The number of keywords that the referring page ranks for in the top 100 positions.   type: integer **positions_source_domain**: The number of keywords that the referring domain ranks for in the top 100 positions.   type: integer **powered_by**: Web technologies used to build and serve the referring page content.   type: array(string) **refdomains** (5 units): The number of unique referring domains linking to the referring page.   type: integer **root_domain_name**: The root domain name of the referring domain, not including subdomains.   type: string **snippet_left**: The snippet of text appearing just before the link.   type: string **snippet_right**: The snippet of text appearing just after the link.   type: string **source_page_author**: The author of the referring page.   type: string nullable **title**: The html title of the referring page.   type: string **traffic_domain** (10 units): The referring domain"s estimated monthly organic traffic from search.   type: integer **traffic_page** (10 units): The referring page"s estimated monthly organic traffic from search.   type: integer **url_from**: The URL of the page containing a link to your target.   type: string **url_redirect**: A redirect chain the target URL of the link points to.   type: array(url) **url_redirect_with_target**: The target URL of the link with its redirect chain.   type: array(string) **url_to**: The URL the backlink points to.   type: string  |
| `offset` | integer | No | [Deprecated on 31 May 2024]. |
| `output` | string ("json" | "csv" | "xml" | "php") | No | The output format. |
| `select` | string | Yes | A comma-separated list of columns to return. See response schema for valid column identifiers.  |
| `target` | string | Yes | The target of the search: a domain or a URL. |
| `history` | string | No | A time frame to add lost backlinks to the report. Choose between `live` (no history), `since:<date>` (history since a specified date), and `all_time` (full history). The date should be in YYYY-MM-DD format.  |
| `timeout` | integer | No | A manual timeout duration in seconds. |
| `order_by` | string | No | A column to order results by. See response schema for valid column identifiers.  |
| `protocol` | string ("both" | "http" | "https") | No | The protocol of your target. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Fetch total search volume history

**Slug:** `AHREFS_FETCH_TOTAL_SEARCH_VOLUME_HISTORY`

Retrieves the historical total search volume data for specified keywords using Ahrefs' Site Explorer tool. This endpoint allows users to track and analyze the search popularity trends of specific terms over time, which is crucial for SEO strategy and content planning. It provides aggregated search volume data, helping users understand seasonal trends, overall interest changes, and compare different keywords' performance. The tool is particularly useful for identifying trending topics, planning content calendars, and making data-driven decisions in digital marketing campaigns. However, it's important to note that the data represents past trends and should be used in conjunction with other metrics for comprehensive SEO analysis.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `mode` | string ("exact" | "prefix" | "domain" | "subdomains") | No | The scope of the search based on the target you entered. |
| `output` | string ("json" | "csv" | "xml" | "php") | No | The output format. |
| `target` | string | Yes | The target of the search: a domain or a URL. |
| `country` | string ("ad" | "ae" | "af" | "ag" | "ai" | "al" | "am" | "ao" | "ar" | "as" | "at" | "au" | "aw" | "az" | "ba" | "bb" | "bd" | "be" | "bf" | "bg" | "bh" | "bi" | "bj" | "bn" | "bo" | "br" | "bs" | "bt" | "bw" | "by" | "bz" | "ca" | "cd" | "cf" | "cg" | "ch" | "ci" | "ck" | "cl" | "cm" | "cn" | "co" | "cr" | "cu" | "cv" | "cy" | "cz" | "de" | "dj" | "dk" | "dm" | "do" | "dz" | "ec" | "ee" | "eg" | "es" | "et" | "fi" | "fj" | "fm" | "fo" | "fr" | "ga" | "gb" | "gd" | "ge" | "gf" | "gg" | "gh" | "gi" | "gl" | "gm" | "gn" | "gp" | "gq" | "gr" | "gt" | "gu" | "gy" | "hk" | "hn" | "hr" | "ht" | "hu" | "id" | "ie" | "il" | "im" | "in" | "iq" | "is" | "it" | "je" | "jm" | "jo" | "jp" | "ke" | "kg" | "kh" | "ki" | "kn" | "kr" | "kw" | "ky" | "kz" | "la" | "lb" | "lc" | "li" | "lk" | "ls" | "lt" | "lu" | "lv" | "ly" | "ma" | "mc" | "md" | "me" | "mg" | "mk" | "ml" | "mm" | "mn" | "mq" | "mr" | "ms" | "mt" | "mu" | "mv" | "mw" | "mx" | "my" | "mz" | "na" | "nc" | "ne" | "ng" | "ni" | "nl" | "no" | "np" | "nr" | "nu" | "nz" | "om" | "pa" | "pe" | "pf" | "pg" | "ph" | "pk" | "pl" | "pn" | "pr" | "ps" | "pt" | "py" | "qa" | "re" | "ro" | "rs" | "ru" | "rw" | "sa" | "sb" | "sc" | "se" | "sg" | "sh" | "si" | "sk" | "sl" | "sm" | "sn" | "so" | "sr" | "st" | "sv" | "td" | "tg" | "th" | "tj" | "tk" | "tl" | "tm" | "tn" | "to" | "tr" | "tt" | "tw" | "tz" | "ua" | "ug" | "us" | "uy" | "uz" | "vc" | "ve" | "vg" | "vi" | "vn" | "vu" | "ws" | "ye" | "yt" | "za" | "zm" | "zw") | No | A two-letter country code (ISO 3166-1 alpha-2). |
| `date_to` | string | No | The end date of the historical period in YYYY-MM-DD format. |
| `protocol` | string ("both" | "http" | "https") | No | The protocol of your target. |
| `date_from` | string | Yes | The start date of the historical period in YYYY-MM-DD format. |
| `volume_mode` | string ("monthly" | "average") | No | The search volume calculation mode: monthly or average. It affects volume, traffic, and traffic value.  |
| `top_positions` | string ("top_10" | "top_100") | No | The number of top organic search positions to consider when calculating total search volume.  |
| `history_grouping` | string ("daily" | "weekly" | "monthly") | No | The time interval used to group historical data. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get serp overview

**Slug:** `AHREFS_GET_SERP_OVERVIEW`

Retrieves a comprehensive overview of Search Engine Results Pages (SERP) data for specified keywords or queries. This endpoint provides valuable insights into search performance, including historical data, search intent analysis, and detailed metrics for each keyword. It's particularly useful for SEO professionals and digital marketers looking to optimize their content strategy and improve their website's search engine visibility. The SERP Overview can help identify trends, analyze competition, and inform content creation efforts based on real search data. Note that while this endpoint offers a wealth of information, it may not provide real-time data and should be used for strategic planning rather than immediate tactical decisions.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `date` | string | No | A timestamp on which the last available SERP Overview is returned in YYYY-MM-DDThh:mm:ss format. If it is not specified, the most recent SERP Overview is returned.  |
| `output` | string ("json" | "csv" | "xml" | "php") | No | The output format. |
| `select` | string | Yes | A comma-separated list of columns to return. See response schema for valid column identifiers.  |
| `country` | string ("ad" | "ae" | "af" | "ag" | "ai" | "al" | "am" | "ao" | "ar" | "as" | "at" | "au" | "aw" | "az" | "ba" | "bb" | "bd" | "be" | "bf" | "bg" | "bh" | "bi" | "bj" | "bn" | "bo" | "br" | "bs" | "bt" | "bw" | "by" | "bz" | "ca" | "cd" | "cf" | "cg" | "ch" | "ci" | "ck" | "cl" | "cm" | "cn" | "co" | "cr" | "cu" | "cv" | "cy" | "cz" | "de" | "dj" | "dk" | "dm" | "do" | "dz" | "ec" | "ee" | "eg" | "es" | "et" | "fi" | "fj" | "fm" | "fo" | "fr" | "ga" | "gb" | "gd" | "ge" | "gf" | "gg" | "gh" | "gi" | "gl" | "gm" | "gn" | "gp" | "gq" | "gr" | "gt" | "gu" | "gy" | "hk" | "hn" | "hr" | "ht" | "hu" | "id" | "ie" | "il" | "im" | "in" | "iq" | "is" | "it" | "je" | "jm" | "jo" | "jp" | "ke" | "kg" | "kh" | "ki" | "kn" | "kr" | "kw" | "ky" | "kz" | "la" | "lb" | "lc" | "li" | "lk" | "ls" | "lt" | "lu" | "lv" | "ly" | "ma" | "mc" | "md" | "me" | "mg" | "mk" | "ml" | "mm" | "mn" | "mq" | "mr" | "ms" | "mt" | "mu" | "mv" | "mw" | "mx" | "my" | "mz" | "na" | "nc" | "ne" | "ng" | "ni" | "nl" | "no" | "np" | "nr" | "nu" | "nz" | "om" | "pa" | "pe" | "pf" | "pg" | "ph" | "pk" | "pl" | "pn" | "pr" | "ps" | "pt" | "py" | "qa" | "re" | "ro" | "rs" | "ru" | "rw" | "sa" | "sb" | "sc" | "se" | "sg" | "sh" | "si" | "sk" | "sl" | "sm" | "sn" | "so" | "sr" | "st" | "sv" | "td" | "tg" | "th" | "tj" | "tk" | "tl" | "tm" | "tn" | "to" | "tr" | "tt" | "tw" | "tz" | "ua" | "ug" | "us" | "uy" | "uz" | "vc" | "ve" | "vg" | "vi" | "vn" | "vu" | "ws" | "ye" | "yt" | "za" | "zm" | "zw") | Yes | A two-letter country code (ISO 3166-1 alpha-2). |
| `keyword` | string | Yes | The keyword to return SERP Overview for. |
| `top_positions` | integer | No | The number of top organic SERP positions to return. If not specified, all available positions will be returned.  |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get site audit projects

**Slug:** `AHREFS_GET_SITE_AUDIT_PROJECTS`

Retrieves a list of Site Audit projects associated with the authenticated Ahrefs account. This endpoint allows users to access and manage their Site Audit projects, which are essential for identifying technical and on-page SEO issues across websites. It should be used when you need an overview of all Site Audit projects or want to check the status of ongoing audits. The endpoint likely returns project details such as project names, URLs being audited, last audit dates, and overall health scores. Keep in mind that while this endpoint provides a list of projects, it does not include the detailed audit results for each project; separate API calls would be needed to fetch specific project data.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `output` | string ("json" | "csv" | "xml" | "php") | No | The output format. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get site explorer country metrics

**Slug:** `AHREFS_GET_SITE_EXPLORER_COUNTRY_METRICS`

Retrieves country-specific Site Explorer metrics for a given website from Ahrefs. This endpoint provides valuable insights into a website's performance across different countries, including data on organic traffic, keyword rankings, and backlink profiles. It's particularly useful for analyzing international SEO performance, identifying strong markets, and uncovering opportunities for global expansion. The tool returns a list of countries with their respective SEO metrics, helping users understand how their website performs in various geographical regions. Note that the specific metrics returned may vary based on the Ahrefs plan and data availability for the target website.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `date` | string | Yes | A date to report metrics on in YYYY-MM-DD format. |
| `mode` | string ("exact" | "prefix" | "domain" | "subdomains") | No | The scope of the search based on the target you entered. |
| `limit` | integer | No | The number of results to return. |
| `output` | string ("json" | "csv" | "xml" | "php") | No | The output format. |
| `target` | string | Yes | The target of the search: a domain or a URL. |
| `protocol` | string ("both" | "http" | "https") | No | The protocol of your target. |
| `volume_mode` | string ("monthly" | "average") | No | The search volume calculation mode: monthly or average. It affects volume, traffic, and traffic value.  |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get site explorer linked anchors external

**Slug:** `AHREFS_GET_SITE_EXPLORER_LINKED_ANCHORS_EXTERNAL`

The site-explorer-linked-anchors-external endpoint retrieves data about external anchor texts linking to a specified target website. This tool is essential for analyzing the backlink profile of a domain, understanding the context in which other sites are linking to it, and identifying potential SEO opportunities or issues. It provides insights into the most common anchor texts used in external links, which can help in assessing the website's perceived topical relevance and authority. Use this endpoint when you need to analyze the external link profile of a website, conduct competitor research, or identify potential link-building opportunities. Note that this tool focuses solely on external links and does not provide information about internal linking structures or other on-page SEO factors.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `mode` | string ("exact" | "prefix" | "domain" | "subdomains") | No | The scope of the search based on the target you entered. |
| `limit` | integer | No | The number of results to return. |
| `where` | string | No | The filter expression. The following column identifiers are recognized (this differs from the identifiers recognized by the `select` parameter). **anchor**: The clickable words in a link that point to a URL.   type: string **dofollow_links**: The number of outbound links with a given anchor from your target that don’t have the “nofollow” attribute.   type: integer **domain**: A linked domain that has at least one link from your target with a given anchor.   type: string **domain_rating**: The strength of a domain"s backlink profile compared to the others in our database on a 100-point scale.   type: float **first_seen**: The date we first found a link with a given anchor on your target.   type: datetime **is_content**: The link was found in the biggest piece of content on the page.   type: boolean **is_dofollow**: The link has no special nofollow attribute.   type: boolean **is_nofollow**: The link or the referring page has the nofollow attribute set.   type: boolean **is_non_html**: The link points to a URL with non-HTML content.   type: boolean **is_sponsored**: The link has the Sponsored attribute set in the referring page HTML.   type: boolean **is_ugc**: The link has the User Generated Content attribute set in the referring page HTML.   type: boolean **languages**: The languages listed in the referring page metadata or detected by the crawler to appear in the HTML.   type: array(string) **len_url_redirect**: The number of redirect chain URLs.   type: integer **link_type**: The kind of the backlink.   type: string   enum: `"redirect"` `"frame"` `"text"` `"form"` `"canonical"` `"alternate"` `"rss"` `"image"` **linked_domains**: The number of unique domains linked from your target with a given anchor.   type: integer **linked_domains_source**: The number of unique root domains linked from the source page.   type: integer **linked_pages**: The number of unique pages linked from your target with a given anchor.   type: integer **links_external**: The number of external links from the referring page.   type: integer **links_from_target**: The number of outbound links your target has with a given anchor.   type: integer **port_source**: The network port of the referring page URL.   type: integer **port_target**: The network port of the target page URL.   type: integer **positions**: The number of keywords that the referring page ranks for in the top 100 positions.   type: integer **powered_by**: Web technologies used to build and serve the referring page content.   type: array(string) **refdomains_source** (5 units): The number of unique referring domains linking to the referring page.   type: integer **snippet_left**: The snippet of text appearing just before the link.   type: string **snippet_right**: The snippet of text appearing just after the link.   type: string **title**: The html title of the referring page.   type: string **traffic_page** (10 units): The referring page"s estimated monthly organic traffic from search.   type: integer **url_from**: The URL of the page containing a link to your target.   type: string **url_redirect**: A redirect chain the target URL of the link points to.   type: array(url) **url_redirect_with_target**: The target URL of the link with its redirect chain.   type: array(string) **url_to**: The URL the backlink points to.   type: string  |
| `offset` | integer | No | [Deprecated on 31 May 2024]. |
| `output` | string ("json" | "csv" | "xml" | "php") | No | The output format. |
| `select` | string | Yes | A comma-separated list of columns to return. See response schema for valid column identifiers.  |
| `target` | string | Yes | The target of the search: a domain or a URL. |
| `timeout` | integer | No | A manual timeout duration in seconds. |
| `order_by` | string | No | A column to order results by. See response schema for valid column identifiers.  |
| `protocol` | string ("both" | "http" | "https") | No | The protocol of your target. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get url rating history

**Slug:** `AHREFS_GET_URL_RATING_HISTORY`

Retrieves the historical URL Rating data for a specified URL over time. This endpoint provides insights into how a URL's SEO strength has changed, allowing users to track the impact of their SEO efforts or analyze competitors' URL performance. The URL Rating is a key Ahrefs metric that reflects the strength of a URL based on its backlink profile and other SEO factors. Use this endpoint to visualize URL Rating trends, identify significant changes in a URL's SEO performance, and correlate these changes with specific events or strategies. The data returned is particularly useful for long-term SEO analysis and competitive research.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `output` | string ("json" | "csv" | "xml" | "php") | No | The output format. |
| `target` | string | Yes | The target of the search: a domain or a URL. |
| `date_to` | string | No | The end date of the historical period in YYYY-MM-DD format. |
| `date_from` | string | Yes | The start date of the historical period in YYYY-MM-DD format. |
| `history_grouping` | string ("daily" | "weekly" | "monthly") | No | The time interval used to group historical data. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Linked anchors explorer

**Slug:** `AHREFS_LINKED_ANCHORS_EXPLORER`

Retrieves information about internal linked anchors for a specified website using the Ahrefs API. This endpoint provides data on anchor text used in internal links and the number of outgoing links associated with each anchor. It's particularly useful for analyzing a website's internal linking structure, identifying commonly used anchor texts, and optimizing internal link distribution. The endpoint is part of Ahrefs' Site Explorer tool and helps in understanding the website's hierarchy and content relationships. Each request and result incurs a cost of 1 row, which should be considered when making multiple or large-scale queries.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `mode` | string ("exact" | "prefix" | "domain" | "subdomains") | No | The scope of the search based on the target you entered. |
| `limit` | integer | No | The number of results to return. |
| `where` | string | No | The filter expression. The following column identifiers are recognized (this differs from the identifiers recognized by the `select` parameter). **anchor**: The clickable words in a link that point to a URL.   type: string **dofollow_links**: The number of outbound links with a given anchor from your target that don’t have the “nofollow” attribute.   type: integer **domain**: A linked domain that has at least one link from your target with a given anchor.   type: string **domain_rating**: The strength of a domain"s backlink profile compared to the others in our database on a 100-point scale.   type: float **first_seen**: The date we first found a link with a given anchor on your target.   type: datetime **is_content**: The link was found in the biggest piece of content on the page.   type: boolean **is_dofollow**: The link has no special nofollow attribute.   type: boolean **is_nofollow**: The link or the referring page has the nofollow attribute set.   type: boolean **is_non_html**: The link points to a URL with non-HTML content.   type: boolean **is_sponsored**: The link has the Sponsored attribute set in the referring page HTML.   type: boolean **is_ugc**: The link has the User Generated Content attribute set in the referring page HTML.   type: boolean **languages**: The languages listed in the referring page metadata or detected by the crawler to appear in the HTML.   type: array(string) **len_url_redirect**: The number of redirect chain URLs.   type: integer **link_type**: The kind of the backlink.   type: string   enum: `"redirect"` `"frame"` `"text"` `"form"` `"canonical"` `"alternate"` `"rss"` `"image"` **linked_domains_source**: The number of unique root domains linked from the source page.   type: integer **linked_pages**: The number of unique pages linked from your target with a given anchor.   type: integer **links_external**: The number of external links from the referring page.   type: integer **links_from_target**: The number of outbound links your target has with a given anchor.   type: integer **port_source**: The network port of the referring page URL.   type: integer **port_target**: The network port of the target page URL.   type: integer **positions**: The number of keywords that the referring page ranks for in the top 100 positions.   type: integer **powered_by**: Web technologies used to build and serve the referring page content.   type: array(string) **refdomains_source** (5 units): The number of unique referring domains linking to the referring page.   type: integer **snippet_left**: The snippet of text appearing just before the link.   type: string **snippet_right**: The snippet of text appearing just after the link.   type: string **title**: The html title of the referring page.   type: string **traffic_page** (10 units): The referring page"s estimated monthly organic traffic from search.   type: integer **url_from**: The URL of the page containing a link to your target.   type: string **url_redirect**: A redirect chain the target URL of the link points to.   type: array(url) **url_redirect_with_target**: The target URL of the link with its redirect chain.   type: array(string) **url_to**: The URL the backlink points to.   type: string  |
| `offset` | integer | No | [Deprecated on 31 May 2024]. |
| `output` | string ("json" | "csv" | "xml" | "php") | No | The output format. |
| `select` | string | Yes | A comma-separated list of columns to return. See response schema for valid column identifiers.  |
| `target` | string | Yes | The target of the search: a domain or a URL. |
| `timeout` | integer | No | A manual timeout duration in seconds. |
| `order_by` | string | No | A column to order results by. See response schema for valid column identifiers.  |
| `protocol` | string ("both" | "http" | "https") | No | The protocol of your target. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List best by external links

**Slug:** `AHREFS_LIST_BEST_BY_EXTERNAL_LINKS`

The 'get_best_by_external_links' endpoint retrieves a list of pages from a specified website, ranked by the number of external links pointing to them. This tool is essential for identifying the most authoritative and popular pages on a domain from an external linking perspective. It helps in understanding which content attracts the most backlinks, aiding in content strategy and link building efforts. The endpoint is particularly useful for SEO professionals and digital marketers looking to analyze a website's most valuable pages in terms of external link equity. However, it's important to note that this tool focuses solely on external links and doesn't provide information on internal linking or other SEO metrics.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `mode` | string ("exact" | "prefix" | "domain" | "subdomains") | No | The scope of the search based on the target you entered. |
| `limit` | integer | No | The number of results to return. |
| `where` | string | No | The filter expression. The following column identifiers are recognized (this differs from the identifiers recognized by the `select` parameter). **anchor**: The clickable words in a link that point to a URL.   type: string **dofollow_to_target**: The number of links to your target page that don’t have the “nofollow” attribute.   type: integer **domain_rating_source**: The strength of the referring domain"s backlink profile compared to the others in our database on a 100-point scale.   type: float **first_seen_link**: The date we first found a link to your target.   type: datetime **http_code_source**: The return code from HTTP protocol returned during the referring page crawl.   type: integer **http_code_target**: The return code from HTTP protocol returned during the target page crawl.   type: integer nullable **is_content**: The link was found in the biggest piece of content on the page.   type: boolean **is_dofollow**: The link has no special nofollow attribute.   type: boolean **is_homepage_link**: The link was found on the homepage of a referring website.   type: boolean **is_lost**: The link currently does not exist anymore.   type: boolean **is_new**: The link was discovered on the last crawl.   type: boolean **is_nofollow**: The link or the referring page has the nofollow attribute set.   type: boolean **is_non_html**: The link points to a URL with non-HTML content.   type: boolean **is_root_source**: The referring domain name is a root domain name.   type: boolean **is_sponsored**: The link has the Sponsored attribute set in the referring page HTML.   type: boolean **is_ugc**: The link has the User Generated Content attribute set in the referring page HTML.   type: boolean **languages_source**: The languages listed in the referring page metadata or detected by the crawler to appear in the HTML.   type: array(string) **languages_target**: The languages listed in the target page metadata or detected by the crawler to appear in the HTML.   type: array(string) **last_seen**: The date your target page lost its last live link.   type: datetime nullable **last_visited_source**: The date we last verified a live link to your target page.   type: datetime **last_visited_target**: The date we last crawled your target page.   type: datetime nullable **len_url_redirect**: The number of redirect chain URLs.   type: integer **link_type**: The kind of the backlink.   type: string   enum: `"redirect"` `"frame"` `"text"` `"form"` `"canonical"` `"alternate"` `"rss"` `"image"` **linked_domains_source**: The number of unique root domains linked from the referring page.   type: integer **links_external_source**: The number of external links from the referring page.   type: integer **links_to_target**: The number of inbound backlinks the target page has.   type: integer **lost_links_to_target**: The number of backlinks lost during the selected time period.   type: integer **new_links_to_target**: The number of new backlinks found during the selected time period.   type: integer **nofollow_to_target**: The number of links to your target page that have the “nofollow” attribute.   type: integer **positions_source**: The number of keywords that the referring page ranks for in the top 100 positions.   type: integer **positions_source_domain**: The number of keywords that the referring domain ranks for in the top 100 positions.   type: integer **powered_by_source**: Web technologies used to build and serve the referring page content.   type: array(string) **powered_by_target**: Web technologies used to build and serve the target page content.   type: array(string) **redirects_to_target**: The number of inbound redirects to your target page.   type: integer **refdomains_source** (5 units): The number of unique referring domains linking to the referring page.   type: integer **refdomains_target** (5 units): The number of unique referring domains linking to the target page.   type: integer **root_name_source**: The root domain name of the referring domain, not including subdomains.   type: string **snippet_left**: The snippet of text appearing just before the link.   type: string **snippet_right**: The snippet of text appearing just after the link.   type: string **source_page_author**: The author of the referring page.   type: string nullable **target_redirect**: The target"s redirect if any.   type: string nullable **title_source**: The html title of the referring page.   type: string **title_target**: The html title of the target page.   type: string nullable **top_domain_rating_source**: The highest Domain Rating (DR) counted out of all referring domains. DR shows the strength of a website’s backlink profile compared to the others in our database on a 100-point scale.   type: float **traffic_domain_source** (10 units): The referring domain"s estimated monthly organic traffic from search.   type: integer **traffic_source** (10 units): The referring page"s estimated monthly organic traffic from search.   type: integer **url_from_plain**: The referring page URL optimized for use as a filter.   type: string **url_rating_source**: The strength of the referring page"s backlink profile compared to the others in our database on a 100-point scale.   type: float **url_rating_target**: The strength of the target page"s backlink profile compared to the others in our database on a 100-point scale.   type: float nullable **url_redirect**: A redirect chain the target URL of the link points to.   type: array(url) **url_redirect_with_target**: The target URL of the link with its redirect chain.   type: array(string) **url_to**: The URL the backlink points to.   type: string **url_to_plain**: The target page URL optimized for use as a filter.   type: string  |
| `offset` | integer | No | [Deprecated on 31 May 2024]. |
| `output` | string ("json" | "csv" | "xml" | "php") | No | The output format. |
| `select` | string | Yes | A comma-separated list of columns to return. See response schema for valid column identifiers.  |
| `target` | string | Yes | The target of the search: a domain or a URL. |
| `history` | string | No | A time frame to add lost backlinks to the report. Choose between `live` (no history), `since:<date>` (history since a specified date), and `all_time` (full history). The date should be in YYYY-MM-DD format.  |
| `timeout` | integer | No | A manual timeout duration in seconds. |
| `order_by` | string | No | A column to order results by. See response schema for valid column identifiers.  |
| `protocol` | string ("both" | "http" | "https") | No | The protocol of your target. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Pages by traffic overview

**Slug:** `AHREFS_PAGES_BY_TRAFFIC_OVERVIEW`

Retrieves a list of pages from a specified website, ordered by their estimated organic search traffic. This endpoint is part of the Ahrefs Site Explorer tool and provides valuable insights into which pages on a website are performing well in terms of attracting organic search visitors. It's useful for identifying top-performing content, understanding traffic distribution across a site, and prioritizing optimization efforts. The endpoint returns data such as page URLs, estimated traffic, and other relevant metrics. It's important to note that the traffic data is an estimation based on Ahrefs' algorithms and may not exactly match actual analytics data. This tool is particularly useful for SEO professionals, content strategists, and website owners looking to analyze and improve their site's organic search performance.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `mode` | string ("exact" | "prefix" | "domain" | "subdomains") | No | The scope of the search based on the target you entered. |
| `output` | string ("json" | "csv" | "xml" | "php") | No | The output format. |
| `target` | string | Yes | The target of the search: a domain or a URL. |
| `country` | string ("ad" | "ae" | "af" | "ag" | "ai" | "al" | "am" | "ao" | "ar" | "as" | "at" | "au" | "aw" | "az" | "ba" | "bb" | "bd" | "be" | "bf" | "bg" | "bh" | "bi" | "bj" | "bn" | "bo" | "br" | "bs" | "bt" | "bw" | "by" | "bz" | "ca" | "cd" | "cf" | "cg" | "ch" | "ci" | "ck" | "cl" | "cm" | "cn" | "co" | "cr" | "cu" | "cv" | "cy" | "cz" | "de" | "dj" | "dk" | "dm" | "do" | "dz" | "ec" | "ee" | "eg" | "es" | "et" | "fi" | "fj" | "fm" | "fo" | "fr" | "ga" | "gb" | "gd" | "ge" | "gf" | "gg" | "gh" | "gi" | "gl" | "gm" | "gn" | "gp" | "gq" | "gr" | "gt" | "gu" | "gy" | "hk" | "hn" | "hr" | "ht" | "hu" | "id" | "ie" | "il" | "im" | "in" | "iq" | "is" | "it" | "je" | "jm" | "jo" | "jp" | "ke" | "kg" | "kh" | "ki" | "kn" | "kr" | "kw" | "ky" | "kz" | "la" | "lb" | "lc" | "li" | "lk" | "ls" | "lt" | "lu" | "lv" | "ly" | "ma" | "mc" | "md" | "me" | "mg" | "mk" | "ml" | "mm" | "mn" | "mq" | "mr" | "ms" | "mt" | "mu" | "mv" | "mw" | "mx" | "my" | "mz" | "na" | "nc" | "ne" | "ng" | "ni" | "nl" | "no" | "np" | "nr" | "nu" | "nz" | "om" | "pa" | "pe" | "pf" | "pg" | "ph" | "pk" | "pl" | "pn" | "pr" | "ps" | "pt" | "py" | "qa" | "re" | "ro" | "rs" | "ru" | "rw" | "sa" | "sb" | "sc" | "se" | "sg" | "sh" | "si" | "sk" | "sl" | "sm" | "sn" | "so" | "sr" | "st" | "sv" | "td" | "tg" | "th" | "tj" | "tk" | "tl" | "tm" | "tn" | "to" | "tr" | "tt" | "tw" | "tz" | "ua" | "ug" | "us" | "uy" | "uz" | "vc" | "ve" | "vg" | "vi" | "vn" | "vu" | "ws" | "ye" | "yt" | "za" | "zm" | "zw") | No | A two-letter country code (ISO 3166-1 alpha-2). |
| `protocol` | string ("both" | "http" | "https") | No | The protocol of your target. |
| `volume_mode` | string ("monthly" | "average") | No | The search volume calculation mode: monthly or average. It affects volume, traffic, and traffic value.  |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Retrieve anchor data

**Slug:** `AHREFS_RETRIEVE_ANCHOR_DATA`

Retrieves anchor text data for a specified website or URL using Ahrefs' Site Explorer tool. This endpoint provides valuable insights into the anchor text distribution of backlinks pointing to the target URL or domain. It helps SEO professionals analyze the quality and diversity of anchor texts, which can influence search engine rankings. Use this endpoint when you need to understand how other websites are linking to a specific page or domain, and to identify potential opportunities for link building or anchor text optimization. The tool does not provide information about the linking pages themselves, focusing solely on the anchor text data.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `mode` | string ("exact" | "prefix" | "domain" | "subdomains") | No | The scope of the search based on the target you entered. |
| `limit` | integer | No | The number of results to return. |
| `where` | string | No | The filter expression. The following column identifiers are recognized (this differs from the identifiers recognized by the `select` parameter). **anchor**: The clickable words in a link that point to a URL.   type: string **discovered_status**: The reason the link was discovered during the last crawl: the page was crawled for the first time, the link was added to the page, or the link re-appeared after being removed.   type: string nullable   enum: `"pagefound"` `"linkfound"` `"linkrestored"` **dofollow_links**: The number of links with a given anchor to your target that don"t have the "nofollow" attribute.   type: integer **domain_rating**: The strength of a domain"s backlink profile compared to the others in our database on a 100-point scale.   type: float **drop_reason**: The reason we removed the link from our index.   type: string nullable   enum: `"manual"` `"noratingunused"` `"notop"` `"tooold"` `"oldunavailable"` `"rescursive"` `"duplicate"` `"nxdomain"` `"malformed"` `"blockedport"` `"disallowed"` `"unlinked"` **first_seen**: The date we first found a link with a given anchor to your target.   type: datetime **is_content**: The link was found in the biggest piece of content on the page.   type: boolean **is_dofollow**: The link has no special nofollow attribute.   type: boolean **is_homepage_link**: The link was found on the homepage of a referring website.   type: boolean **is_nofollow**: The link or the referring page has the nofollow attribute set.   type: boolean **is_non_html**: The link points to a URL with non-HTML content.   type: boolean **is_root_domain**: The domain name is a root domain name.   type: boolean **is_sponsored**: The link has the Sponsored attribute set in the referring page HTML.   type: boolean **is_ugc**: The link has the User Generated Content attribute set in the referring page HTML.   type: boolean **languages**: The languages listed in the referring page metadata or detected by the crawler to appear in the HTML.   type: array(string) **last_seen**: The date we discovered the last backlink with a given anchor was lost.   type: datetime nullable **len_url_redirect**: The number of redirect chain URLs.   type: integer **link_type**: The kind of the backlink.   type: string   enum: `"redirect"` `"frame"` `"text"` `"form"` `"canonical"` `"alternate"` `"rss"` `"image"` **linked_domains**: The number of unique root domains linked from the referring page.   type: integer **links_external**: The number of external links from the referring page.   type: integer **links_to_target**: The number of inbound backlinks your target has with a given anchor.   type: integer **lost_links**: The number of backlinks with a given anchor lost during the selected time period.   type: integer **lost_reason**: The reason the link was lost during the last crawl.   type: string nullable   enum: `"removedfromhtml"` `"notcanonical"` `"noindex"` `"pageredirected"` `"pageerror"` `"lostredirect"` `"notfound"` **new_links**: The number of new backlinks with a given anchor found during the selected time period.   type: integer **noindex**: The referring page has the noindex meta attribute.   type: boolean **positions**: The number of keywords that the referring page ranks for in the top 100 positions.   type: integer **positions_source_domain**: The number of keywords that the referring domain ranks for in the top 100 positions.   type: integer **powered_by**: Web technologies used to build and serve the referring page content.   type: array(string) **refdomains** (5 units): The number of unique domains linking to your target with a given anchor.   type: integer **refdomains_source** (5 units): The number of unique referring domains linking to the referring page.   type: integer **refpages**: The number of pages containing a link with a given anchor to your target.   type: integer **root_domain_name**: The root domain name of the referring domain, not including subdomains.   type: string **snippet_left**: The snippet of text appearing just before the link.   type: string **snippet_right**: The snippet of text appearing just after the link.   type: string **source_page_author**: The author of the referring page.   type: string nullable **title**: The html title of the referring page.   type: string **top_domain_rating**: The highest Domain Rating (DR) counted out of all referring domains. DR shows the strength of a website"s backlink profile compared to the others in our database on a 100-point scale.   type: float **traffic_domain** (10 units): The referring domain"s estimated monthly organic traffic from search.   type: integer **traffic_page** (10 units): The referring page"s estimated monthly organic traffic from search.   type: integer **url_from**: The URL of the page containing a link to your target.   type: string **url_redirect**: A redirect chain the target URL of the link points to.   type: array(url) **url_redirect_with_target**: The target URL of the link with its redirect chain.   type: array(string) **url_to**: The URL the backlink points to.   type: string  |
| `offset` | integer | No | [Deprecated on 31 May 2024]. |
| `output` | string ("json" | "csv" | "xml" | "php") | No | The output format. |
| `select` | string | Yes | A comma-separated list of columns to return. See response schema for valid column identifiers.  |
| `target` | string | Yes | The target of the search: a domain or a URL. |
| `history` | string | No | A time frame to add lost backlinks to the report. Choose between `live` (no history), `since:<date>` (history since a specified date), and `all_time` (full history). The date should be in YYYY-MM-DD format.  |
| `timeout` | integer | No | A manual timeout duration in seconds. |
| `order_by` | string | No | A column to order results by. See response schema for valid column identifiers.  |
| `protocol` | string ("both" | "http" | "https") | No | The protocol of your target. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Retrieve best by internal links

**Slug:** `AHREFS_RETRIEVE_BEST_BY_INTERNAL_LINKS`

Retrieves data on the best-performing internal links within a specified website using Ahrefs' Site Explorer feature. This endpoint analyzes the internal link structure of the target site and returns a list of the most effective internal links based on various SEO metrics. It's particularly useful for identifying high-value linking opportunities within your own website, which can help improve your site's overall SEO performance and user navigation. The tool provides insights that can be used to optimize your internal linking strategy, potentially boosting the ranking potential of important pages on your site. Note that this endpoint focuses solely on internal links and does not provide information about external backlinks or other SEO metrics.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `mode` | string ("exact" | "prefix" | "domain" | "subdomains") | No | The scope of the search based on the target you entered. |
| `limit` | integer | No | The number of results to return. |
| `where` | string | No | The filter expression. The following column identifiers are recognized (this differs from the identifiers recognized by the `select` parameter). **anchor**: The clickable words in a link that point to a URL.   type: string **canonical_to_target**: The number of inbound canonical links to your target page.   type: integer **dofollow_to_target**: The number of links to your target page that don’t have the “nofollow” attribute.   type: integer **domain_rating_source**: The strength of the referring domain"s backlink profile compared to the others in our database on a 100-point scale.   type: float **first_seen_link**: The date we first found a link to your target.   type: datetime **http_code_source**: The return code from HTTP protocol returned during the referring page crawl.   type: integer **http_code_target**: The return code from HTTP protocol returned during the target page crawl.   type: integer nullable **is_content**: The link was found in the biggest piece of content on the page.   type: boolean **is_dofollow**: The link has no special nofollow attribute.   type: boolean **is_homepage_link**: The link was found on the homepage of a referring website.   type: boolean **is_nofollow**: The link or the referring page has the nofollow attribute set.   type: boolean **is_non_html**: The link points to a URL with non-HTML content.   type: boolean **is_root_source**: The referring domain name is a root domain name.   type: boolean **is_sponsored**: The link has the Sponsored attribute set in the referring page HTML.   type: boolean **is_ugc**: The link has the User Generated Content attribute set in the referring page HTML.   type: boolean **languages_source**: The languages listed in the referring page metadata or detected by the crawler to appear in the HTML.   type: array(string) **languages_target**: The languages listed in the target page metadata or detected by the crawler to appear in the HTML.   type: array(string) **last_seen**: The date your target page lost its last live link.   type: datetime nullable **last_visited_source**: The date we last verified a live link to your target page.   type: datetime **last_visited_target**: The date we last crawled your target page.   type: datetime nullable **len_url_redirect**: The number of redirect chain URLs.   type: integer **link_type**: The kind of the backlink.   type: string   enum: `"redirect"` `"frame"` `"text"` `"form"` `"canonical"` `"alternate"` `"rss"` `"image"` **linked_domains_source**: The number of unique root domains linked from the referring page.   type: integer **links_external_source**: The number of external links from the referring page.   type: integer **links_to_target**: The number of inbound backlinks the target page has.   type: integer **nofollow_to_target**: The number of links to your target page that have the “nofollow” attribute.   type: integer **positions_source**: The number of keywords that the referring page ranks for in the top 100 positions.   type: integer **positions_source_domain**: The number of keywords that the referring domain ranks for in the top 100 positions.   type: integer **powered_by_source**: Web technologies used to build and serve the referring page content.   type: array(string) **powered_by_target**: Web technologies used to build and serve the target page content.   type: array(string) **redirects_to_target**: The number of inbound redirects to your target page.   type: integer **refdomains_source** (5 units): The number of unique referring domains linking to the referring page.   type: integer **root_name_source**: The root domain name of the referring domain, not including subdomains.   type: string **snippet_left**: The snippet of text appearing just before the link.   type: string **snippet_right**: The snippet of text appearing just after the link.   type: string **source_page_author**: The author of the referring page.   type: string nullable **target_redirect**: The target"s redirect if any.   type: string nullable **title_source**: The html title of the referring page.   type: string **title_target**: The html title of the target page.   type: string nullable **traffic_domain_source** (10 units): The referring domain"s estimated monthly organic traffic from search.   type: integer **traffic_source** (10 units): The referring page"s estimated monthly organic traffic from search.   type: integer **url_from_plain**: The referring page URL optimized for use as a filter.   type: string **url_rating_source**: The strength of the referring page"s backlink profile compared to the others in our database on a 100-point scale.   type: float **url_rating_target**: The strength of the target page"s backlink profile compared to the others in our database on a 100-point scale.   type: float nullable **url_redirect**: A redirect chain the target URL of the link points to.   type: array(url) **url_redirect_with_target**: The target URL of the link with its redirect chain.   type: array(string) **url_to**: The URL the backlink points to.   type: string **url_to_plain**: The target page URL optimized for use as a filter.   type: string  |
| `offset` | integer | No | [Deprecated on 31 May 2024]. |
| `output` | string ("json" | "csv" | "xml" | "php") | No | The output format. |
| `select` | string | Yes | A comma-separated list of columns to return. See response schema for valid column identifiers.  |
| `target` | string | Yes | The target of the search: a domain or a URL. |
| `timeout` | integer | No | A manual timeout duration in seconds. |
| `order_by` | string | No | A column to order results by. See response schema for valid column identifiers.  |
| `protocol` | string ("both" | "http" | "https") | No | The protocol of your target. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Retrieve crawler ip ranges

**Slug:** `AHREFS_RETRIEVE_CRAWLER_IP_RANGES`

Retrieves the list of IP address ranges used by Ahrefs' web crawler (AhrefsBot). This endpoint provides essential information for website administrators to identify and potentially whitelist Ahrefs' crawler traffic. Use this endpoint when you need to configure your server's firewall rules, analyze server logs, or verify the authenticity of crawler requests claiming to be from Ahrefs. The returned data includes the current set of IP ranges, which may change over time, so it's recommended to check this endpoint periodically for updates. Note that while this information helps in identifying Ahrefs' crawler, it should not be used as the sole method of authentication for the crawler.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `output` | string ("json" | "csv" | "xml" | "php") | No | The output format. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Retrieve organic competitors

**Slug:** `AHREFS_RETRIEVE_ORGANIC_COMPETITORS`

The GetOrganicCompetitors endpoint in the Ahrefs API provides a comprehensive analysis of websites competing for organic search rankings with a specified target domain. It identifies and ranks competitors based on their keyword overlap and organic search performance relative to the target site. This tool is essential for understanding the competitive landscape in SEO, discovering potential content gaps, and informing strategic decisions for improving organic search visibility. Use this endpoint when you need to identify key competitors in organic search, analyze their strengths, and uncover opportunities for outranking them. The tool focuses solely on organic search competitors and does not provide information on paid search or other marketing channels.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `date` | string | Yes | A date to report metrics on in YYYY-MM-DD format. |
| `mode` | string ("exact" | "prefix" | "domain" | "subdomains") | No | The scope of the search based on the target you entered. |
| `limit` | integer | No | The number of results to return. |
| `where` | string | No | The filter expression. The following column identifiers are recognized (this differs from the identifiers recognized by the `select` parameter). **competitor_domain**: A competitor"s domain of your target in “domains" group mode.   type: domain nullable **competitor_url**: A competitor"s URL of your target in pages" group mode.   type: url nullable **cpc_competitor**: Cost Per Click shows the average price that advertisers pay for each ad click in paid search results for a keyword, in USD cents for a competitor.   type: integer nullable **cpc_target**: Cost Per Click shows the average price that advertisers pay for each ad click in paid search results for a keyword, in USD cents for a target.   type: integer nullable **domain_rating**: The strength of a domain"s backlink profile compared to the others in our database on a 100-point scale.   type: float **group_mode**: To see competing pages instead, use the “exact URL” target mode or “path” target mode if your target doesn"t have multiple pages.   type: string   enum: `"domains"` `"pages"` **keyword_difficulty_competitor** (10 units): An estimation of how hard it is to rank in the top 10 organic search results for a keyword on a 100-point scale for a competitor.   type: integer nullable **keyword_difficulty_target** (10 units): An estimation of how hard it is to rank in the top 10 organic search results for a keyword on a 100-point scale for a target.   type: integer nullable **keywords_common**: Organic keywords that both your target and a competitor are ranking for.   type: integer **keywords_competitor**: Organic keywords that a competitor is ranking for, but your target isn"t.   type: integer **keywords_target**: Organic keywords that your target is ranking for, but a competitor isn"t.   type: integer **pages**: The total number of pages from a target ranking in search results.   type: integer nullable **pages_diff**: The change in pages between your selected dates.   type: integer **pages_merged**: The pages field optimized for sorting.   type: integer **pages_prev**: The total number of pages from a target ranking in search results on the comparison date.   type: integer nullable **share**: The percentage of common keywords out of the total number of keywords that your target and a competitor both rank for.   type: float **traffic** (10 units): An estimation of the number of monthly visits that a page gets from organic search over the latest month or over the latest known 12 months of data depending on the "volume_mode" parameter.   type: integer nullable **traffic_diff**: The change in traffic between your selected dates.   type: integer **traffic_merged** (10 units): The traffic field optimized for sorting.   type: integer **traffic_prev** (10 units): An estimation of the number of monthly visits that a page gets from organic search over the latest month or over the latest known 12 months of data depending on the "volume_mode" parameter on the comparison date.   type: integer nullable **value** (10 units): The estimated value of a page"s monthly organic search traffic, in USD cents.   type: integer nullable **value_diff**: The change in value between your selected dates.   type: integer **value_merged** (10 units): The value field optimized for sorting.   type: integer nullable **value_prev** (10 units): The estimated value of a page"s monthly organic search traffic, in USD cents on the comparison date.   type: integer nullable **volume_competitor** (10 units): An estimation of the average monthly number of searches for a keyword over the latest month or over the latest known 12 months of data depending on the "volume_mode" parameter for a competitor.   type: integer nullable **volume_target** (10 units): An estimation of the average monthly number of searches for a keyword over the latest month or over the latest known 12 months of data depending on the "volume_mode" parameter for a target.   type: integer nullable **words_competitor**: The number of words in a keyword for a competitor.   type: integer **words_target**: The number of words in a keyword for a target.   type: integer  |
| `offset` | integer | No | [Deprecated on 31 May 2024]. |
| `output` | string ("json" | "csv" | "xml" | "php") | No | The output format. |
| `select` | string | Yes | A comma-separated list of columns to return. See response schema for valid column identifiers.  |
| `target` | string | Yes | The target of the search: a domain or a URL. |
| `country` | string ("ad" | "ae" | "af" | "ag" | "ai" | "al" | "am" | "ao" | "ar" | "as" | "at" | "au" | "aw" | "az" | "ba" | "bb" | "bd" | "be" | "bf" | "bg" | "bh" | "bi" | "bj" | "bn" | "bo" | "br" | "bs" | "bt" | "bw" | "by" | "bz" | "ca" | "cd" | "cf" | "cg" | "ch" | "ci" | "ck" | "cl" | "cm" | "cn" | "co" | "cr" | "cu" | "cv" | "cy" | "cz" | "de" | "dj" | "dk" | "dm" | "do" | "dz" | "ec" | "ee" | "eg" | "es" | "et" | "fi" | "fj" | "fm" | "fo" | "fr" | "ga" | "gb" | "gd" | "ge" | "gf" | "gg" | "gh" | "gi" | "gl" | "gm" | "gn" | "gp" | "gq" | "gr" | "gt" | "gu" | "gy" | "hk" | "hn" | "hr" | "ht" | "hu" | "id" | "ie" | "il" | "im" | "in" | "iq" | "is" | "it" | "je" | "jm" | "jo" | "jp" | "ke" | "kg" | "kh" | "ki" | "kn" | "kr" | "kw" | "ky" | "kz" | "la" | "lb" | "lc" | "li" | "lk" | "ls" | "lt" | "lu" | "lv" | "ly" | "ma" | "mc" | "md" | "me" | "mg" | "mk" | "ml" | "mm" | "mn" | "mq" | "mr" | "ms" | "mt" | "mu" | "mv" | "mw" | "mx" | "my" | "mz" | "na" | "nc" | "ne" | "ng" | "ni" | "nl" | "no" | "np" | "nr" | "nu" | "nz" | "om" | "pa" | "pe" | "pf" | "pg" | "ph" | "pk" | "pl" | "pn" | "pr" | "ps" | "pt" | "py" | "qa" | "re" | "ro" | "rs" | "ru" | "rw" | "sa" | "sb" | "sc" | "se" | "sg" | "sh" | "si" | "sk" | "sl" | "sm" | "sn" | "so" | "sr" | "st" | "sv" | "td" | "tg" | "th" | "tj" | "tk" | "tl" | "tm" | "tn" | "to" | "tr" | "tt" | "tw" | "tz" | "ua" | "ug" | "us" | "uy" | "uz" | "vc" | "ve" | "vg" | "vi" | "vn" | "vu" | "ws" | "ye" | "yt" | "za" | "zm" | "zw") | Yes | A two-letter country code (ISO 3166-1 alpha-2). |
| `timeout` | integer | No | A manual timeout duration in seconds. |
| `order_by` | string | No | A column to order results by. See response schema for valid column identifiers.  |
| `protocol` | string ("both" | "http" | "https") | No | The protocol of your target. |
| `volume_mode` | string ("monthly" | "average") | No | The search volume calculation mode: monthly or average. It affects volume, traffic, and traffic value.  |
| `date_compared` | string | No | A date to compare metrics with in YYYY-MM-DD format. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Retrieve organic keywords

**Slug:** `AHREFS_RETRIEVE_ORGANIC_KEYWORDS`

Retrieves organic keywords data for a specified website using Ahrefs' Site Explorer tool. This endpoint provides valuable insights into a website's SEO performance by returning a list of keywords for which the site ranks in organic search results. It's particularly useful for analyzing a website's organic search visibility, identifying ranking opportunities, and comparing keyword performance against competitors. The data returned includes key metrics such as keyword position, search volume, and estimated traffic, allowing users to make informed decisions about their SEO strategy. Note that the results are based on Ahrefs' database and may not reflect real-time search engine results.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `date` | string | Yes | A date to report metrics on in YYYY-MM-DD format. |
| `mode` | string ("exact" | "prefix" | "domain" | "subdomains") | No | The scope of the search based on the target you entered. |
| `limit` | integer | No | The number of results to return. |
| `where` | string | No | The filter expression. The following column identifiers are recognized (this differs from the identifiers recognized by the `select` parameter). **best_position**: The top position your target ranks for in the organic search results for a keyword.   type: integer nullable **best_position_diff**: The change in position between your selected dates.   type: integer nullable **best_position_has_thumbnail**: The top position has a thumbnail.   type: boolean nullable **best_position_has_thumbnail_prev**: The top position has a thumbnail on the comparison date.   type: boolean nullable **best_position_has_video**: The top position has a video.   type: boolean nullable **best_position_has_video_prev**: The top position has a video on the comparison date.   type: boolean nullable **best_position_kind**: The kind of the top position: organic, paid, or a SERP feature.   type: string nullable   enum: `"paid_top"` `"paid_bottom"` `"paid_right"` `"paid_sitelink"` `"organic"` `"sitelink"` `"snippet"` `"image"` `"article"` `"knowledge_card"` `"knowledge_panel"` `"local_pack"` `"local_teaser"` `"news"` `"question"` `"review"` `"shopping"` `"tweet"` `"spelling"` `"video"` `"discussion"` `"ai_overview"` `"ai_overview_sitelink"` `"organic_shopping"` **best_position_kind_merged**: The kind of the top position optimized for sorting.   type: string   enum: `"paid_top"` `"paid_bottom"` `"paid_right"` `"paid_sitelink"` `"organic"` `"sitelink"` `"snippet"` `"image"` `"article"` `"knowledge_card"` `"knowledge_panel"` `"local_pack"` `"local_teaser"` `"news"` `"question"` `"review"` `"shopping"` `"tweet"` `"spelling"` `"video"` `"discussion"` `"ai_overview"` `"ai_overview_sitelink"` `"organic_shopping"` **best_position_kind_prev**: The kind of the top position on the comparison date.   type: string nullable   enum: `"paid_top"` `"paid_bottom"` `"paid_right"` `"paid_sitelink"` `"organic"` `"sitelink"` `"snippet"` `"image"` `"article"` `"knowledge_card"` `"knowledge_panel"` `"local_pack"` `"local_teaser"` `"news"` `"question"` `"review"` `"shopping"` `"tweet"` `"spelling"` `"video"` `"discussion"` `"ai_overview"` `"ai_overview_sitelink"` `"organic_shopping"` **best_position_prev**: The top position on the comparison date.   type: integer nullable **best_position_set**: The ranking group of the top position.   type: string   enum: `"top_3"` `"top_4_10"` `"top_11_50"` `"top_51_more"` **best_position_set_prev**: The ranking group of the top position on the comparison date.   type: string nullable   enum: `"top_3"` `"top_4_10"` `"top_11_50"` `"top_51_more"` **best_position_url**: The ranking URL in organic search results.   type: string nullable **best_position_url_prev**: The ranking URL on the comparison date.   type: string nullable **best_position_url_raw**: The ranking page URL in encoded format.   type: string nullable **best_position_url_raw_prev**: The ranking page URL on the comparison date in encoded format.   type: string nullable **cpc**: Cost Per Click shows the average price that advertisers pay for each ad click in paid search results for a keyword, in USD cents.   type: integer nullable **cpc_merged**: The CPC field optimized for sorting.   type: integer nullable **cpc_prev**: The CPC metric on the comparison date.   type: integer nullable **is_best_position_set_top_11_50**: The ranking group of the top position is 11-50.   type: boolean **is_best_position_set_top_11_50_prev**: The ranking group of the top position was 11-50 on the comparison date.   type: boolean nullable **is_best_position_set_top_3**: The ranking group of the top position is Top 3.   type: boolean **is_best_position_set_top_3_prev**: The ranking group of the top position was Top 3 on the comparison date.   type: boolean nullable **is_best_position_set_top_4_10**: The ranking group of the top position is 4-10.   type: boolean **is_best_position_set_top_4_10_prev**: The ranking group of the top position was 4-10 on the comparison date.   type: boolean nullable **is_branded**: User intent: branded. The user is searching for a specific brand or company name.   type: boolean **is_commercial**: User intent: commercial. The user is comparing products or services before making a purchase decision.   type: boolean **is_informational**: User intent: informational. The user is looking for information or an answer to a specific question.   type: boolean **is_local**: User intent: local. The user is looking for information relevant to a specific location or nearby services.   type: boolean **is_main_position**: Excludes positions in Sitelinks, Top stories, Image packs, and posts on X (Twitter).   type: boolean **is_main_position_prev**: Excludes positions in Sitelinks, Top stories, Image packs, and posts on X (Twitter) on the comparison date.   type: boolean **is_navigational**: User intent: navigational. The user is searching for a specific website or web page.   type: boolean **is_transactional**: User intent: transactional. The user is ready to complete an action, often a purchase.   type: boolean **keyword**: The keyword your target ranks for.   type: string **keyword_difficulty** (10 units): An estimation of how hard it is to rank in the top 10 organic search results for a keyword on a 100-point scale.   type: integer nullable **keyword_difficulty_merged** (10 units): The keyword difficulty field optimized for sorting.   type: integer nullable **keyword_difficulty_prev** (10 units): The keyword difficulty on the comparison date.   type: integer nullable **keyword_merged**: The keyword field optimized for sorting.   type: string **keyword_prev**: The keyword your target ranks for on the comparison date.   type: string **language**: The SERP language.   type: string **language_prev**: The SERP language on the comparison date.   type: string nullable **last_update**: The date when we last checked search engine results for a keyword.   type: datetime **last_update_prev**: The date when we checked search engine results up to the comparison date.   type: datetime nullable **position_kind**: The kind of a position: organic, paid or a SERP feature. This applies to all positions for a given keyword and URL before picking the top position.   type: string   enum: `"paid_top"` `"paid_bottom"` `"paid_right"` `"paid_sitelink"` `"organic"` `"sitelink"` `"snippet"` `"image"` `"article"` `"knowledge_card"` `"knowledge_panel"` `"local_pack"` `"local_teaser"` `"news"` `"question"` `"review"` `"shopping"` `"tweet"` `"spelling"` `"video"` `"discussion"` `"ai_overview"` `"ai_overview_sitelink"` `"organic_shopping"` **position_kind_prev**: The kind of a position on the comparison date.   type: string   enum: `"paid_top"` `"paid_bottom"` `"paid_right"` `"paid_sitelink"` `"organic"` `"sitelink"` `"snippet"` `"image"` `"article"` `"knowledge_card"` `"knowledge_panel"` `"local_pack"` `"local_teaser"` `"news"` `"question"` `"review"` `"shopping"` `"tweet"` `"spelling"` `"video"` `"discussion"` `"ai_overview"` `"ai_overview_sitelink"` `"organic_shopping"` **positions_kinds**: The kinds of the top positions.   type: array(string)   enum: `"paid_top"` `"paid_bottom"` `"paid_right"` `"paid_sitelink"` `"organic"` `"sitelink"` `"snippet"` `"image"` `"article"` `"knowledge_card"` `"knowledge_panel"` `"local_pack"` `"local_teaser"` `"news"` `"question"` `"review"` `"shopping"` `"tweet"` `"spelling"` `"video"` `"discussion"` `"ai_overview"` `"ai_overview_sitelink"` `"organic_shopping"` `"image_th"` `"video_th"` `"ai_overview_found"` **positions_kinds_prev**: The kinds of the top positions on the comparison date.   type: array(string)   enum: `"paid_top"` `"paid_bottom"` `"paid_right"` `"paid_sitelink"` `"organic"` `"sitelink"` `"snippet"` `"image"` `"article"` `"knowledge_card"` `"knowledge_panel"` `"local_pack"` `"local_teaser"` `"news"` `"question"` `"review"` `"shopping"` `"tweet"` `"spelling"` `"video"` `"discussion"` `"ai_overview"` `"ai_overview_sitelink"` `"organic_shopping"` `"image_th"` `"video_th"` `"ai_overview_found"` **serp_features**: The SERP features that appear in search results for a keyword.   type: array(string)   enum: `"paid_top"` `"paid_bottom"` `"paid_right"` `"paid_sitelink"` `"organic"` `"sitelink"` `"snippet"` `"image"` `"article"` `"knowledge_card"` `"knowledge_panel"` `"local_pack"` `"local_teaser"` `"news"` `"question"` `"review"` `"shopping"` `"tweet"` `"spelling"` `"video"` `"discussion"` `"ai_overview"` `"ai_overview_sitelink"` `"organic_shopping"` `"image_th"` `"video_th"` `"ai_overview_found"` **serp_features_count**: The number of SERP features that appear in search results for a keyword.   type: integer **serp_features_count_prev**: The number of SERP features on the comparison date.   type: integer nullable **serp_features_merged**: The SERP features field optimized for sorting.   type: array(string)   enum: `"paid_top"` `"paid_bottom"` `"paid_right"` `"paid_sitelink"` `"organic"` `"sitelink"` `"snippet"` `"image"` `"article"` `"knowledge_card"` `"knowledge_panel"` `"local_pack"` `"local_teaser"` `"news"` `"question"` `"review"` `"shopping"` `"tweet"` `"spelling"` `"video"` `"discussion"` `"ai_overview"` `"ai_overview_sitelink"` `"organic_shopping"` `"image_th"` `"video_th"` `"ai_overview_found"` **serp_features_prev**: The SERP features on the comparison date.   type: array(string)   enum: `"paid_top"` `"paid_bottom"` `"paid_right"` `"paid_sitelink"` `"organic"` `"sitelink"` `"snippet"` `"image"` `"article"` `"knowledge_card"` `"knowledge_panel"` `"local_pack"` `"local_teaser"` `"news"` `"question"` `"review"` `"shopping"` `"tweet"` `"spelling"` `"video"` `"discussion"` `"ai_overview"` `"ai_overview_sitelink"` `"organic_shopping"` `"image_th"` `"video_th"` `"ai_overview_found"` **serp_target_main_positions_count**: The number of target URLs ranking for a keyword excluding positions in Sitelinks, Top stories, Image packs, and posts on X (Twitter).   type: integer **serp_target_main_positions_count_prev**: The number of target URLs ranking for a keyword excluding positions in Sitelinks, Top stories, Image packs, and posts on X (Twitter) on the comparison date.   type: integer nullable **serp_target_positions_count**: The number of target URLs ranking for a keyword.   type: integer **serp_target_positions_count_prev**: The number of target URLs ranking for a keyword on the comparison date.   type: integer nullable **status**: The status of a page: the new page that just started to rank ("left"), the lost page that disappeared from search results ("right"), or no change ("both").   type: string   enum: `"left"` `"right"` `"both"` **sum_paid_traffic** (10 units): An estimation of the number of monthly visits that your target gets from paid search for a keyword.   type: integer nullable **sum_traffic** (10 units): An estimation of the number of monthly visitors that your target gets from organic search for a keyword.   type: integer nullable **sum_traffic_merged** (10 units): The traffic field optimized for sorting.   type: integer **sum_traffic_prev** (10 units): The traffic on the comparison date.   type: integer nullable **title**: The title displayed for the page in a keyword"s SERP.   type: string **title_prev**: The title displayed for the page in a keyword"s SERP on the comparison date.   type: string **volume** (10 units): An estimation of the number of searches for a keyword over the latest month.   type: integer nullable **volume_desktop_pct**: The percentage of the total search volume that comes from desktop devices.   type: float nullable **volume_merged** (10 units): The search volume field optimized for sorting.   type: integer nullable **volume_mobile_pct**: The percentage of the total search volume that comes from mobile devices.   type: float nullable **volume_prev** (10 units): The search volume on the comparison date.   type: integer nullable **words**: The number of words in a keyword.   type: integer **words_merged**: The number of words in a keyword optimized for sorting.   type: integer **words_prev**: The number of words in a keyword on the comparison date.   type: integer  |
| `offset` | integer | No | [Deprecated on 31 May 2024]. |
| `output` | string ("json" | "csv" | "xml" | "php") | No | The output format. |
| `select` | string | Yes | A comma-separated list of columns to return. See response schema for valid column identifiers.  |
| `target` | string | Yes | The target of the search: a domain or a URL. |
| `country` | string ("ad" | "ae" | "af" | "ag" | "ai" | "al" | "am" | "ao" | "ar" | "as" | "at" | "au" | "aw" | "az" | "ba" | "bb" | "bd" | "be" | "bf" | "bg" | "bh" | "bi" | "bj" | "bn" | "bo" | "br" | "bs" | "bt" | "bw" | "by" | "bz" | "ca" | "cd" | "cf" | "cg" | "ch" | "ci" | "ck" | "cl" | "cm" | "cn" | "co" | "cr" | "cu" | "cv" | "cy" | "cz" | "de" | "dj" | "dk" | "dm" | "do" | "dz" | "ec" | "ee" | "eg" | "es" | "et" | "fi" | "fj" | "fm" | "fo" | "fr" | "ga" | "gb" | "gd" | "ge" | "gf" | "gg" | "gh" | "gi" | "gl" | "gm" | "gn" | "gp" | "gq" | "gr" | "gt" | "gu" | "gy" | "hk" | "hn" | "hr" | "ht" | "hu" | "id" | "ie" | "il" | "im" | "in" | "iq" | "is" | "it" | "je" | "jm" | "jo" | "jp" | "ke" | "kg" | "kh" | "ki" | "kn" | "kr" | "kw" | "ky" | "kz" | "la" | "lb" | "lc" | "li" | "lk" | "ls" | "lt" | "lu" | "lv" | "ly" | "ma" | "mc" | "md" | "me" | "mg" | "mk" | "ml" | "mm" | "mn" | "mq" | "mr" | "ms" | "mt" | "mu" | "mv" | "mw" | "mx" | "my" | "mz" | "na" | "nc" | "ne" | "ng" | "ni" | "nl" | "no" | "np" | "nr" | "nu" | "nz" | "om" | "pa" | "pe" | "pf" | "pg" | "ph" | "pk" | "pl" | "pn" | "pr" | "ps" | "pt" | "py" | "qa" | "re" | "ro" | "rs" | "ru" | "rw" | "sa" | "sb" | "sc" | "se" | "sg" | "sh" | "si" | "sk" | "sl" | "sm" | "sn" | "so" | "sr" | "st" | "sv" | "td" | "tg" | "th" | "tj" | "tk" | "tl" | "tm" | "tn" | "to" | "tr" | "tt" | "tw" | "tz" | "ua" | "ug" | "us" | "uy" | "uz" | "vc" | "ve" | "vg" | "vi" | "vn" | "vu" | "ws" | "ye" | "yt" | "za" | "zm" | "zw") | Yes | A two-letter country code (ISO 3166-1 alpha-2). |
| `timeout` | integer | No | A manual timeout duration in seconds. |
| `order_by` | string | No | A column to order results by. See response schema for valid column identifiers.  |
| `protocol` | string ("both" | "http" | "https") | No | The protocol of your target. |
| `volume_mode` | string ("monthly" | "average") | No | The search volume calculation mode: monthly or average. It affects volume, traffic, and traffic value.  |
| `date_compared` | string | No | A date to compare metrics with in YYYY-MM-DD format. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Retrieve outlinks stats

**Slug:** `AHREFS_RETRIEVE_OUTLINKS_STATS`

Retrieves comprehensive statistics about outgoing links (outlinks) from a specified website using Ahrefs' Site Explorer tool. This endpoint provides valuable insights into a website's external linking practices, which is crucial for SEO analysis and understanding a site's overall link profile. Use this tool to gather data on the number of outlinks, the diversity of linked domains, and the distribution of follow vs. nofollow links. It's particularly useful for competitive analysis, identifying potential link-building opportunities, and assessing a site's overall linking strategy. Note that this endpoint focuses solely on outgoing links and does not provide information about backlinks or internal links.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `mode` | string ("exact" | "prefix" | "domain" | "subdomains") | No | The scope of the search based on the target you entered. |
| `output` | string ("json" | "csv" | "xml" | "php") | No | The output format. |
| `target` | string | Yes | The target of the search: a domain or a URL. |
| `protocol` | string ("both" | "http" | "https") | No | The protocol of your target. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Retrieve paid pages data

**Slug:** `AHREFS_RETRIEVE_PAID_PAGES_DATA`

Retrieves information about paid pages (PPC advertising) for a specified website using Ahrefs' Site Explorer tool. This endpoint provides valuable insights into a website's paid search strategy, including the keywords they're targeting, ad copies, and potentially performance metrics. It's particularly useful for competitive analysis in digital marketing, allowing users to understand their competitors' paid search efforts. The tool should be used when analyzing a website's PPC strategy or researching potential keywords for paid campaigns. It does not provide information about organic search performance or other SEO metrics.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `date` | string | Yes | A date to report metrics on in YYYY-MM-DD format. |
| `mode` | string ("exact" | "prefix" | "domain" | "subdomains") | No | The scope of the search based on the target you entered. |
| `limit` | integer | No | The number of results to return. |
| `where` | string | No | The filter expression. The following column identifiers are recognized (this differs from the identifiers recognized by the `select` parameter). **ads_count**: The number of unique ads with a page.   type: integer **ads_count_diff**: The change in ads between your selected dates.   type: integer **ads_count_prev**: The number of ads on the comparison date.   type: integer **cpc**   type: integer nullable **cpc_prev**: The CPC metric on the comparison date.   type: integer nullable **description**: The description of an ad as seen in search results.   type: string **description_prev**: The description of an ad on the comparison date.   type: string **has_thumbnail**: The position has a thumbnail.   type: boolean **has_thumbnail_prev**: The position has a thumbnail on the comparison date.   type: boolean **has_video**: The position has a video.   type: boolean **has_video_prev**: The position has a video on the comparison date.   type: boolean **keyword**: The keyword your target ranks for.   type: string **keyword_difficulty** (10 units): An estimation of how hard it is to rank in the top 10 organic search results for a keyword on a 100-point scale.   type: integer nullable **keyword_difficulty_prev** (10 units): The keyword difficulty on the comparison date.   type: integer nullable **keyword_prev**: The keyword your target ranks for on the comparison date.   type: string **keywords**: The total number of keywords that your target ranks for in paid search results.   type: integer **keywords_diff**: The change in keywords between your selected dates.   type: integer **keywords_diff_percent**: The change in keywords between your selected dates, in percents.   type: integer **keywords_merged**: The total number of keywords optimized for sorting.   type: integer **keywords_prev**: The keyword your target ranks for on the comparison date.   type: integer **position**: The position your target ranks for in the paid search results for a keyword.   type: integer **position_kind**: The kind of a position: organic, paid or a SERP feature. This applies to all positions for a given keyword and URL before picking the top position.   type: string   enum: `"paid_top"` `"paid_bottom"` `"paid_right"` `"paid_sitelink"` `"organic"` `"sitelink"` `"snippet"` `"image"` `"article"` `"knowledge_card"` `"knowledge_panel"` `"local_pack"` `"local_teaser"` `"news"` `"question"` `"review"` `"shopping"` `"tweet"` `"spelling"` `"video"` `"discussion"` `"ai_overview"` `"ai_overview_sitelink"` `"organic_shopping"` **position_kind_prev**: The kind of a position on the comparison date.   type: string   enum: `"paid_top"` `"paid_bottom"` `"paid_right"` `"paid_sitelink"` `"organic"` `"sitelink"` `"snippet"` `"image"` `"article"` `"knowledge_card"` `"knowledge_panel"` `"local_pack"` `"local_teaser"` `"news"` `"question"` `"review"` `"shopping"` `"tweet"` `"spelling"` `"video"` `"discussion"` `"ai_overview"` `"ai_overview_sitelink"` `"organic_shopping"` **position_prev**: The position of your target for a given keyword on the comparison date.   type: integer **raw_url**: The ranking page URL in encoded format.   type: string **raw_url_prev**: The ranking page URL on the comparison date in encoded format.   type: string **serp_features**   type: array(string)   enum: `"paid_top"` `"paid_bottom"` `"paid_right"` `"paid_sitelink"` `"organic"` `"sitelink"` `"snippet"` `"image"` `"article"` `"knowledge_card"` `"knowledge_panel"` `"local_pack"` `"local_teaser"` `"news"` `"question"` `"review"` `"shopping"` `"tweet"` `"spelling"` `"video"` `"discussion"` `"ai_overview"` `"ai_overview_sitelink"` `"organic_shopping"` `"image_th"` `"video_th"` `"ai_overview_found"` **serp_features_prev**: The SERP features on the comparison date.   type: array(string)   enum: `"paid_top"` `"paid_bottom"` `"paid_right"` `"paid_sitelink"` `"organic"` `"sitelink"` `"snippet"` `"image"` `"article"` `"knowledge_card"` `"knowledge_panel"` `"local_pack"` `"local_teaser"` `"news"` `"question"` `"review"` `"shopping"` `"tweet"` `"spelling"` `"video"` `"discussion"` `"ai_overview"` `"ai_overview_sitelink"` `"organic_shopping"` `"image_th"` `"video_th"` `"ai_overview_found"` **status**: The status of a page: the new page that just started to rank in paid results ("left"), the lost page that disappeared from paid results ("right"), or no change ("both").   type: string   enum: `"left"` `"right"` `"both"` **sum_traffic** (10 units): An estimation of the monthly paid search traffic that a page gets from all the keywords that it ranks for.   type: integer nullable **sum_traffic_merged** (10 units): The paid traffic field optimized for sorting.   type: integer **sum_traffic_prev** (10 units): The paid traffic on the comparison date.   type: integer nullable **title**: The title of an ad as seen in search results.   type: string **title_prev**: The title of an ad on the comparison date.   type: string **top_keyword**: The keyword that brings the most paid traffic to a page.   type: string nullable **top_keyword_best_position**: The ranking position that a page holds for its top keyword.   type: integer nullable **top_keyword_best_position_diff**: The change in the top position between your selected dates.   type: integer nullable **top_keyword_best_position_kind**: The kind of the top position: organic, paid or a SERP feature.   type: string nullable   enum: `"paid_top"` `"paid_bottom"` `"paid_right"` `"paid_sitelink"` `"organic"` `"sitelink"` `"snippet"` `"image"` `"article"` `"knowledge_card"` `"knowledge_panel"` `"local_pack"` `"local_teaser"` `"news"` `"question"` `"review"` `"shopping"` `"tweet"` `"spelling"` `"video"` `"discussion"` `"ai_overview"` `"ai_overview_sitelink"` `"organic_shopping"` **top_keyword_best_position_kind_prev**: The kind of the top position on the comparison date.   type: string nullable   enum: `"paid_top"` `"paid_bottom"` `"paid_right"` `"paid_sitelink"` `"organic"` `"sitelink"` `"snippet"` `"image"` `"article"` `"knowledge_card"` `"knowledge_panel"` `"local_pack"` `"local_teaser"` `"news"` `"question"` `"review"` `"shopping"` `"tweet"` `"spelling"` `"video"` `"discussion"` `"ai_overview"` `"ai_overview_sitelink"` `"organic_shopping"` **top_keyword_best_position_prev**: The top position on the comparison date.   type: integer nullable **top_keyword_best_position_title**: The title displayed for the page in its top keyword"s SERP.   type: string nullable **top_keyword_best_position_title_prev**: The title displayed for the page in its top keyword"s SERP on the comparison date.   type: string nullable **top_keyword_country**: The country in which a page ranks for its top keyword.   type: string nullable   enum: `"AD"` `"AE"` `"AF"` `"AG"` `"AI"` `"AL"` `"AM"` `"AO"` `"AQ"` `"AR"` `"AS"` `"AT"` `"AU"` `"AW"` `"AX"` `"AZ"` `"BA"` `"BB"` `"BD"` `"BE"` `"BF"` `"BG"` `"BH"` `"BI"` `"BJ"` `"BL"` `"BM"` `"BN"` `"BO"` `"BQ"` `"BR"` `"BS"` `"BT"` `"BV"` `"BW"` `"BY"` `"BZ"` `"CA"` `"CC"` `"CD"` `"CF"` `"CG"` `"CH"` `"CI"` `"CK"` `"CL"` `"CM"` `"CN"` `"CO"` `"CR"` `"CU"` `"CV"` `"CW"` `"CX"` `"CY"` `"CZ"` `"DE"` `"DJ"` `"DK"` `"DM"` `"DO"` `"DZ"` `"EC"` `"EE"` `"EG"` `"EH"` `"ER"` `"ES"` `"ET"` `"FI"` `"FJ"` `"FK"` `"FM"` `"FO"` `"FR"` `"GA"` `"GB"` `"GD"` `"GE"` `"GF"` `"GG"` `"GH"` `"GI"` `"GL"` `"GM"` `"GN"` `"GP"` `"GQ"` `"GR"` `"GS"` `"GT"` `"GU"` `"GW"` `"GY"` `"HK"` `"HM"` `"HN"` `"HR"` `"HT"` `"HU"` `"ID"` `"IE"` `"IL"` `"IM"` `"IN"` `"IO"` `"IQ"` `"IR"` `"IS"` `"IT"` `"JE"` `"JM"` `"JO"` `"JP"` `"KE"` `"KG"` `"KH"` `"KI"` `"KM"` `"KN"` `"KP"` `"KR"` `"KW"` `"KY"` `"KZ"` `"LA"` `"LB"` `"LC"` `"LI"` `"LK"` `"LR"` `"LS"` `"LT"` `"LU"` `"LV"` `"LY"` `"MA"` `"MC"` `"MD"` `"ME"` `"MF"` `"MG"` `"MH"` `"MK"` `"ML"` `"MM"` `"MN"` `"MO"` `"MP"` `"MQ"` `"MR"` `"MS"` `"MT"` `"MU"` `"MV"` `"MW"` `"MX"` `"MY"` `"MZ"` `"NA"` `"NC"` `"NE"` `"NF"` `"NG"` `"NI"` `"NL"` `"NO"` `"NP"` `"NR"` `"NU"` `"NZ"` `"OM"` `"OTHER"` `"PA"` `"PE"` `"PF"` `"PG"` `"PH"` `"PK"` `"PL"` `"PM"` `"PN"` `"PR"` `"PS"` `"PT"` `"PW"` `"PY"` `"QA"` `"RE"` `"RO"` `"RS"` `"RU"` `"RW"` `"SA"` `"SB"` `"SC"` `"SD"` `"SE"` `"SG"` `"SH"` `"SI"` `"SJ"` `"SK"` `"SL"` `"SM"` `"SN"` `"SO"` `"SR"` `"SS"` `"ST"` `"SV"` `"SX"` `"SY"` `"SZ"` `"TC"` `"TD"` `"TF"` `"TG"` `"TH"` `"TJ"` `"TK"` `"TL"` `"TM"` `"TN"` `"TO"` `"TR"` `"TT"` `"TV"` `"TW"` `"TZ"` `"UA"` `"UG"` `"UM"` `"US"` `"UY"` `"UZ"` `"VA"` `"VC"` `"VE"` `"VG"` `"VI"` `"VN"` `"VU"` `"WF"` `"WS"` `"YE"` `"YT"` `"ZA"` `"ZM"` `"ZW"` **top_keyword_country_prev**: The country in which a page ranks for its top keyword on the comparison date.   type: string nullable   enum: `"AD"` `"AE"` `"AF"` `"AG"` `"AI"` `"AL"` `"AM"` `"AO"` `"AQ"` `"AR"` `"AS"` `"AT"` `"AU"` `"AW"` `"AX"` `"AZ"` `"BA"` `"BB"` `"BD"` `"BE"` `"BF"` `"BG"` `"BH"` `"BI"` `"BJ"` `"BL"` `"BM"` `"BN"` `"BO"` `"BQ"` `"BR"` `"BS"` `"BT"` `"BV"` `"BW"` `"BY"` `"BZ"` `"CA"` `"CC"` `"CD"` `"CF"` `"CG"` `"CH"` `"CI"` `"CK"` `"CL"` `"CM"` `"CN"` `"CO"` `"CR"` `"CU"` `"CV"` `"CW"` `"CX"` `"CY"` `"CZ"` `"DE"` `"DJ"` `"DK"` `"DM"` `"DO"` `"DZ"` `"EC"` `"EE"` `"EG"` `"EH"` `"ER"` `"ES"` `"ET"` `"FI"` `"FJ"` `"FK"` `"FM"` `"FO"` `"FR"` `"GA"` `"GB"` `"GD"` `"GE"` `"GF"` `"GG"` `"GH"` `"GI"` `"GL"` `"GM"` `"GN"` `"GP"` `"GQ"` `"GR"` `"GS"` `"GT"` `"GU"` `"GW"` `"GY"` `"HK"` `"HM"` `"HN"` `"HR"` `"HT"` `"HU"` `"ID"` `"IE"` `"IL"` `"IM"` `"IN"` `"IO"` `"IQ"` `"IR"` `"IS"` `"IT"` `"JE"` `"JM"` `"JO"` `"JP"` `"KE"` `"KG"` `"KH"` `"KI"` `"KM"` `"KN"` `"KP"` `"KR"` `"KW"` `"KY"` `"KZ"` `"LA"` `"LB"` `"LC"` `"LI"` `"LK"` `"LR"` `"LS"` `"LT"` `"LU"` `"LV"` `"LY"` `"MA"` `"MC"` `"MD"` `"ME"` `"MF"` `"MG"` `"MH"` `"MK"` `"ML"` `"MM"` `"MN"` `"MO"` `"MP"` `"MQ"` `"MR"` `"MS"` `"MT"` `"MU"` `"MV"` `"MW"` `"MX"` `"MY"` `"MZ"` `"NA"` `"NC"` `"NE"` `"NF"` `"NG"` `"NI"` `"NL"` `"NO"` `"NP"` `"NR"` `"NU"` `"NZ"` `"OM"` `"OTHER"` `"PA"` `"PE"` `"PF"` `"PG"` `"PH"` `"PK"` `"PL"` `"PM"` `"PN"` `"PR"` `"PS"` `"PT"` `"PW"` `"PY"` `"QA"` `"RE"` `"RO"` `"RS"` `"RU"` `"RW"` `"SA"` `"SB"` `"SC"` `"SD"` `"SE"` `"SG"` `"SH"` `"SI"` `"SJ"` `"SK"` `"SL"` `"SM"` `"SN"` `"SO"` `"SR"` `"SS"` `"ST"` `"SV"` `"SX"` `"SY"` `"SZ"` `"TC"` `"TD"` `"TF"` `"TG"` `"TH"` `"TJ"` `"TK"` `"TL"` `"TM"` `"TN"` `"TO"` `"TR"` `"TT"` `"TV"` `"TW"` `"TZ"` `"UA"` `"UG"` `"UM"` `"US"` `"UY"` `"UZ"` `"VA"` `"VC"` `"VE"` `"VG"` `"VI"` `"VN"` `"VU"` `"WF"` `"WS"` `"YE"` `"YT"` `"ZA"` `"ZM"` `"ZW"` **top_keyword_prev**: The keyword that brings the most paid traffic to a page on the comparison date.   type: string nullable **top_keyword_volume** (10 units): An estimation of the average monthly number of searches for the top keyword over the latest month or over the latest known 12 months of data depending on the "volume_mode" parameter.   type: integer nullable **top_keyword_volume_prev** (10 units): The search volume on the comparison date.   type: integer nullable **traffic** (10 units): An estimation of the number of monthly visitors that your target gets from paid search for a keyword.   type: integer **traffic_diff**: The change in traffic between your selected dates.   type: integer **traffic_diff_percent**: The change in traffic between your selected dates, in percents.   type: integer **traffic_prev** (10 units): The traffic from a keyword on the comparison date.   type: integer **url**: The ranking page URL.   type: url nullable **url_prev**: The ranking page URL on the comparison date.   type: url nullable **url_visual**: The URL of an ad as seen in search results.   type: string **url_visual_prev**: The URL of an ad on the comparison date.   type: string **value** (10 units): The estimated cost of a page"s monthly paid search traffic, in USD cents.   type: integer nullable **value_diff**: The change in traffic value between your selected dates.   type: integer **value_diff_percent**: The change in traffic value between your selected dates, in percents.   type: integer **value_merged** (10 units): The traffic value field optimized for sorting.   type: integer nullable **value_prev** (10 units): The traffic value on the comparison date.   type: integer nullable **volume** (10 units): An estimation of the number of searches for a keyword over the latest month.   type: integer nullable **volume_prev** (10 units): The search volume on the comparison date.   type: integer nullable **words**: The number of words in a keyword.   type: integer **words_prev**: The number of words in a keyword on the comparison date.   type: integer  |
| `offset` | integer | No | [Deprecated on 31 May 2024]. |
| `output` | string ("json" | "csv" | "xml" | "php") | No | The output format. |
| `select` | string | Yes | A comma-separated list of columns to return. See response schema for valid column identifiers.  |
| `target` | string | Yes | The target of the search: a domain or a URL. |
| `country` | string ("ad" | "ae" | "af" | "ag" | "ai" | "al" | "am" | "ao" | "ar" | "as" | "at" | "au" | "aw" | "az" | "ba" | "bb" | "bd" | "be" | "bf" | "bg" | "bh" | "bi" | "bj" | "bn" | "bo" | "br" | "bs" | "bt" | "bw" | "by" | "bz" | "ca" | "cd" | "cf" | "cg" | "ch" | "ci" | "ck" | "cl" | "cm" | "cn" | "co" | "cr" | "cu" | "cv" | "cy" | "cz" | "de" | "dj" | "dk" | "dm" | "do" | "dz" | "ec" | "ee" | "eg" | "es" | "et" | "fi" | "fj" | "fm" | "fo" | "fr" | "ga" | "gb" | "gd" | "ge" | "gf" | "gg" | "gh" | "gi" | "gl" | "gm" | "gn" | "gp" | "gq" | "gr" | "gt" | "gu" | "gy" | "hk" | "hn" | "hr" | "ht" | "hu" | "id" | "ie" | "il" | "im" | "in" | "iq" | "is" | "it" | "je" | "jm" | "jo" | "jp" | "ke" | "kg" | "kh" | "ki" | "kn" | "kr" | "kw" | "ky" | "kz" | "la" | "lb" | "lc" | "li" | "lk" | "ls" | "lt" | "lu" | "lv" | "ly" | "ma" | "mc" | "md" | "me" | "mg" | "mk" | "ml" | "mm" | "mn" | "mq" | "mr" | "ms" | "mt" | "mu" | "mv" | "mw" | "mx" | "my" | "mz" | "na" | "nc" | "ne" | "ng" | "ni" | "nl" | "no" | "np" | "nr" | "nu" | "nz" | "om" | "pa" | "pe" | "pf" | "pg" | "ph" | "pk" | "pl" | "pn" | "pr" | "ps" | "pt" | "py" | "qa" | "re" | "ro" | "rs" | "ru" | "rw" | "sa" | "sb" | "sc" | "se" | "sg" | "sh" | "si" | "sk" | "sl" | "sm" | "sn" | "so" | "sr" | "st" | "sv" | "td" | "tg" | "th" | "tj" | "tk" | "tl" | "tm" | "tn" | "to" | "tr" | "tt" | "tw" | "tz" | "ua" | "ug" | "us" | "uy" | "uz" | "vc" | "ve" | "vg" | "vi" | "vn" | "vu" | "ws" | "ye" | "yt" | "za" | "zm" | "zw") | No | A two-letter country code (ISO 3166-1 alpha-2). |
| `timeout` | integer | No | A manual timeout duration in seconds. |
| `order_by` | string | No | A column to order results by. See response schema for valid column identifiers.  |
| `protocol` | string ("both" | "http" | "https") | No | The protocol of your target. |
| `volume_mode` | string ("monthly" | "average") | No | The search volume calculation mode: monthly or average. It affects volume, traffic, and traffic value.  |
| `date_compared` | string | No | A date to compare metrics with in YYYY-MM-DD format. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Retrieve public crawler ips

**Slug:** `AHREFS_RETRIEVE_PUBLIC_CRAWLER_IPS`

Retrieves a list of IP addresses currently used by AhrefsBot, Ahrefs' web crawler. This endpoint provides essential information for webmasters and SEO professionals who want to verify the authenticity of requests coming from Ahrefs or manage their server's access rules. The returned list includes all active IP addresses utilized by AhrefsBot for crawling websites. This tool should be used when you need to confirm if a particular IP belongs to Ahrefs or when updating your website's firewall rules to allow Ahrefs' crawler. It's important to note that this list may change over time, so it's recommended to check it periodically for the most up-to-date information.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `output` | string ("json" | "csv" | "xml" | "php") | No | The output format. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Retrieve related terms

**Slug:** `AHREFS_RETRIEVE_RELATED_TERMS`

The keywords_explorer_related_terms endpoint retrieves a list of related terms for a given keyword using Ahrefs' extensive keyword database. This tool is essential for expanding keyword research, finding new content ideas, and identifying potential long-tail keywords for SEO strategies. It provides valuable insights into semantically related terms that users are searching for, helping to broaden and refine content targeting. The endpoint is particularly useful when brainstorming content ideas or looking to expand the scope of an existing SEO campaign. However, it should be noted that this tool focuses on keyword relationships and does not provide metrics like search volume or keyword difficulty directly in its response.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `limit` | integer | No | The number of results to return. |
| `terms` | string ("also_rank_for" | "also_talk_about" | "all") | No | Related keywords which top-ranking pages also rank for (`also_rank_for`), additional keywords frequently mentioned in top-ranking pages (`also_talk_about`), or combination of both (`all`).  |
| `where` | string | No | The filter expression. The following column identifiers are recognized (this differs from the identifiers recognized by the `select` parameter). **cpc**: Cost Per Click shows the average price that advertisers pay for each ad click in paid search results for a keyword, in USD cents.   type: integer nullable **cps**: Clicks Per Search (or CPS) is the ratio of Clicks to Keyword Search volume. It shows how many different search results get clicked, on average, when people search for the target keyword in a given country.   type: float nullable **difficulty** (10 units): An estimation of how hard it is to rank in the top 10 organic search results for a keyword on a 100-point scale.   type: integer nullable **first_seen**: The date when we first checked search engine results for a keyword.   type: datetime nullable **global_volume** (10 units): How many times per month, on average, people search for the target keyword across all countries in our database.   type: integer nullable **intents** (10 units): Indicates the purpose behind the user"s search query. Object fields: `informational`, `navigational`, `commercial`, `transactional`, `branded` or `local`. All the fields are of type `bool`, with posible values `true` or `false`.   type: object nullable **keyword**:    type: string **parent_topic**: Parent Topic determines if you can rank for your target keyword while targeting a more general topic on your page instead. To identify the Parent Topic, we take the #1 ranking page for your keyword and find the keyword responsible for sending the most traffic to that page.   type: string nullable **serp_domain_rating_top10_min**: The keyword must have at least one ranking position in the top 10 results with a DR of up to this value.   type: float nullable **serp_domain_rating_top5_min**: The keyword must have at least one ranking position in the top 5 results with a DR of up to this value.   type: float nullable **serp_features**: The enriched results on a search engine results page (SERP) that are not traditional organic results.   type: array(string)   enum: `"ai_overview_sitelink"` `"snippet"` `"ai_overview"` `"local_pack"` `"sitelink"` `"news"` `"image"` `"video"` `"discussion"` `"tweet"` `"paid_top"` `"paid_bottom"` `"paid_sitelink"` `"shopping"` `"knowledge_card"` `"knowledge_panel"` `"question"` `"image_th"` `"video_th"` `"organic_shopping"` **serp_last_update**: The date when we last checked search engine results for a keyword.   type: datetime nullable **traffic_potential** (10 units): The sum of organic traffic that the #1 ranking page for your target keyword receives from all the keywords that it ranks for.   type: integer nullable **volume** (10 units): An estimation of the average monthly number of searches for a keyword over the latest known 12 months of data.   type: integer nullable **volume_desktop_pct**: The percentage of searches for a keyword performed on desktop devices.   type: float nullable **volume_mobile_pct**: The percentage of searches for a keyword performed on mobile devices.   type: float nullable **word_count**:    type: integer  |
| `offset` | integer | No | [Deprecated on 31 May 2024]. |
| `output` | string ("json" | "csv" | "xml" | "php") | No | The output format. |
| `select` | string | Yes | A comma-separated list of columns to return. See response schema for valid column identifiers.  |
| `country` | string ("ad" | "ae" | "af" | "ag" | "ai" | "al" | "am" | "ao" | "ar" | "as" | "at" | "au" | "aw" | "az" | "ba" | "bb" | "bd" | "be" | "bf" | "bg" | "bh" | "bi" | "bj" | "bn" | "bo" | "br" | "bs" | "bt" | "bw" | "by" | "bz" | "ca" | "cd" | "cf" | "cg" | "ch" | "ci" | "ck" | "cl" | "cm" | "cn" | "co" | "cr" | "cu" | "cv" | "cy" | "cz" | "de" | "dj" | "dk" | "dm" | "do" | "dz" | "ec" | "ee" | "eg" | "es" | "et" | "fi" | "fj" | "fm" | "fo" | "fr" | "ga" | "gb" | "gd" | "ge" | "gf" | "gg" | "gh" | "gi" | "gl" | "gm" | "gn" | "gp" | "gq" | "gr" | "gt" | "gu" | "gy" | "hk" | "hn" | "hr" | "ht" | "hu" | "id" | "ie" | "il" | "im" | "in" | "iq" | "is" | "it" | "je" | "jm" | "jo" | "jp" | "ke" | "kg" | "kh" | "ki" | "kn" | "kr" | "kw" | "ky" | "kz" | "la" | "lb" | "lc" | "li" | "lk" | "ls" | "lt" | "lu" | "lv" | "ly" | "ma" | "mc" | "md" | "me" | "mg" | "mk" | "ml" | "mm" | "mn" | "mq" | "mr" | "ms" | "mt" | "mu" | "mv" | "mw" | "mx" | "my" | "mz" | "na" | "nc" | "ne" | "ng" | "ni" | "nl" | "no" | "np" | "nr" | "nu" | "nz" | "om" | "pa" | "pe" | "pf" | "pg" | "ph" | "pk" | "pl" | "pn" | "pr" | "ps" | "pt" | "py" | "qa" | "re" | "ro" | "rs" | "ru" | "rw" | "sa" | "sb" | "sc" | "se" | "sg" | "sh" | "si" | "sk" | "sl" | "sm" | "sn" | "so" | "sr" | "st" | "sv" | "td" | "tg" | "th" | "tj" | "tk" | "tl" | "tm" | "tn" | "to" | "tr" | "tt" | "tw" | "tz" | "ua" | "ug" | "us" | "uy" | "uz" | "vc" | "ve" | "vg" | "vi" | "vn" | "vu" | "ws" | "ye" | "yt" | "za" | "zm" | "zw") | Yes | A two-letter country code (ISO 3166-1 alpha-2). |
| `timeout` | integer | No | A manual timeout duration in seconds. |
| `keywords` | string | No | A comma-separated list of keywords to show metrics for. |
| `order_by` | string | No | A column to order results by. See response schema for valid column identifiers.  |
| `view_for` | string ("top_10" | "top_100") | No | View keywords for the top 10 or top 100 ranking pages. |
| `keyword_list_id` | integer | No | The id of an existing keyword list to show metrics for. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Retrieve site explorer keywords history

**Slug:** `AHREFS_RETRIEVE_SITE_EXPLORER_KEYWORDS_HISTORY`

Retrieves historical keyword performance data for a specified website or domain using Ahrefs' Site Explorer. This endpoint provides insights into how keywords have performed over time, including changes in rankings, search volume, and potential traffic. It's particularly useful for analyzing SEO trends, understanding the impact of optimization efforts, and identifying seasonal patterns in keyword performance. The tool should be used when you need a comprehensive view of a website's keyword history to inform SEO strategies and content planning. It does not provide real-time data and may have limitations on the historical range available.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `mode` | string ("exact" | "prefix" | "domain" | "subdomains") | No | The scope of the search based on the target you entered. |
| `output` | string ("json" | "csv" | "xml" | "php") | No | The output format. |
| `select` | string | No | A comma-separated list of columns to return. See response schema for valid column identifiers.  |
| `target` | string | Yes | The target of the search: a domain or a URL. |
| `country` | string ("ad" | "ae" | "af" | "ag" | "ai" | "al" | "am" | "ao" | "ar" | "as" | "at" | "au" | "aw" | "az" | "ba" | "bb" | "bd" | "be" | "bf" | "bg" | "bh" | "bi" | "bj" | "bn" | "bo" | "br" | "bs" | "bt" | "bw" | "by" | "bz" | "ca" | "cd" | "cf" | "cg" | "ch" | "ci" | "ck" | "cl" | "cm" | "cn" | "co" | "cr" | "cu" | "cv" | "cy" | "cz" | "de" | "dj" | "dk" | "dm" | "do" | "dz" | "ec" | "ee" | "eg" | "es" | "et" | "fi" | "fj" | "fm" | "fo" | "fr" | "ga" | "gb" | "gd" | "ge" | "gf" | "gg" | "gh" | "gi" | "gl" | "gm" | "gn" | "gp" | "gq" | "gr" | "gt" | "gu" | "gy" | "hk" | "hn" | "hr" | "ht" | "hu" | "id" | "ie" | "il" | "im" | "in" | "iq" | "is" | "it" | "je" | "jm" | "jo" | "jp" | "ke" | "kg" | "kh" | "ki" | "kn" | "kr" | "kw" | "ky" | "kz" | "la" | "lb" | "lc" | "li" | "lk" | "ls" | "lt" | "lu" | "lv" | "ly" | "ma" | "mc" | "md" | "me" | "mg" | "mk" | "ml" | "mm" | "mn" | "mq" | "mr" | "ms" | "mt" | "mu" | "mv" | "mw" | "mx" | "my" | "mz" | "na" | "nc" | "ne" | "ng" | "ni" | "nl" | "no" | "np" | "nr" | "nu" | "nz" | "om" | "pa" | "pe" | "pf" | "pg" | "ph" | "pk" | "pl" | "pn" | "pr" | "ps" | "pt" | "py" | "qa" | "re" | "ro" | "rs" | "ru" | "rw" | "sa" | "sb" | "sc" | "se" | "sg" | "sh" | "si" | "sk" | "sl" | "sm" | "sn" | "so" | "sr" | "st" | "sv" | "td" | "tg" | "th" | "tj" | "tk" | "tl" | "tm" | "tn" | "to" | "tr" | "tt" | "tw" | "tz" | "ua" | "ug" | "us" | "uy" | "uz" | "vc" | "ve" | "vg" | "vi" | "vn" | "vu" | "ws" | "ye" | "yt" | "za" | "zm" | "zw") | No | A two-letter country code (ISO 3166-1 alpha-2). |
| `date_to` | string | No | The end date of the historical period in YYYY-MM-DD format. |
| `protocol` | string ("both" | "http" | "https") | No | The protocol of your target. |
| `date_from` | string | Yes | The start date of the historical period in YYYY-MM-DD format. |
| `history_grouping` | string ("daily" | "weekly" | "monthly") | No | The time interval used to group historical data. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Retrieve site explorer metrics

**Slug:** `AHREFS_RETRIEVE_SITE_EXPLORER_METRICS`

The GetSiteExplorerMetrics endpoint retrieves comprehensive SEO metrics for a specified website using Ahrefs' Site Explorer tool. It provides crucial data such as backlink profile, referring pages, organic keyword rankings, and various other SEO-related metrics that are essential for understanding a website's performance and authority in search engine results. This endpoint is particularly useful for SEO professionals, digital marketers, and website owners who need to analyze their own sites or competitor websites. The tool offers flexibility in terms of analysis scope and specific metrics retrieval, allowing users to tailor the data to their specific needs. However, users should be aware that the depth and recency of data may vary depending on Ahrefs' crawling frequency and the size of the target website.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `date` | string | Yes | A date to report metrics on in YYYY-MM-DD format. |
| `mode` | string ("exact" | "prefix" | "domain" | "subdomains") | No | The scope of the search based on the target you entered. |
| `output` | string ("json" | "csv" | "xml" | "php") | No | The output format. |
| `target` | string | Yes | The target of the search: a domain or a URL. |
| `country` | string ("ad" | "ae" | "af" | "ag" | "ai" | "al" | "am" | "ao" | "ar" | "as" | "at" | "au" | "aw" | "az" | "ba" | "bb" | "bd" | "be" | "bf" | "bg" | "bh" | "bi" | "bj" | "bn" | "bo" | "br" | "bs" | "bt" | "bw" | "by" | "bz" | "ca" | "cd" | "cf" | "cg" | "ch" | "ci" | "ck" | "cl" | "cm" | "cn" | "co" | "cr" | "cu" | "cv" | "cy" | "cz" | "de" | "dj" | "dk" | "dm" | "do" | "dz" | "ec" | "ee" | "eg" | "es" | "et" | "fi" | "fj" | "fm" | "fo" | "fr" | "ga" | "gb" | "gd" | "ge" | "gf" | "gg" | "gh" | "gi" | "gl" | "gm" | "gn" | "gp" | "gq" | "gr" | "gt" | "gu" | "gy" | "hk" | "hn" | "hr" | "ht" | "hu" | "id" | "ie" | "il" | "im" | "in" | "iq" | "is" | "it" | "je" | "jm" | "jo" | "jp" | "ke" | "kg" | "kh" | "ki" | "kn" | "kr" | "kw" | "ky" | "kz" | "la" | "lb" | "lc" | "li" | "lk" | "ls" | "lt" | "lu" | "lv" | "ly" | "ma" | "mc" | "md" | "me" | "mg" | "mk" | "ml" | "mm" | "mn" | "mq" | "mr" | "ms" | "mt" | "mu" | "mv" | "mw" | "mx" | "my" | "mz" | "na" | "nc" | "ne" | "ng" | "ni" | "nl" | "no" | "np" | "nr" | "nu" | "nz" | "om" | "pa" | "pe" | "pf" | "pg" | "ph" | "pk" | "pl" | "pn" | "pr" | "ps" | "pt" | "py" | "qa" | "re" | "ro" | "rs" | "ru" | "rw" | "sa" | "sb" | "sc" | "se" | "sg" | "sh" | "si" | "sk" | "sl" | "sm" | "sn" | "so" | "sr" | "st" | "sv" | "td" | "tg" | "th" | "tj" | "tk" | "tl" | "tm" | "tn" | "to" | "tr" | "tt" | "tw" | "tz" | "ua" | "ug" | "us" | "uy" | "uz" | "vc" | "ve" | "vg" | "vi" | "vn" | "vu" | "ws" | "ye" | "yt" | "za" | "zm" | "zw") | No | A two-letter country code (ISO 3166-1 alpha-2). |
| `protocol` | string ("both" | "http" | "https") | No | The protocol of your target. |
| `volume_mode` | string ("monthly" | "average") | No | The search volume calculation mode: monthly or average. It affects volume, traffic, and traffic value.  |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Retrieve site explorer metrics history

**Slug:** `AHREFS_RETRIEVE_SITE_EXPLORER_METRICS_HISTORY`

Retrieves historical SEO metrics data for a specified website over a given time period. This endpoint is part of the Ahrefs Site Explorer tool and provides valuable insights into a website's performance trends. It should be used when analyzing long-term SEO progress, identifying patterns in backlink growth, or tracking changes in organic traffic and keyword rankings. The tool is particularly useful for competitive analysis, allowing users to compare their website's historical performance against competitors. It's important to note that the data granularity may vary depending on the date range selected, with more recent dates potentially offering more detailed data.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `mode` | string ("exact" | "prefix" | "domain" | "subdomains") | No | The scope of the search based on the target you entered. |
| `output` | string ("json" | "csv" | "xml" | "php") | No | The output format. |
| `select` | string | No | A comma-separated list of columns to return. See response schema for valid column identifiers.  |
| `target` | string | Yes | The target of the search: a domain or a URL. |
| `country` | string ("ad" | "ae" | "af" | "ag" | "ai" | "al" | "am" | "ao" | "ar" | "as" | "at" | "au" | "aw" | "az" | "ba" | "bb" | "bd" | "be" | "bf" | "bg" | "bh" | "bi" | "bj" | "bn" | "bo" | "br" | "bs" | "bt" | "bw" | "by" | "bz" | "ca" | "cd" | "cf" | "cg" | "ch" | "ci" | "ck" | "cl" | "cm" | "cn" | "co" | "cr" | "cu" | "cv" | "cy" | "cz" | "de" | "dj" | "dk" | "dm" | "do" | "dz" | "ec" | "ee" | "eg" | "es" | "et" | "fi" | "fj" | "fm" | "fo" | "fr" | "ga" | "gb" | "gd" | "ge" | "gf" | "gg" | "gh" | "gi" | "gl" | "gm" | "gn" | "gp" | "gq" | "gr" | "gt" | "gu" | "gy" | "hk" | "hn" | "hr" | "ht" | "hu" | "id" | "ie" | "il" | "im" | "in" | "iq" | "is" | "it" | "je" | "jm" | "jo" | "jp" | "ke" | "kg" | "kh" | "ki" | "kn" | "kr" | "kw" | "ky" | "kz" | "la" | "lb" | "lc" | "li" | "lk" | "ls" | "lt" | "lu" | "lv" | "ly" | "ma" | "mc" | "md" | "me" | "mg" | "mk" | "ml" | "mm" | "mn" | "mq" | "mr" | "ms" | "mt" | "mu" | "mv" | "mw" | "mx" | "my" | "mz" | "na" | "nc" | "ne" | "ng" | "ni" | "nl" | "no" | "np" | "nr" | "nu" | "nz" | "om" | "pa" | "pe" | "pf" | "pg" | "ph" | "pk" | "pl" | "pn" | "pr" | "ps" | "pt" | "py" | "qa" | "re" | "ro" | "rs" | "ru" | "rw" | "sa" | "sb" | "sc" | "se" | "sg" | "sh" | "si" | "sk" | "sl" | "sm" | "sn" | "so" | "sr" | "st" | "sv" | "td" | "tg" | "th" | "tj" | "tk" | "tl" | "tm" | "tn" | "to" | "tr" | "tt" | "tw" | "tz" | "ua" | "ug" | "us" | "uy" | "uz" | "vc" | "ve" | "vg" | "vi" | "vn" | "vu" | "ws" | "ye" | "yt" | "za" | "zm" | "zw") | No | A two-letter country code (ISO 3166-1 alpha-2). |
| `date_to` | string | No | The end date of the historical period in YYYY-MM-DD format. |
| `protocol` | string ("both" | "http" | "https") | No | The protocol of your target. |
| `date_from` | string | Yes | The start date of the historical period in YYYY-MM-DD format. |
| `volume_mode` | string ("monthly" | "average") | No | The search volume calculation mode: monthly or average. It affects volume, traffic, and traffic value.  |
| `history_grouping` | string ("daily" | "weekly" | "monthly") | No | The time interval used to group historical data. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Retrieve site explorer pages history

**Slug:** `AHREFS_RETRIEVE_SITE_EXPLORER_PAGES_HISTORY`

The get_site_explorer_pages_history endpoint retrieves historical data about specific pages or domains from Ahrefs' Site Explorer. It tracks changes in SEO performance over time, including backlinks, organic traffic, and visibility. Use this endpoint for assessing historical performance, comparing metrics, and identifying trends. Ideal for SEO audits and competitor analysis. Data availability may vary based on Ahrefs' crawl history.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `mode` | string ("exact" | "prefix" | "domain" | "subdomains") | No | The scope of the search based on the target you entered. |
| `output` | string ("json" | "csv" | "xml" | "php") | No | The output format. |
| `target` | string | Yes | The target of the search: a domain or a URL. |
| `country` | string ("ad" | "ae" | "af" | "ag" | "ai" | "al" | "am" | "ao" | "ar" | "as" | "at" | "au" | "aw" | "az" | "ba" | "bb" | "bd" | "be" | "bf" | "bg" | "bh" | "bi" | "bj" | "bn" | "bo" | "br" | "bs" | "bt" | "bw" | "by" | "bz" | "ca" | "cd" | "cf" | "cg" | "ch" | "ci" | "ck" | "cl" | "cm" | "cn" | "co" | "cr" | "cu" | "cv" | "cy" | "cz" | "de" | "dj" | "dk" | "dm" | "do" | "dz" | "ec" | "ee" | "eg" | "es" | "et" | "fi" | "fj" | "fm" | "fo" | "fr" | "ga" | "gb" | "gd" | "ge" | "gf" | "gg" | "gh" | "gi" | "gl" | "gm" | "gn" | "gp" | "gq" | "gr" | "gt" | "gu" | "gy" | "hk" | "hn" | "hr" | "ht" | "hu" | "id" | "ie" | "il" | "im" | "in" | "iq" | "is" | "it" | "je" | "jm" | "jo" | "jp" | "ke" | "kg" | "kh" | "ki" | "kn" | "kr" | "kw" | "ky" | "kz" | "la" | "lb" | "lc" | "li" | "lk" | "ls" | "lt" | "lu" | "lv" | "ly" | "ma" | "mc" | "md" | "me" | "mg" | "mk" | "ml" | "mm" | "mn" | "mq" | "mr" | "ms" | "mt" | "mu" | "mv" | "mw" | "mx" | "my" | "mz" | "na" | "nc" | "ne" | "ng" | "ni" | "nl" | "no" | "np" | "nr" | "nu" | "nz" | "om" | "pa" | "pe" | "pf" | "pg" | "ph" | "pk" | "pl" | "pn" | "pr" | "ps" | "pt" | "py" | "qa" | "re" | "ro" | "rs" | "ru" | "rw" | "sa" | "sb" | "sc" | "se" | "sg" | "sh" | "si" | "sk" | "sl" | "sm" | "sn" | "so" | "sr" | "st" | "sv" | "td" | "tg" | "th" | "tj" | "tk" | "tl" | "tm" | "tn" | "to" | "tr" | "tt" | "tw" | "tz" | "ua" | "ug" | "us" | "uy" | "uz" | "vc" | "ve" | "vg" | "vi" | "vn" | "vu" | "ws" | "ye" | "yt" | "za" | "zm" | "zw") | No | A two-letter country code (ISO 3166-1 alpha-2). |
| `date_to` | string | No | The end date of the historical period in YYYY-MM-DD format. |
| `protocol` | string ("both" | "http" | "https") | No | The protocol of your target. |
| `date_from` | string | Yes | The start date of the historical period in YYYY-MM-DD format. |
| `history_grouping` | string ("daily" | "weekly" | "monthly") | No | The time interval used to group historical data. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Retrieve site explorer referring domains history

**Slug:** `AHREFS_RETRIEVE_SITE_EXPLORER_REFERRING_DOMAINS_HISTORY`

Retrieves the historical data of referring domains for a specified website or URL over time. This endpoint is part of Ahrefs' Site Explorer tool and provides valuable insights into the growth or decline of a website's backlink profile. It should be used when analyzing the long-term SEO performance of a website, identifying trends in link building efforts, or comparing the backlink acquisition rates of different domains. The data returned includes the number of referring domains at various points in time, allowing users to track changes and potentially correlate them with specific events or marketing efforts. This endpoint is particularly useful for SEO professionals, digital marketers, and website owners who need to monitor their site's authority growth over time or analyze competitors' link building strategies.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `mode` | string ("exact" | "prefix" | "domain" | "subdomains") | No | The scope of the search based on the target you entered. |
| `output` | string ("json" | "csv" | "xml" | "php") | No | The output format. |
| `target` | string | Yes | The target of the search: a domain or a URL. |
| `date_to` | string | No | The end date of the historical period in YYYY-MM-DD format. |
| `protocol` | string ("both" | "http" | "https") | No | The protocol of your target. |
| `date_from` | string | Yes | The start date of the historical period in YYYY-MM-DD format. |
| `history_grouping` | string ("daily" | "weekly" | "monthly") | No | The time interval used to group historical data. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Retrieve subscription limits and usage

**Slug:** `AHREFS_RETRIEVE_SUBSCRIPTION_LIMITS_AND_USAGE`

Retrieves detailed information about the current subscription limits and usage for an Ahrefs account. This endpoint provides essential data to monitor API consumption, track remaining credits or rows, and manage subscription usage effectively. It should be used regularly to ensure compliance with plan limits and to plan for potential upgrades or additional purchases. The tool does not modify any account settings or usage data; it only provides a snapshot of the current status. While specific response fields are not detailed in the schema, users can expect information about total limits, current usage, and possibly remaining allowances for various Ahrefs features and API endpoints.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `output` | string ("json" | "csv" | "xml" | "php") | No | The output format. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Retrieve top pages from site explorer

**Slug:** `AHREFS_RETRIEVE_TOP_PAGES_FROM_SITE_EXPLORER`

Retrieves data about the top-performing pages of a specified website using Ahrefs' Site Explorer tool. This endpoint provides valuable insights into a site's most successful content based on various SEO metrics. It's particularly useful for content analysis, competitive research, and identifying opportunities for optimization. The data returned includes details such as page URLs, organic traffic estimates, ranking keywords, and other relevant SEO metrics for each top page. Use this endpoint when you need to analyze the best-performing content of a website or compare top pages across different domains. Note that the results are based on Ahrefs' data and estimates, which may not always reflect real-time traffic or exact Google rankings.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `date` | string | Yes | A date to report metrics on in YYYY-MM-DD format. |
| `mode` | string ("exact" | "prefix" | "domain" | "subdomains") | No | The scope of the search based on the target you entered. |
| `limit` | integer | No | The number of results to return. |
| `where` | string | No | The filter expression. The following column identifiers are recognized (this differs from the identifiers recognized by the `select` parameter). **cpc**   type: integer nullable **cpc_prev**: The CPC metric on the comparison date.   type: integer nullable **has_thumbnail**: The position has a thumbnail.   type: boolean **has_thumbnail_prev**: The position has a thumbnail on the comparison date.   type: boolean **has_video**: The position has a video.   type: boolean **has_video_prev**: The position has a video on the comparison date.   type: boolean **keyword**: The keyword your target ranks for.   type: string **keyword_difficulty** (10 units): An estimation of how hard it is to rank in the top 10 organic search results for a keyword on a 100-point scale.   type: integer nullable **keyword_difficulty_prev** (10 units): The keyword difficulty on the comparison date.   type: integer nullable **keyword_prev**: The keyword your target ranks for on the comparison date.   type: string **keywords**: The total number of keywords that your target ranks for in the top 100 organic search results.   type: integer **keywords_diff**: The change in keywords between your selected dates.   type: integer **keywords_diff_percent**: The change in keywords between your selected dates, in percents.   type: integer **keywords_merged**: The total number of keywords optimized for sorting.   type: integer **keywords_prev**: The keyword your target ranks for on the comparison date.   type: integer **position**: The position your target ranks for in the organic search results for a keyword.   type: integer **position_kind**: The kind of a position: organic, paid or a SERP feature. This applies to all positions for a given keyword and URL before picking the top position.   type: string   enum: `"paid_top"` `"paid_bottom"` `"paid_right"` `"paid_sitelink"` `"organic"` `"sitelink"` `"snippet"` `"image"` `"article"` `"knowledge_card"` `"knowledge_panel"` `"local_pack"` `"local_teaser"` `"news"` `"question"` `"review"` `"shopping"` `"tweet"` `"spelling"` `"video"` `"discussion"` `"ai_overview"` `"ai_overview_sitelink"` `"organic_shopping"` **position_kind_prev**: The kind of a position on the comparison date.   type: string   enum: `"paid_top"` `"paid_bottom"` `"paid_right"` `"paid_sitelink"` `"organic"` `"sitelink"` `"snippet"` `"image"` `"article"` `"knowledge_card"` `"knowledge_panel"` `"local_pack"` `"local_teaser"` `"news"` `"question"` `"review"` `"shopping"` `"tweet"` `"spelling"` `"video"` `"discussion"` `"ai_overview"` `"ai_overview_sitelink"` `"organic_shopping"` **position_prev**: The position of your target for a given keyword on the comparison date.   type: integer **raw_url**: The ranking page URL in encoded format.   type: string **raw_url_prev**: The ranking page URL on the comparison date in encoded format.   type: string **serp_features**   type: array(string)   enum: `"paid_top"` `"paid_bottom"` `"paid_right"` `"paid_sitelink"` `"organic"` `"sitelink"` `"snippet"` `"image"` `"article"` `"knowledge_card"` `"knowledge_panel"` `"local_pack"` `"local_teaser"` `"news"` `"question"` `"review"` `"shopping"` `"tweet"` `"spelling"` `"video"` `"discussion"` `"ai_overview"` `"ai_overview_sitelink"` `"organic_shopping"` `"image_th"` `"video_th"` `"ai_overview_found"` **serp_features_prev**: The SERP features on the comparison date.   type: array(string)   enum: `"paid_top"` `"paid_bottom"` `"paid_right"` `"paid_sitelink"` `"organic"` `"sitelink"` `"snippet"` `"image"` `"article"` `"knowledge_card"` `"knowledge_panel"` `"local_pack"` `"local_teaser"` `"news"` `"question"` `"review"` `"shopping"` `"tweet"` `"spelling"` `"video"` `"discussion"` `"ai_overview"` `"ai_overview_sitelink"` `"organic_shopping"` `"image_th"` `"video_th"` `"ai_overview_found"` **status**: The status of a page: the new page that just started to rank ("left"), the lost page that disappeared from search results ("right"), or no change ("both").   type: string   enum: `"left"` `"right"` `"both"` **sum_traffic** (10 units): An estimation of the monthly organic search traffic that a page gets from all the keywords that it ranks for.   type: integer nullable **sum_traffic_merged** (10 units): The traffic field optimized for sorting.   type: integer **sum_traffic_prev** (10 units): The traffic on the comparison date.   type: integer nullable **top_keyword**: The keyword that brings the most organic traffic to a page.   type: string nullable **top_keyword_best_position**: The ranking position that a page holds for its top keyword.   type: integer nullable **top_keyword_best_position_diff**: The change in the top position between your selected dates.   type: integer nullable **top_keyword_best_position_kind**: The kind of the top position: organic, paid or a SERP feature.   type: string nullable   enum: `"paid_top"` `"paid_bottom"` `"paid_right"` `"paid_sitelink"` `"organic"` `"sitelink"` `"snippet"` `"image"` `"article"` `"knowledge_card"` `"knowledge_panel"` `"local_pack"` `"local_teaser"` `"news"` `"question"` `"review"` `"shopping"` `"tweet"` `"spelling"` `"video"` `"discussion"` `"ai_overview"` `"ai_overview_sitelink"` `"organic_shopping"` **top_keyword_best_position_kind_prev**: The kind of the top position on the comparison date.   type: string nullable   enum: `"paid_top"` `"paid_bottom"` `"paid_right"` `"paid_sitelink"` `"organic"` `"sitelink"` `"snippet"` `"image"` `"article"` `"knowledge_card"` `"knowledge_panel"` `"local_pack"` `"local_teaser"` `"news"` `"question"` `"review"` `"shopping"` `"tweet"` `"spelling"` `"video"` `"discussion"` `"ai_overview"` `"ai_overview_sitelink"` `"organic_shopping"` **top_keyword_best_position_prev**: The top position on the comparison date.   type: integer nullable **top_keyword_best_position_title**: The title displayed for the page in its top keyword"s SERP.   type: string nullable **top_keyword_best_position_title_prev**: The title displayed for the page in its top keyword"s SERP on the comparison date.   type: string nullable **top_keyword_country**: The country in which a page ranks for its top keyword.   type: string nullable   enum: `"AD"` `"AE"` `"AF"` `"AG"` `"AI"` `"AL"` `"AM"` `"AO"` `"AQ"` `"AR"` `"AS"` `"AT"` `"AU"` `"AW"` `"AX"` `"AZ"` `"BA"` `"BB"` `"BD"` `"BE"` `"BF"` `"BG"` `"BH"` `"BI"` `"BJ"` `"BL"` `"BM"` `"BN"` `"BO"` `"BQ"` `"BR"` `"BS"` `"BT"` `"BV"` `"BW"` `"BY"` `"BZ"` `"CA"` `"CC"` `"CD"` `"CF"` `"CG"` `"CH"` `"CI"` `"CK"` `"CL"` `"CM"` `"CN"` `"CO"` `"CR"` `"CU"` `"CV"` `"CW"` `"CX"` `"CY"` `"CZ"` `"DE"` `"DJ"` `"DK"` `"DM"` `"DO"` `"DZ"` `"EC"` `"EE"` `"EG"` `"EH"` `"ER"` `"ES"` `"ET"` `"FI"` `"FJ"` `"FK"` `"FM"` `"FO"` `"FR"` `"GA"` `"GB"` `"GD"` `"GE"` `"GF"` `"GG"` `"GH"` `"GI"` `"GL"` `"GM"` `"GN"` `"GP"` `"GQ"` `"GR"` `"GS"` `"GT"` `"GU"` `"GW"` `"GY"` `"HK"` `"HM"` `"HN"` `"HR"` `"HT"` `"HU"` `"ID"` `"IE"` `"IL"` `"IM"` `"IN"` `"IO"` `"IQ"` `"IR"` `"IS"` `"IT"` `"JE"` `"JM"` `"JO"` `"JP"` `"KE"` `"KG"` `"KH"` `"KI"` `"KM"` `"KN"` `"KP"` `"KR"` `"KW"` `"KY"` `"KZ"` `"LA"` `"LB"` `"LC"` `"LI"` `"LK"` `"LR"` `"LS"` `"LT"` `"LU"` `"LV"` `"LY"` `"MA"` `"MC"` `"MD"` `"ME"` `"MF"` `"MG"` `"MH"` `"MK"` `"ML"` `"MM"` `"MN"` `"MO"` `"MP"` `"MQ"` `"MR"` `"MS"` `"MT"` `"MU"` `"MV"` `"MW"` `"MX"` `"MY"` `"MZ"` `"NA"` `"NC"` `"NE"` `"NF"` `"NG"` `"NI"` `"NL"` `"NO"` `"NP"` `"NR"` `"NU"` `"NZ"` `"OM"` `"OTHER"` `"PA"` `"PE"` `"PF"` `"PG"` `"PH"` `"PK"` `"PL"` `"PM"` `"PN"` `"PR"` `"PS"` `"PT"` `"PW"` `"PY"` `"QA"` `"RE"` `"RO"` `"RS"` `"RU"` `"RW"` `"SA"` `"SB"` `"SC"` `"SD"` `"SE"` `"SG"` `"SH"` `"SI"` `"SJ"` `"SK"` `"SL"` `"SM"` `"SN"` `"SO"` `"SR"` `"SS"` `"ST"` `"SV"` `"SX"` `"SY"` `"SZ"` `"TC"` `"TD"` `"TF"` `"TG"` `"TH"` `"TJ"` `"TK"` `"TL"` `"TM"` `"TN"` `"TO"` `"TR"` `"TT"` `"TV"` `"TW"` `"TZ"` `"UA"` `"UG"` `"UM"` `"US"` `"UY"` `"UZ"` `"VA"` `"VC"` `"VE"` `"VG"` `"VI"` `"VN"` `"VU"` `"WF"` `"WS"` `"YE"` `"YT"` `"ZA"` `"ZM"` `"ZW"` **top_keyword_country_prev**: The country in which a page ranks for its top keyword on the comparison date.   type: string nullable   enum: `"AD"` `"AE"` `"AF"` `"AG"` `"AI"` `"AL"` `"AM"` `"AO"` `"AQ"` `"AR"` `"AS"` `"AT"` `"AU"` `"AW"` `"AX"` `"AZ"` `"BA"` `"BB"` `"BD"` `"BE"` `"BF"` `"BG"` `"BH"` `"BI"` `"BJ"` `"BL"` `"BM"` `"BN"` `"BO"` `"BQ"` `"BR"` `"BS"` `"BT"` `"BV"` `"BW"` `"BY"` `"BZ"` `"CA"` `"CC"` `"CD"` `"CF"` `"CG"` `"CH"` `"CI"` `"CK"` `"CL"` `"CM"` `"CN"` `"CO"` `"CR"` `"CU"` `"CV"` `"CW"` `"CX"` `"CY"` `"CZ"` `"DE"` `"DJ"` `"DK"` `"DM"` `"DO"` `"DZ"` `"EC"` `"EE"` `"EG"` `"EH"` `"ER"` `"ES"` `"ET"` `"FI"` `"FJ"` `"FK"` `"FM"` `"FO"` `"FR"` `"GA"` `"GB"` `"GD"` `"GE"` `"GF"` `"GG"` `"GH"` `"GI"` `"GL"` `"GM"` `"GN"` `"GP"` `"GQ"` `"GR"` `"GS"` `"GT"` `"GU"` `"GW"` `"GY"` `"HK"` `"HM"` `"HN"` `"HR"` `"HT"` `"HU"` `"ID"` `"IE"` `"IL"` `"IM"` `"IN"` `"IO"` `"IQ"` `"IR"` `"IS"` `"IT"` `"JE"` `"JM"` `"JO"` `"JP"` `"KE"` `"KG"` `"KH"` `"KI"` `"KM"` `"KN"` `"KP"` `"KR"` `"KW"` `"KY"` `"KZ"` `"LA"` `"LB"` `"LC"` `"LI"` `"LK"` `"LR"` `"LS"` `"LT"` `"LU"` `"LV"` `"LY"` `"MA"` `"MC"` `"MD"` `"ME"` `"MF"` `"MG"` `"MH"` `"MK"` `"ML"` `"MM"` `"MN"` `"MO"` `"MP"` `"MQ"` `"MR"` `"MS"` `"MT"` `"MU"` `"MV"` `"MW"` `"MX"` `"MY"` `"MZ"` `"NA"` `"NC"` `"NE"` `"NF"` `"NG"` `"NI"` `"NL"` `"NO"` `"NP"` `"NR"` `"NU"` `"NZ"` `"OM"` `"OTHER"` `"PA"` `"PE"` `"PF"` `"PG"` `"PH"` `"PK"` `"PL"` `"PM"` `"PN"` `"PR"` `"PS"` `"PT"` `"PW"` `"PY"` `"QA"` `"RE"` `"RO"` `"RS"` `"RU"` `"RW"` `"SA"` `"SB"` `"SC"` `"SD"` `"SE"` `"SG"` `"SH"` `"SI"` `"SJ"` `"SK"` `"SL"` `"SM"` `"SN"` `"SO"` `"SR"` `"SS"` `"ST"` `"SV"` `"SX"` `"SY"` `"SZ"` `"TC"` `"TD"` `"TF"` `"TG"` `"TH"` `"TJ"` `"TK"` `"TL"` `"TM"` `"TN"` `"TO"` `"TR"` `"TT"` `"TV"` `"TW"` `"TZ"` `"UA"` `"UG"` `"UM"` `"US"` `"UY"` `"UZ"` `"VA"` `"VC"` `"VE"` `"VG"` `"VI"` `"VN"` `"VU"` `"WF"` `"WS"` `"YE"` `"YT"` `"ZA"` `"ZM"` `"ZW"` **top_keyword_prev**: The keyword that brings the most organic traffic to a page on the comparison date.   type: string nullable **top_keyword_volume** (10 units): An estimation of the average monthly number of searches for the top keyword over the latest month or over the latest known 12 months of data depending on the "volume_mode" parameter.   type: integer nullable **top_keyword_volume_prev** (10 units): The search volume on the comparison date.   type: integer nullable **traffic** (10 units): An estimation of the number of monthly visitors that your target gets from organic search for a keyword.   type: integer **traffic_diff**: The change in traffic between your selected dates.   type: integer **traffic_diff_percent**: The change in traffic between your selected dates, in percents.   type: integer **traffic_prev** (10 units): The traffic from a keyword on the comparison date.   type: integer **url**: The ranking page URL.   type: url nullable **url_prev**: The ranking page URL on the comparison date.   type: url nullable **value** (10 units): The estimated value of a page"s monthly organic search traffic, in USD cents.   type: integer nullable **value_diff**: The change in traffic value between your selected dates.   type: integer **value_diff_percent**: The change in traffic value between your selected dates, in percents.   type: integer **value_merged** (10 units): The traffic value field optimized for sorting.   type: integer nullable **value_prev** (10 units): The traffic value on the comparison date.   type: integer nullable **volume** (10 units): An estimation of the number of searches for a keyword over the latest month.   type: integer nullable **volume_prev** (10 units): The search volume on the comparison date.   type: integer nullable **words**: The number of words in a keyword.   type: integer **words_prev**: The number of words in a keyword on the comparison date.   type: integer  |
| `offset` | integer | No | [Deprecated on 31 May 2024]. |
| `output` | string ("json" | "csv" | "xml" | "php") | No | The output format. |
| `select` | string | Yes | A comma-separated list of columns to return. See response schema for valid column identifiers.  |
| `target` | string | Yes | The target of the search: a domain or a URL. |
| `country` | string ("ad" | "ae" | "af" | "ag" | "ai" | "al" | "am" | "ao" | "ar" | "as" | "at" | "au" | "aw" | "az" | "ba" | "bb" | "bd" | "be" | "bf" | "bg" | "bh" | "bi" | "bj" | "bn" | "bo" | "br" | "bs" | "bt" | "bw" | "by" | "bz" | "ca" | "cd" | "cf" | "cg" | "ch" | "ci" | "ck" | "cl" | "cm" | "cn" | "co" | "cr" | "cu" | "cv" | "cy" | "cz" | "de" | "dj" | "dk" | "dm" | "do" | "dz" | "ec" | "ee" | "eg" | "es" | "et" | "fi" | "fj" | "fm" | "fo" | "fr" | "ga" | "gb" | "gd" | "ge" | "gf" | "gg" | "gh" | "gi" | "gl" | "gm" | "gn" | "gp" | "gq" | "gr" | "gt" | "gu" | "gy" | "hk" | "hn" | "hr" | "ht" | "hu" | "id" | "ie" | "il" | "im" | "in" | "iq" | "is" | "it" | "je" | "jm" | "jo" | "jp" | "ke" | "kg" | "kh" | "ki" | "kn" | "kr" | "kw" | "ky" | "kz" | "la" | "lb" | "lc" | "li" | "lk" | "ls" | "lt" | "lu" | "lv" | "ly" | "ma" | "mc" | "md" | "me" | "mg" | "mk" | "ml" | "mm" | "mn" | "mq" | "mr" | "ms" | "mt" | "mu" | "mv" | "mw" | "mx" | "my" | "mz" | "na" | "nc" | "ne" | "ng" | "ni" | "nl" | "no" | "np" | "nr" | "nu" | "nz" | "om" | "pa" | "pe" | "pf" | "pg" | "ph" | "pk" | "pl" | "pn" | "pr" | "ps" | "pt" | "py" | "qa" | "re" | "ro" | "rs" | "ru" | "rw" | "sa" | "sb" | "sc" | "se" | "sg" | "sh" | "si" | "sk" | "sl" | "sm" | "sn" | "so" | "sr" | "st" | "sv" | "td" | "tg" | "th" | "tj" | "tk" | "tl" | "tm" | "tn" | "to" | "tr" | "tt" | "tw" | "tz" | "ua" | "ug" | "us" | "uy" | "uz" | "vc" | "ve" | "vg" | "vi" | "vn" | "vu" | "ws" | "ye" | "yt" | "za" | "zm" | "zw") | No | A two-letter country code (ISO 3166-1 alpha-2). |
| `timeout` | integer | No | A manual timeout duration in seconds. |
| `order_by` | string | No | A column to order results by. See response schema for valid column identifiers.  |
| `protocol` | string ("both" | "http" | "https") | No | The protocol of your target. |
| `volume_mode` | string ("monthly" | "average") | No | The search volume calculation mode: monthly or average. It affects volume, traffic, and traffic value.  |
| `date_compared` | string | No | A date to compare metrics with in YYYY-MM-DD format. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Retrieve volume history

**Slug:** `AHREFS_RETRIEVE_VOLUME_HISTORY`

Retrieves the historical search volume data for a specified keyword using Ahrefs' Keywords Explorer tool. This endpoint provides valuable insights into how the popularity of a keyword has changed over time, allowing users to analyze trends, seasonality, and long-term shifts in search behavior. The data returned can be crucial for planning SEO strategies, content calendars, and understanding market dynamics. It's particularly useful when you need to assess the historical performance of keywords, identify seasonal patterns, or evaluate the potential of trending topics. The tool does not provide future predictions or real-time data, focusing instead on historical trends based on Ahrefs' comprehensive database of search information.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `output` | string ("json" | "csv" | "xml" | "php") | No | The output format. |
| `country` | string ("ad" | "ae" | "af" | "ag" | "ai" | "al" | "am" | "ao" | "ar" | "as" | "at" | "au" | "aw" | "az" | "ba" | "bb" | "bd" | "be" | "bf" | "bg" | "bh" | "bi" | "bj" | "bn" | "bo" | "br" | "bs" | "bt" | "bw" | "by" | "bz" | "ca" | "cd" | "cf" | "cg" | "ch" | "ci" | "ck" | "cl" | "cm" | "cn" | "co" | "cr" | "cu" | "cv" | "cy" | "cz" | "de" | "dj" | "dk" | "dm" | "do" | "dz" | "ec" | "ee" | "eg" | "es" | "et" | "fi" | "fj" | "fm" | "fo" | "fr" | "ga" | "gb" | "gd" | "ge" | "gf" | "gg" | "gh" | "gi" | "gl" | "gm" | "gn" | "gp" | "gq" | "gr" | "gt" | "gu" | "gy" | "hk" | "hn" | "hr" | "ht" | "hu" | "id" | "ie" | "il" | "im" | "in" | "iq" | "is" | "it" | "je" | "jm" | "jo" | "jp" | "ke" | "kg" | "kh" | "ki" | "kn" | "kr" | "kw" | "ky" | "kz" | "la" | "lb" | "lc" | "li" | "lk" | "ls" | "lt" | "lu" | "lv" | "ly" | "ma" | "mc" | "md" | "me" | "mg" | "mk" | "ml" | "mm" | "mn" | "mq" | "mr" | "ms" | "mt" | "mu" | "mv" | "mw" | "mx" | "my" | "mz" | "na" | "nc" | "ne" | "ng" | "ni" | "nl" | "no" | "np" | "nr" | "nu" | "nz" | "om" | "pa" | "pe" | "pf" | "pg" | "ph" | "pk" | "pl" | "pn" | "pr" | "ps" | "pt" | "py" | "qa" | "re" | "ro" | "rs" | "ru" | "rw" | "sa" | "sb" | "sc" | "se" | "sg" | "sh" | "si" | "sk" | "sl" | "sm" | "sn" | "so" | "sr" | "st" | "sv" | "td" | "tg" | "th" | "tj" | "tk" | "tl" | "tm" | "tn" | "to" | "tr" | "tt" | "tw" | "tz" | "ua" | "ug" | "us" | "uy" | "uz" | "vc" | "ve" | "vg" | "vi" | "vn" | "vu" | "ws" | "ye" | "yt" | "za" | "zm" | "zw") | Yes | A two-letter country code (ISO 3166-1 alpha-2). |
| `keyword` | string | Yes | The keyword to show metrics for. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Search suggestions explorer

**Slug:** `AHREFS_SEARCH_SUGGESTIONS_EXPLORER`

Retrieves search suggestions for a given keyword or phrase using Ahrefs' Keywords Explorer tool. This endpoint provides autocomplete-style suggestions that can help uncover related keywords, long-tail variations, and potential content ideas based on real search data. It's particularly useful for expanding keyword lists, finding low-competition keywords, and understanding user search intent. The suggestions returned may include both informational and transactional keywords, offering insights into various stages of the user journey. This tool should be used when conducting keyword research, planning content strategies, or optimizing for search engine visibility. It does not provide detailed metrics like search volume or keyword difficulty; for such data, additional API calls may be necessary.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `limit` | integer | No | The number of results to return. |
| `where` | string | No | The filter expression. The following column identifiers are recognized (this differs from the identifiers recognized by the `select` parameter). **cpc**: Cost Per Click shows the average price that advertisers pay for each ad click in paid search results for a keyword, in USD cents.   type: integer nullable **cps**: Clicks Per Search (or CPS) is the ratio of Clicks to Keyword Search volume. It shows how many different search results get clicked, on average, when people search for the target keyword in a given country.   type: float nullable **difficulty** (10 units): An estimation of how hard it is to rank in the top 10 organic search results for a keyword on a 100-point scale.   type: integer nullable **first_seen**: The date when we first checked search engine results for a keyword.   type: datetime nullable **global_volume** (10 units): How many times per month, on average, people search for the target keyword across all countries in our database.   type: integer nullable **intents** (10 units): Indicates the purpose behind the user"s search query. Object fields: `informational`, `navigational`, `commercial`, `transactional`, `branded` or `local`. All the fields are of type `bool`, with posible values `true` or `false`.   type: object nullable **keyword**:    type: string **parent_topic**: Parent Topic determines if you can rank for your target keyword while targeting a more general topic on your page instead. To identify the Parent Topic, we take the #1 ranking page for your keyword and find the keyword responsible for sending the most traffic to that page.   type: string nullable **serp_domain_rating_top10_min**: The keyword must have at least one ranking position in the top 10 results with a DR of up to this value.   type: float nullable **serp_domain_rating_top5_min**: The keyword must have at least one ranking position in the top 5 results with a DR of up to this value.   type: float nullable **serp_features**: The enriched results on a search engine results page (SERP) that are not traditional organic results.   type: array(string)   enum: `"ai_overview_sitelink"` `"snippet"` `"ai_overview"` `"local_pack"` `"sitelink"` `"news"` `"image"` `"video"` `"discussion"` `"tweet"` `"paid_top"` `"paid_bottom"` `"paid_sitelink"` `"shopping"` `"knowledge_card"` `"knowledge_panel"` `"question"` `"image_th"` `"video_th"` `"organic_shopping"` **serp_last_update**: The date when we last checked search engine results for a keyword.   type: datetime nullable **traffic_potential** (10 units): The sum of organic traffic that the #1 ranking page for your target keyword receives from all the keywords that it ranks for.   type: integer nullable **volume** (10 units): An estimation of the average monthly number of searches for a keyword over the latest known 12 months of data.   type: integer nullable **volume_desktop_pct**: The percentage of searches for a keyword performed on desktop devices.   type: float nullable **volume_mobile_pct**: The percentage of searches for a keyword performed on mobile devices.   type: float nullable **word_count**:    type: integer  |
| `offset` | integer | No | [Deprecated on 31 May 2024]. |
| `output` | string ("json" | "csv" | "xml" | "php") | No | The output format. |
| `select` | string | Yes | A comma-separated list of columns to return. See response schema for valid column identifiers.  |
| `country` | string ("ad" | "ae" | "af" | "ag" | "ai" | "al" | "am" | "ao" | "ar" | "as" | "at" | "au" | "aw" | "az" | "ba" | "bb" | "bd" | "be" | "bf" | "bg" | "bh" | "bi" | "bj" | "bn" | "bo" | "br" | "bs" | "bt" | "bw" | "by" | "bz" | "ca" | "cd" | "cf" | "cg" | "ch" | "ci" | "ck" | "cl" | "cm" | "cn" | "co" | "cr" | "cu" | "cv" | "cy" | "cz" | "de" | "dj" | "dk" | "dm" | "do" | "dz" | "ec" | "ee" | "eg" | "es" | "et" | "fi" | "fj" | "fm" | "fo" | "fr" | "ga" | "gb" | "gd" | "ge" | "gf" | "gg" | "gh" | "gi" | "gl" | "gm" | "gn" | "gp" | "gq" | "gr" | "gt" | "gu" | "gy" | "hk" | "hn" | "hr" | "ht" | "hu" | "id" | "ie" | "il" | "im" | "in" | "iq" | "is" | "it" | "je" | "jm" | "jo" | "jp" | "ke" | "kg" | "kh" | "ki" | "kn" | "kr" | "kw" | "ky" | "kz" | "la" | "lb" | "lc" | "li" | "lk" | "ls" | "lt" | "lu" | "lv" | "ly" | "ma" | "mc" | "md" | "me" | "mg" | "mk" | "ml" | "mm" | "mn" | "mq" | "mr" | "ms" | "mt" | "mu" | "mv" | "mw" | "mx" | "my" | "mz" | "na" | "nc" | "ne" | "ng" | "ni" | "nl" | "no" | "np" | "nr" | "nu" | "nz" | "om" | "pa" | "pe" | "pf" | "pg" | "ph" | "pk" | "pl" | "pn" | "pr" | "ps" | "pt" | "py" | "qa" | "re" | "ro" | "rs" | "ru" | "rw" | "sa" | "sb" | "sc" | "se" | "sg" | "sh" | "si" | "sk" | "sl" | "sm" | "sn" | "so" | "sr" | "st" | "sv" | "td" | "tg" | "th" | "tj" | "tk" | "tl" | "tm" | "tn" | "to" | "tr" | "tt" | "tw" | "tz" | "ua" | "ug" | "us" | "uy" | "uz" | "vc" | "ve" | "vg" | "vi" | "vn" | "vu" | "ws" | "ye" | "yt" | "za" | "zm" | "zw") | Yes | A two-letter country code (ISO 3166-1 alpha-2). |
| `timeout` | integer | No | A manual timeout duration in seconds. |
| `keywords` | string | No | A comma-separated list of keywords to show metrics for. |
| `order_by` | string | No | A column to order results by. See response schema for valid column identifiers.  |
| `search_engine` | string ("google") | No | [Deprecated on 5 Aug 2024]. |
| `keyword_list_id` | integer | No | The id of an existing keyword list to show metrics for. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |
