Ahrefs

App · 25 actions

Research backlinks, organic keywords, competitors, top pages and search results, and check Ahrefs projects and API usage.

Actions

ActionWhat it does
Get backlink statisticsBacklinks stats.
Get domain ratingDomain rating.
Get domain rating historyDomain Rating history.
Get keyword overviewOverview.
Get keyword volume historyVolume history.
Get keywords historyKeywords history.
Get limits and usageLimits and usage.
Get metricsMetrics.
Get metrics by countryMetrics by country.
Get metrics historyMetrics history.
Get outlink statisticsOutlinks stats.
Get referring domains historyRefdomains history.
Get serp overviewSERP Overview.
List anchorsAnchors.
List backlinksBacklinks.
List broken backlinksBroken Backlinks.
List linked domainsLinked Domains.
List matching termsMatching terms.
List organic competitorsOrganic competitors.
List organic keywordsOrganic keywords.
List pages by backlinksBest pages by backlinks.
List paid pagesPaid pages.
List projectsProjects.
List referring domainsRefdomains.
List top pagesTop pages.

Backlinks stats.

Inputs

DatedatedateRequired
A date to report metrics on in YYYY-MM-DD format.
Modemodetext
The scope of the search based on the target you entered.One of: exact, prefix, domain, subdomains. Default: subdomains.
TargettargettextRequired
The target of the search: a domain or a URL.
Portfolio IDportfolio_idnumber
The unique identifier of the portfolio. When provided, it takes precedence over `target`.
Protocolprotocoltext
The protocol of your target.One of: both, http, https. Default: both.

Outputs

dataobject
The result returned by Ahrefs.
Example output
{
  "data": {
    "metrics": {
      "all_time": 1,
      "all_time_refdomains": 1,
      "live": 1,
      "live_refdomains": 1
    }
  }
}

Get domain rating

Domain rating.

Inputs

DatedatedateRequired
A date to report metrics on in YYYY-MM-DD format.
TargettargettextRequired
The target of the search: a domain or a URL.

Outputs

dataobject
The result returned by Ahrefs.
Example output
{
  "data": {
    "domain_rating": {
      "ahrefs_rank": 1,
      "domain_rating": 1.0
    }
  }
}

Get domain rating history

Domain Rating history.

Inputs

TargettargettextRequired
The target of the search: a domain or a URL.
Date fromdate_fromdateRequired
The start date of the historical period in YYYY-MM-DD format.
Date todate_todate
The end date of the historical period in YYYY-MM-DD format.
History groupinghistory_groupingtext
The time interval used to group historical data.One of: daily, weekly, monthly. Default: monthly.

Outputs

dataobject
The result returned by Ahrefs.
Example output
{
  "data": {
    "domain_ratings": []
  }
}

Get keyword overview

Overview.

Inputs

SelectselectlistRequired
Columns to include. Each selected column can affect API unit usage.One or more of: clicks, cpc, cps, difficulty, first_seen (First seen), global_volume (Global volume), intents, keyword, parent_topic (Parent topic), parent_volume (Parent volume), and 11 more.
Wherewheretext
Filter expression from the Ahrefs filter syntax documentation.
Order byorder_bytext
A column to order results by. See the response schema for valid column identifiers, except for `volume_monthly`, which is not supported in `order_by` for this endpoint.
Limitlimitnumber
The number of results to return.At least 1. Default: 25.
Timeouttimeoutnumber
A manual timeout duration in seconds.
Keyword list IDkeyword_list_idnumber
The id of an existing keyword list to show metrics for.
Keywordskeywordstext
A comma-separated list of keywords to show metrics for.
CountrycountrytextRequired
A two-letter country code (ISO 3166-1 alpha-2).One of: ad (Andorra), ae (United Arab Emirates), af (Afghanistan), ag (Antigua & Barbuda), ai (Anguilla), al (Albania), am (Armenia), ao (Angola), ar (Argentina), as (American Samoa), and 200 more.
Target positiontarget_positiontext
Filters keywords based on the ranking position of the specified `target`.One of: in_top10 (In top10), in_top100 (In top100).
Targettargettext
The target of the search: a domain or a URL.
Modemodetext
The scope of the target.One of: exact, prefix, domain, subdomains.
Volume monthly date fromvolume_monthly_date_fromdate
The start date in YYYY-MM-DD format for retrieving historical monthly search volumes in the `volume_monthly_history` field. Required only if `volume_monthly_history` is requested.
Volume monthly date tovolume_monthly_date_todate
The end date in YYYY-MM-DD format for retrieving historical monthly search volumes in the `volume_monthly_history` field. Required only if `volume_monthly_history` is requested.

Outputs

dataobject
The result returned by Ahrefs.
Example output
{
  "data": {
    "keywords": []
  }
}

Get keyword volume history

Volume history.

Inputs

KeywordkeywordtextRequired
The keyword to show metrics for.
CountrycountrytextRequired
A two-letter country code (ISO 3166-1 alpha-2).One of: ad (Andorra), ae (United Arab Emirates), af (Afghanistan), ag (Antigua & Barbuda), ai (Anguilla), al (Albania), am (Armenia), ao (Angola), ar (Argentina), as (American Samoa), and 200 more.
Date fromdate_fromdate
The start date of the historical period in YYYY-MM-DD format.
Date todate_todate
The end date of the historical period in YYYY-MM-DD format.

Outputs

dataobject
The result returned by Ahrefs.
Example output
{
  "data": {
    "metrics": []
  }
}

Get keywords history

Keywords history.

Inputs

Selectselectlist
Columns to include. Each selected column can affect API unit usage.One or more of: date, top3, top4_10 (Top4 10), top11_20 (Top11 20), top11_plus (Top11 plus), top21_50 (Top21 50), top51_plus (Top51 plus).
Modemodetext
The scope of the target.One of: exact, prefix, domain, subdomains. Default: subdomains.
TargettargettextRequired
The target of the search: a domain or a URL.
Portfolio IDportfolio_idnumber
The unique identifier of the portfolio. When provided, it takes precedence over `target`.
Protocolprotocoltext
The protocol of your target.One of: both, http, https. Default: both.
Countrycountrytext
A two-letter country code (ISO 3166-1 alpha-2).One of: ad (Andorra), ae (United Arab Emirates), af (Afghanistan), ag (Antigua & Barbuda), ai (Anguilla), al (Albania), am (Armenia), ao (Angola), ar (Argentina), as (American Samoa), and 200 more.
Date fromdate_fromdateRequired
The start date of the historical period in YYYY-MM-DD format.
Date todate_todate
The end date of the historical period in YYYY-MM-DD format.
History groupinghistory_groupingtext
The time interval used to group historical data.One of: daily, weekly, monthly. Default: monthly.

Outputs

dataobject
The result returned by Ahrefs.
Example output
{
  "data": {
    "keywords": []
  }
}

Get limits and usage

Limits and usage.

Inputs

None.

Outputs

dataobject
The result returned by Ahrefs.
Example output
{
  "data": {
    "limits_and_usage": {
      "api_key_expiration_date": "example",
      "subscription": "example",
      "units_limit_api_key": 1,
      "units_limit_workspace": 1,
      "units_usage_api_key": 1,
      "units_usage_workspace": 1,
      "usage_reset_date": "example"
    }
  }
}

Get metrics

Metrics.

Inputs

DatedatedateRequired
A date to report metrics on in YYYY-MM-DD format.
Modemodetext
The scope of the target.One of: exact, prefix, domain, subdomains. Default: subdomains.
TargettargettextRequired
The target of the search: a domain or a URL.
Portfolio IDportfolio_idnumber
The unique identifier of the portfolio. When provided, it takes precedence over `target`.
Protocolprotocoltext
The protocol of your target.One of: both, http, https. Default: both.
Countrycountrytext
A two-letter country code (ISO 3166-1 alpha-2).One of: ad (Andorra), ae (United Arab Emirates), af (Afghanistan), ag (Antigua & Barbuda), ai (Anguilla), al (Albania), am (Armenia), ao (Angola), ar (Argentina), as (American Samoa), and 200 more.
Volume modevolume_modetext
The search volume calculation mode: monthly or average. It affects volume, traffic, and traffic value.One of: monthly, average. Default: monthly.
Traffic modetraffic_modetext
The organic traffic calculation mode: static or adaptive. It affects organic traffic and traffic value.One of: static, adaptive. Default: adaptive.

Outputs

dataobject
The result returned by Ahrefs.
Example output
{
  "data": {
    "metrics": {
      "org_cost": 1,
      "org_keywords": 1,
      "org_keywords_1_3": 1,
      "org_traffic": 1,
      "paid_cost": 1,
      "paid_keywords": 1,
      "paid_pages": 1,
      "paid_traffic": 1
    }
  }
}

Get metrics by country

Metrics by country.

Inputs

Selectselectlist
Columns to include. Each selected column can affect API unit usage.One or more of: country, org_cost (Org cost), org_keywords (Org keywords), org_keywords_1_3 (Org keywords 1 3), org_traffic (Org traffic), paid_cost (Paid cost), paid_keywords (Paid keywords), paid_pages (Paid pages), paid_traffic (Paid traffic).
Limitlimitnumber
The number of results to return.At least 1. Default: 25.
DatedatedateRequired
A date to report metrics on in YYYY-MM-DD format.
Modemodetext
The scope of the target.One of: exact, prefix, domain, subdomains. Default: subdomains.
TargettargettextRequired
The target of the search: a domain or a URL.
Portfolio IDportfolio_idnumber
The unique identifier of the portfolio. When provided, it takes precedence over `target`.
Protocolprotocoltext
The protocol of your target.One of: both, http, https. Default: both.
Volume modevolume_modetext
The search volume calculation mode: monthly or average. It affects volume, traffic, and traffic value.One of: monthly, average. Default: monthly.
Traffic modetraffic_modetext
The organic traffic calculation mode: static or adaptive. It affects organic traffic and traffic value.One of: static, adaptive. Default: adaptive.

Outputs

dataobject
The result returned by Ahrefs.
Example output
{
  "data": {
    "metrics": []
  }
}

Get metrics history

Metrics history.

Inputs

Selectselectlist
Columns to include. Each selected column can affect API unit usage.One or more of: date, org_cost (Org cost), org_traffic (Org traffic), paid_cost (Paid cost), paid_traffic (Paid traffic).
Modemodetext
The scope of the target.One of: exact, prefix, domain, subdomains. Default: subdomains.
TargettargettextRequired
The target of the search: a domain or a URL.
Portfolio IDportfolio_idnumber
The unique identifier of the portfolio. When provided, it takes precedence over `target`.
Protocolprotocoltext
The protocol of your target.One of: both, http, https. Default: both.
Countrycountrytext
A two-letter country code (ISO 3166-1 alpha-2).One of: ad (Andorra), ae (United Arab Emirates), af (Afghanistan), ag (Antigua & Barbuda), ai (Anguilla), al (Albania), am (Armenia), ao (Angola), ar (Argentina), as (American Samoa), and 200 more.
Date fromdate_fromdateRequired
The start date of the historical period in YYYY-MM-DD format.
Date todate_todate
The end date of the historical period in YYYY-MM-DD format.
History groupinghistory_groupingtext
The time interval used to group historical data.One of: daily, weekly, monthly. Default: monthly.
Volume modevolume_modetext
The search volume calculation mode: monthly or average. It affects volume, traffic, and traffic value.One of: monthly, average. Default: monthly.
Traffic modetraffic_modetext
The organic traffic calculation mode: static or adaptive. It affects organic traffic and traffic value.One of: static, adaptive. Default: adaptive.

Outputs

dataobject
The result returned by Ahrefs.
Example output
{
  "data": {
    "metrics": []
  }
}

Outlinks stats.

Inputs

TargettargettextRequired
The target of the search: a domain or a URL.
Modemodetext
The scope of the target.One of: exact, prefix, domain, subdomains. Default: subdomains.
Protocolprotocoltext
The protocol of your target.One of: both, http, https. Default: both.

Outputs

dataobject
The result returned by Ahrefs.
Example output
{
  "data": {
    "metrics": {
      "linked_domains": 1,
      "linked_domains_dofollow": 1,
      "outgoing_links": 1,
      "outgoing_links_dofollow": 1
    }
  }
}

Get referring domains history

Refdomains history.

Inputs

Modemodetext
The scope of the target.One of: exact, prefix, domain, subdomains. Default: subdomains.
TargettargettextRequired
The target of the search: a domain or a URL.
Portfolio IDportfolio_idnumber
The unique identifier of the portfolio. When provided, it takes precedence over `target`.
Protocolprotocoltext
The protocol of your target.One of: both, http, https. Default: both.
Date fromdate_fromdateRequired
The start date of the historical period in YYYY-MM-DD format.
Date todate_todate
The end date of the historical period in YYYY-MM-DD format.
History groupinghistory_groupingtext
The time interval used to group historical data.One of: daily, weekly, monthly. Default: monthly.

Outputs

dataobject
The result returned by Ahrefs.
Example output
{
  "data": {
    "refdomains": []
  }
}

Get serp overview

SERP Overview.

Inputs

SelectselectlistRequired
Columns to include. Each selected column can affect API unit usage.One or more of: ahrefs_rank (Ahrefs rank), backlinks, domain_rating (Domain rating), keywords, page_type (Page type), position, refdomains, title, top_keyword (Top keyword), top_keyword_volume (Top keyword volume), and 6 more.
KeywordkeywordtextRequired
The keyword to return SERP Overview for.
CountrycountrytextRequired
A two-letter country code (ISO 3166-1 alpha-2).One of: ad (Andorra), ae (United Arab Emirates), af (Afghanistan), ag (Antigua & Barbuda), ai (Anguilla), al (Albania), am (Armenia), ao (Angola), ar (Argentina), as (American Samoa), and 200 more.
Datedatedate and time
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.
Top positionstop_positionsnumber
The number of top organic SERP positions to return. If not specified, all available positions will be returned.
Typetypetext
A comma-separated list of SERP feature types to filter by. Only positions whose `type` includes at least one of the given values are returned. If not specified, positions of all types are returned.One of: paid_top (Paid top), paid_bottom (Paid bottom), paid_right (Paid right), paid_sitelink (Paid sitelink), organic, sitelink, snippet, image, article, knowledge_card (Knowledge card), and 17 more.

Outputs

dataobject
The result returned by Ahrefs.
Example output
{
  "data": {
    "positions": []
  }
}

List anchors

Anchors.

Inputs

SelectselectlistRequired
Columns to include. Each selected column can affect API unit usage.One or more of: anchor, dofollow_links (Dofollow links), first_seen (First seen), is_spam (Is spam), last_seen (Last seen), links_to_target (Links to target), lost_links (Lost links), new_links (New links), refdomains, refpages, top_domain_rating (Top domain rating).
Wherewheretext
Filter expression from the Ahrefs filter syntax documentation.
Order byorder_bytext
A comma-separated list of columns to order results by, with optional direction. See response schema for valid column identifiers.
Limitlimitnumber
The number of results to return.At least 1. Default: 25.
Timeouttimeoutnumber
A manual timeout duration in seconds.
Historyhistorytext
A time frame to add lost backlinks to the report. Choose between `live` (no history), `since:` (history since a specified date), and `all_time` (full history). The date should be in YYYY-MM-DD format.Default: all_time.
Modemodetext
The scope of the search based on the target you entered.One of: exact, prefix, domain, subdomains. Default: subdomains.
TargettargettextRequired
The target of the search: a domain or a URL.
Portfolio IDportfolio_idnumber
The unique identifier of the portfolio. When provided, it takes precedence over `target`.
Protocolprotocoltext
The protocol of your target.One of: both, http, https. Default: both.

Outputs

dataobject
The result returned by Ahrefs.
Example output
{
  "data": {
    "anchors": []
  }
}

Backlinks.

Inputs

SelectselectlistRequired
Columns to include. Each selected column can affect API unit usage.One or more of: ahrefs_rank_source (Ahrefs rank source), ahrefs_rank_target (Ahrefs rank target), alt, anchor, broken_redirect_new_target (Broken redirect new target), broken_redirect_reason (Broken redirect reason), broken_redirect_source (Broken redirect source), class_c (Class c), discovered_status (Discovered status), domain_rating_source (Domain rating source), and 72 more.
Wherewheretext
Filter expression from the Ahrefs filter syntax documentation.
Order byorder_bytext
A column to order results by. See the response schema for valid column identifiers, except for `link_group_count`, which is not supported in `order_by` for this endpoint.
Limitlimitnumber
The number of results to return.At least 1. Default: 25.
Timeouttimeoutnumber
A manual timeout duration in seconds.
Aggregationaggregationtext
The backlinks grouping mode.One of: similar_links (Similar links), 1_per_domain (1 per domain), all. Default: similar_links.
Historyhistorytext
A time frame to add lost backlinks to the report. Choose between `live` (no history), `since:` (history since a specified date), and `all_time` (full history). The date should be in YYYY-MM-DD format.Default: all_time.
Modemodetext
The scope of the search based on the target you entered.One of: exact, prefix, domain, subdomains. Default: subdomains.
TargettargettextRequired
The target of the search: a domain or a URL.
Portfolio IDportfolio_idnumber
The unique identifier of the portfolio. When provided, it takes precedence over `target`.
Protocolprotocoltext
The protocol of your target.One of: both, http, https. Default: both.

Outputs

dataobject
The result returned by Ahrefs.
Example output
{
  "data": {
    "backlinks": []
  }
}

Broken Backlinks.

Inputs

SelectselectlistRequired
Columns to include. Each selected column can affect API unit usage.One or more of: ahrefs_rank_source (Ahrefs rank source), ahrefs_rank_target (Ahrefs rank target), alt, anchor, class_c (Class c), domain_rating_source (Domain rating source), domain_rating_target (Domain rating target), encoding, first_seen (First seen), first_seen_link (First seen link), and 63 more.
Wherewheretext
Filter expression from the Ahrefs filter syntax documentation.
Order byorder_bytext
A column to order results by. See the response schema for valid column identifiers, except for `http_code_target`, `last_visited_target`, `link_group_count`, which are not supported in `order_by` for this endpoint.
Limitlimitnumber
The number of results to return.At least 1. Default: 25.
Timeouttimeoutnumber
A manual timeout duration in seconds.
Aggregationaggregationtext
The backlinks grouping mode.One of: similar_links (Similar links), 1_per_domain (1 per domain), all. Default: similar_links.
Modemodetext
The scope of the search based on the target you entered.One of: exact, prefix, domain, subdomains. Default: subdomains.
TargettargettextRequired
The target of the search: a domain or a URL.
Portfolio IDportfolio_idnumber
The unique identifier of the portfolio. When provided, it takes precedence over `target`.
Protocolprotocoltext
The protocol of your target.One of: both, http, https. Default: both.

Outputs

dataobject
The result returned by Ahrefs.
Example output
{
  "data": {
    "backlinks": []
  }
}

List linked domains

Linked Domains.

Inputs

SelectselectlistRequired
Columns to include. Each selected column can affect API unit usage.One or more of: dofollow_linked_domains (Dofollow linked domains), dofollow_links (Dofollow links), dofollow_refdomains (Dofollow refdomains), domain, domain_rating (Domain rating), first_seen (First seen), is_root_domain (Is root domain), linked_domain_traffic (Linked domain traffic), linked_pages (Linked pages), links_from_target (Links from target).
Wherewheretext
Filter expression from the Ahrefs filter syntax documentation.
Order byorder_bytext
A comma-separated list of columns to order results by, with optional direction. See response schema for valid column identifiers.
Limitlimitnumber
The number of results to return.At least 1. Default: 25.
Timeouttimeoutnumber
A manual timeout duration in seconds.
Modemodetext
The scope of the search based on the target you entered.One of: exact, prefix, domain, subdomains. Default: subdomains.
TargettargettextRequired
The target of the search: a domain or a URL.
Portfolio IDportfolio_idnumber
The unique identifier of the portfolio. When provided, it takes precedence over `target`.
Protocolprotocoltext
The protocol of your target.One of: both, http, https. Default: both.

Outputs

dataobject
The result returned by Ahrefs.
Example output
{
  "data": {
    "linkeddomains": []
  }
}

List matching terms

Matching terms.

Inputs

SelectselectlistRequired
Columns to include. Each selected column can affect API unit usage.One or more of: cpc, cps, difficulty, first_seen (First seen), global_volume (Global volume), intents, keyword, parent_topic (Parent topic), serp_features (Serp features), serp_last_update (Serp last update), and 5 more.
Wherewheretext
Filter expression from the Ahrefs filter syntax documentation.
Order byorder_bytext
A column to order results by. See the response schema for valid column identifiers, except for `volume_monthly`, which is not supported in `order_by` for this endpoint.
Limitlimitnumber
The number of results to return. Max: `150000`.At least 1. Default: 25.
Timeouttimeoutnumber
A manual timeout duration in seconds.
Keyword list IDkeyword_list_idnumber
The id of an existing keyword list.
Keywordskeywordstext
A comma-separated list of keywords to show metrics for.
CountrycountrytextRequired
A two-letter country code (ISO 3166-1 alpha-2).One of: ad (Andorra), ae (United Arab Emirates), af (Afghanistan), ag (Antigua & Barbuda), ai (Anguilla), al (Albania), am (Armenia), ao (Angola), ar (Argentina), as (American Samoa), and 200 more.
Termstermstext
All keywords ideas or keywords ideas phrased as questions.One of: all, questions. Default: all.
Match modematch_modetext
Keyword ideas contain the words from your query in any order (terms mode) or in the exact order they are written (phrase mode).One of: terms, phrase. Default: terms.

Outputs

dataobject
The result returned by Ahrefs.
Example output
{
  "data": {
    "keywords": []
  }
}

List organic competitors

Organic competitors.

Inputs

SelectselectlistRequired
Columns to include. Each selected column can affect API unit usage.One or more of: competitor_domain (Competitor domain), competitor_url (Competitor url), domain_rating (Domain rating), group_mode (Group mode), keywords_common (Keywords common), keywords_competitor (Keywords competitor), keywords_target (Keywords target), pages, pages_diff (Pages diff), pages_merged (Pages merged), and 10 more.
Wherewheretext
Filter expression from the Ahrefs filter syntax documentation.
Order byorder_bytext
A comma-separated list of columns to order results by, with optional direction. See response schema for valid column identifiers.
Limitlimitnumber
The number of results to return.At least 1. Default: 25.
Timeouttimeoutnumber
A manual timeout duration in seconds.
Volume modevolume_modetext
The search volume calculation mode: monthly or average. It affects volume, traffic, and traffic value.One of: monthly, average. Default: monthly.
Traffic modetraffic_modetext
The organic traffic calculation mode: static or adaptive. It affects organic traffic and traffic value.One of: static, adaptive. Default: adaptive.
DatedatedateRequired
A date to report metrics on in YYYY-MM-DD format.
Date compareddate_compareddate
A date to compare metrics with in YYYY-MM-DD format.
CountrycountrytextRequired
A two-letter country code (ISO 3166-1 alpha-2).One of: ad (Andorra), ae (United Arab Emirates), af (Afghanistan), ag (Antigua & Barbuda), ai (Anguilla), al (Albania), am (Armenia), ao (Angola), ar (Argentina), as (American Samoa), and 200 more.
Modemodetext
The scope of the search based on the target you entered.One of: exact, prefix, domain, subdomains. Default: subdomains.
TargettargettextRequired
The target of the search: a domain or a URL.
Portfolio IDportfolio_idnumber
The unique identifier of the portfolio. When provided, it takes precedence over `target`.
Protocolprotocoltext
The protocol of your target.One of: both, http, https. Default: both.

Outputs

dataobject
The result returned by Ahrefs.
Example output
{
  "data": {
    "competitors": []
  }
}

List organic keywords

Organic keywords.

Inputs

SelectselectlistRequired
Columns to include. Each selected column can affect API unit usage.One or more of: all_positions (All positions), all_positions_prev (All positions prev), best_position (Best position), best_position_diff (Best position diff), best_position_has_thumbnail (Best position has thumbnail), best_position_has_thumbnail_prev (Best position has thumbnail prev), best_position_has_video (Best position has video), best_position_has_video_prev (Best position has video prev), best_position_kind (Best position kind), best_position_kind_merged (Best position kind merged), and 58 more.
Wherewheretext
Filter expression from the Ahrefs filter syntax documentation.
Order byorder_bytext
A comma-separated list of columns to order results by, with optional direction. See response schema for valid column identifiers.
Limitlimitnumber
The number of results to return.At least 1. Default: 25.
Timeouttimeoutnumber
A manual timeout duration in seconds.
Volume modevolume_modetext
The search volume calculation mode: monthly or average. It affects volume, traffic, and traffic value.One of: monthly, average. Default: monthly.
Traffic modetraffic_modetext
The organic traffic calculation mode: static or adaptive. It affects organic traffic and traffic value.One of: static, adaptive. Default: adaptive.
DatedatedateRequired
A date to report metrics on in YYYY-MM-DD format.
Date compareddate_compareddate
A date to compare metrics with in YYYY-MM-DD format.
Countrycountrytext
A two-letter country code (ISO 3166-1 alpha-2).One of: ad (Andorra), ae (United Arab Emirates), af (Afghanistan), ag (Antigua & Barbuda), ai (Anguilla), al (Albania), am (Armenia), ao (Angola), ar (Argentina), as (American Samoa), and 200 more.
Modemodetext
The scope of the search based on the target you entered.One of: exact, prefix, domain, subdomains. Default: subdomains.
TargettargettextRequired
The target of the search: a domain or a URL.
Portfolio IDportfolio_idnumber
The unique identifier of the portfolio. When provided, it takes precedence over `target`.
Protocolprotocoltext
The protocol of your target.One of: both, http, https. Default: both.

Outputs

dataobject
The result returned by Ahrefs.
Example output
{
  "data": {
    "keywords": []
  }
}

Best pages by backlinks.

Inputs

SelectselectlistRequired
Columns to include. Each selected column can affect API unit usage.One or more of: dofollow_to_target (Dofollow to target), first_seen_link (First seen link), http_code_target (Http code target), is_spam (Is spam), languages_target (Languages target), last_seen (Last seen), last_visited_source (Last visited source), last_visited_target (Last visited target), links_to_target (Links to target), lost_links_to_target (Lost links to target), and 11 more.
Wherewheretext
Filter expression from the Ahrefs filter syntax documentation.
Order byorder_bytext
A column to order results by. See the response schema for valid column identifiers, except for `http_code_target`, `languages_target`, `last_visited_target`, `powered_by_target`, `target_redirect`, `title_target`, `url_rating_target`, which are not supported in `order_by` for this endpoint.
Limitlimitnumber
The number of results to return.At least 1. Default: 25.
Timeouttimeoutnumber
A manual timeout duration in seconds.
Historyhistorytext
A time frame to add lost backlinks to the report. Choose between `live` (no history), `since:` (history since a specified date), and `all_time` (full history). The date should be in YYYY-MM-DD format.Default: all_time.
Modemodetext
The scope of the search based on the target you entered.One of: exact, prefix, domain, subdomains. Default: subdomains.
TargettargettextRequired
The target of the search: a domain or a URL.
Portfolio IDportfolio_idnumber
The unique identifier of the portfolio. When provided, it takes precedence over `target`.
Protocolprotocoltext
The protocol of your target.One of: both, http, https. Default: both.

Outputs

dataobject
The result returned by Ahrefs.
Example output
{
  "data": {
    "pages": []
  }
}

List paid pages

Paid pages.

Inputs

SelectselectlistRequired
Columns to include. Each selected column can affect API unit usage.One or more of: ads_count (Ads count), ads_count_diff (Ads count diff), ads_count_prev (Ads count prev), keywords, keywords_diff (Keywords diff), keywords_diff_percent (Keywords diff percent), keywords_merged (Keywords merged), keywords_prev (Keywords prev), raw_url (Raw url), raw_url_prev (Raw url prev), and 28 more.
Wherewheretext
Filter expression from the Ahrefs filter syntax documentation.
Order byorder_bytext
A comma-separated list of columns to order results by, with optional direction. See response schema for valid column identifiers.
Limitlimitnumber
The number of results to return.At least 1. Default: 25.
Timeouttimeoutnumber
A manual timeout duration in seconds.
Volume modevolume_modetext
The search volume calculation mode: monthly or average. It affects volume, traffic, and traffic value.One of: monthly, average. Default: monthly.
DatedatedateRequired
A date to report metrics on in YYYY-MM-DD format.
Date compareddate_compareddate
A date to compare metrics with in YYYY-MM-DD format.
Countrycountrytext
A two-letter country code (ISO 3166-1 alpha-2).One of: ad (Andorra), ae (United Arab Emirates), af (Afghanistan), ag (Antigua & Barbuda), ai (Anguilla), al (Albania), am (Armenia), ao (Angola), ar (Argentina), as (American Samoa), and 200 more.
Modemodetext
The scope of the search based on the target you entered.One of: exact, prefix, domain, subdomains. Default: subdomains.
TargettargettextRequired
The target of the search: a domain or a URL.
Portfolio IDportfolio_idnumber
The unique identifier of the portfolio. When provided, it takes precedence over `target`.
Protocolprotocoltext
The protocol of your target.One of: both, http, https. Default: both.

Outputs

dataobject
The result returned by Ahrefs.
Example output
{
  "data": {
    "pages": []
  }
}

List projects

Projects.

Inputs

Accessaccesstext
The access type of the project.One of: private, shared.
Owned byowned_bytext
The email of the project owner
Project IDproject_idnumber
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#`
Has keywordshas_keywordstrue/false
Has Rank Tracker keywords.

Outputs

dataobject
The result returned by Ahrefs.
Example output
{
  "data": {
    "projects": []
  }
}

List referring domains

Refdomains.

Inputs

SelectselectlistRequired
Columns to include. Each selected column can affect API unit usage.One or more of: dofollow_linked_domains (Dofollow linked domains), dofollow_links (Dofollow links), dofollow_refdomains (Dofollow refdomains), domain, domain_rating (Domain rating), first_seen (First seen), ip_source (Ip source), is_root_domain (Is root domain), is_spam (Is spam), last_seen (Last seen), and 5 more.
Wherewheretext
Filter expression from the Ahrefs filter syntax documentation.
Order byorder_bytext
A comma-separated list of columns to order results by, with optional direction. See response schema for valid column identifiers.
Limitlimitnumber
The number of results to return.At least 1. Default: 25.
Timeouttimeoutnumber
A manual timeout duration in seconds.
Historyhistorytext
A time frame to add lost backlinks to the report. Choose between `live` (no history), `since:` (history since a specified date), and `all_time` (full history). The date should be in YYYY-MM-DD format.Default: all_time.
Modemodetext
The scope of the search based on the target you entered.One of: exact, prefix, domain, subdomains. Default: subdomains.
TargettargettextRequired
The target of the search: a domain or a URL.
Portfolio IDportfolio_idnumber
The unique identifier of the portfolio. When provided, it takes precedence over `target`.
Protocolprotocoltext
The protocol of your target.One of: both, http, https. Default: both.

Outputs

dataobject
The result returned by Ahrefs.
Example output
{
  "data": {
    "refdomains": []
  }
}

List top pages

Top pages.

Inputs

SelectselectlistRequired
Columns to include. Each selected column can affect API unit usage.One or more of: ai_responses_chatgpt (Ai responses chatgpt), ai_responses_copilot (Ai responses copilot), ai_responses_gemini (Ai responses gemini), ai_responses_google_ai_mode (Ai responses google ai mode), ai_responses_google_ai_overviews (Ai responses google ai overviews), ai_responses_grok (Ai responses grok), ai_responses_perplexity (Ai responses perplexity), keywords, keywords_diff (Keywords diff), keywords_diff_percent (Keywords diff percent), and 33 more.
Wherewheretext
Filter expression from the Ahrefs filter syntax documentation.
Order byorder_bytext
A comma-separated list of columns to order results by, with optional direction. See response schema for valid column identifiers.
Limitlimitnumber
The number of results to return.At least 1. Default: 25.
Timeouttimeoutnumber
A manual timeout duration in seconds.
Volume modevolume_modetext
The search volume calculation mode: monthly or average. It affects volume, traffic, and traffic value.One of: monthly, average. Default: monthly.
Traffic modetraffic_modetext
The organic traffic calculation mode: static or adaptive. It affects organic traffic and traffic value.One of: static, adaptive. Default: adaptive.
DatedatedateRequired
A date to report metrics on in YYYY-MM-DD format.
Date compareddate_compareddate
A date to compare metrics with in YYYY-MM-DD format.
Countrycountrytext
A two-letter country code (ISO 3166-1 alpha-2).One of: ad (Andorra), ae (United Arab Emirates), af (Afghanistan), ag (Antigua & Barbuda), ai (Anguilla), al (Albania), am (Armenia), ao (Angola), ar (Argentina), as (American Samoa), and 200 more.
Modemodetext
The scope of the search based on the target you entered.One of: exact, prefix, domain, subdomains. Default: subdomains.
TargettargettextRequired
The target of the search: a domain or a URL.
Portfolio IDportfolio_idnumber
The unique identifier of the portfolio. When provided, it takes precedence over `target`.
Protocolprotocoltext
The protocol of your target.One of: both, http, https. Default: both.

Outputs

dataobject
The result returned by Ahrefs.
Example output
{
  "data": {
    "pages": []
  }
}

On this page