ahrefs
v1.0.3Analyze domain authority, backlinks, traffic, and keyword rankings for SEO intelligence
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
get_domain_rating Get Domain Rating
Retrieve the domain rating for a target domain or URL on a specific date. Domain rating is a metric that indicates the authority and trustworthiness of a domain.
| Parameter | Type | Description |
|---|---|---|
date * | string | The date for which to retrieve metrics, specified in YYYY-MM-DD format (e.g., 2024-01-15). |
target * | string | The domain or URL to analyze. This is the primary target for which you want to retrieve the domain rating. |
protocol | string | The protocol scheme to include in the analysis. Choose 'http' for HTTP only, 'https' for HTTPS only, or 'both' to analyze both protocols together. Defaults to 'both' if not specified. |
get_backlinks_stats Get Backlinks Stats
Retrieve backlink statistics for a target domain or URL on a specific date. Returns metrics about incoming links based on your specified scope and protocol.
| Parameter | Type | Description |
|---|---|---|
date * | string | The date for which to retrieve backlink metrics, specified in YYYY-MM-DD format. |
target * | string | The domain or URL to analyze for backlink statistics. This is the target you want to get data for. |
mode | string | The scope of the search relative to your target: exact URL match, URL prefix match, entire domain, or all subdomains. Defaults to subdomains if not specified. |
protocol | string | The protocol to include in the search results: both HTTP and HTTPS, HTTP only, or HTTPS only. Defaults to both protocols if not specified. |
list_outlinks_stats List Outlinks Stats
Retrieve outlink statistics for a target domain or URL. This beta endpoint provides insights into outbound links, though data may not perfectly match the Ahrefs UI and accuracy improvements are ongoing.
| Parameter | Type | Description |
|---|---|---|
target * | string | The domain or URL to analyze for outlink statistics. |
mode | string | The scope of the search relative to your target: exact URL match, URL prefix match, entire domain, or all subdomains. Defaults to all subdomains if not specified. |
protocol | string | The protocol to filter by: both HTTP and HTTPS, HTTP only, or HTTPS only. Defaults to both protocols if not specified. |
get_domain_metrics Get Domain Metrics
Retrieve comprehensive SEO metrics for a domain or URL, including keyword rankings, traffic estimates, and search volume data for a specified date.
| Parameter | Type | Description |
|---|---|---|
date * | string | The date for which to retrieve metrics, specified in YYYY-MM-DD format. |
target * | string | The domain or URL to analyze. Can be a full domain (example.com) or a specific URL path. |
mode | string | The scope of analysis relative to your target: 'exact' for the exact URL, 'prefix' for URL prefix matching, 'domain' for the entire domain, or 'subdomains' to include all subdomains. Defaults to 'subd… |
protocol | string | The protocol scheme to include in the analysis: 'http', 'https', or 'both' to include both protocols. Defaults to 'both'. |
volume_mode | string | Determines how search volume is calculated: use 'monthly' for monthly averages or 'average' for overall average. This affects volume, traffic, and traffic value calculations. Defaults to 'monthly'. |
get_refdomains_history Get Referring Domains History
Retrieve historical data on referring domains for a target domain or URL over a specified time period, with flexible grouping and protocol filtering options.
| Parameter | Type | Description |
|---|---|---|
date_from * | string | The start date for the historical analysis period, specified in YYYY-MM-DD format. |
target * | string | The domain or URL to analyze for referring domain history. |
date_to | string | The end date for the historical analysis period, specified in YYYY-MM-DD format. If omitted, defaults to the current date. |
history_grouping | string | The time interval for grouping historical data points. Choose from daily, weekly, or monthly aggregation; defaults to monthly. |
mode | string | The search scope relative to your target: exact domain match, prefix match, entire domain, or all subdomains; defaults to subdomains. |
protocol | string | The protocol scope to include in the analysis: both HTTP and HTTPS, HTTP only, or HTTPS only; defaults to both. |
get_domain_rating_history Get Domain Rating History
Retrieve historical Domain Rating data for a domain or URL over a specified time period, grouped by your chosen time interval.
| Parameter | Type | Description |
|---|---|---|
date_from * | string | The start date for the historical data range in YYYY-MM-DD format (e.g., 2024-01-01). |
target * | string | The domain or URL to analyze. Can be a full domain (e.g., example.com) or a specific URL path. |
date_to | string | The end date for the historical data range in YYYY-MM-DD format (e.g., 2024-12-31). If not provided, defaults to today's date. |
history_grouping | string | How to group the historical data by time interval: daily, weekly, or monthly. Defaults to monthly grouping if not specified. |
get_url_rating_history Get URL Rating History
Retrieve the historical URL Rating progression for a target domain or URL over a specified date range, with flexible time-based grouping options.
| Parameter | Type | Description |
|---|---|---|
date_from * | string | The start date for the historical data retrieval in YYYY-MM-DD format (e.g., 2024-01-01). |
target * | string | The domain or URL to analyze. Can be a full domain (e.g., example.com) or a specific URL path. |
date_to | string | The end date for the historical data retrieval in YYYY-MM-DD format (e.g., 2024-12-31). If omitted, defaults to the current date. |
history_grouping | string | The time interval for grouping historical data points. Choose from daily, weekly, or monthly granularity. Defaults to monthly if not specified. |
list_page_history List Page History
Retrieve historical ranking data for pages from a target domain or URL over a specified time period. Results can be grouped by daily, weekly, or monthly intervals and filtered by search scope and ranking position.
| Parameter | Type | Description |
|---|---|---|
date_from * | string | The start date for the historical period in YYYY-MM-DD format (e.g., 2024-01-15). This marks the beginning of the data range to retrieve. |
target * | string | The domain or URL to analyze. This is the primary search target for retrieving page history data. |
date_to | string | The end date for the historical period in YYYY-MM-DD format (e.g., 2024-12-31). If omitted, defaults to the current date. |
history_grouping | string | The time interval for grouping historical data: 'daily' for day-by-day data, 'weekly' for week-by-week aggregation, or 'monthly' for month-by-month aggregation. Defaults to 'monthly'. |
mode | string | The scope of the search relative to your target: 'exact' matches the target precisely, 'prefix' matches URLs starting with the target, 'domain' searches the entire domain, or 'subdomains' includes all… |
page_positions | string | Filter results by ranking position: 'top10' returns only pages ranking in the top 10 positions, or 'top100' returns all pages ranking in the top 100. Defaults to 'top100'. |
protocol | string | The protocol to include in results: 'http', 'https', or 'both' for both protocols. Defaults to 'both'. |
get_domain_metrics_history Get Domain Metrics History
Retrieve historical performance metrics for a domain or URL over a specified date range, with options to customize time intervals, volume calculations, and protocol scope.
| Parameter | Type | Description |
|---|---|---|
date_from * | string | The start date for the historical data range in YYYY-MM-DD format (e.g., 2024-01-01). |
target * | string | The domain or URL to analyze. Can be a full domain, subdomain, or specific URL path depending on the mode parameter. |
date_to | string | The end date for the historical data range in YYYY-MM-DD format (e.g., 2024-12-31). If omitted, defaults to the current date. |
history_grouping | string | The time interval for grouping historical data: daily, weekly, or monthly. Defaults to monthly for broader trends. |
mode | string | The scope of analysis relative to the target: exact URL match, URL prefix match, entire domain, or all subdomains. Defaults to subdomains. |
protocol | string | Filter results by protocol: both HTTP and HTTPS, HTTP only, or HTTPS only. Defaults to both. |
select | string | Comma-separated list of specific metrics to include in the response (e.g., date, org_cost, org_traffic). If not specified, returns date, org_cost, org_traffic, paid_cost, and paid_traffic by default. |
volume_mode | string | Determines how search volume is calculated: monthly totals or average values. Affects volume, traffic, and traffic value metrics. Defaults to monthly. |
list_keyword_history List Keyword History
Retrieve the historical ranking data for keywords associated with a target domain or URL across a specified date range, with options to group results by time interval and filter by protocol.
| Parameter | Type | Description |
|---|---|---|
date_from * | string | The start date for the historical period in YYYY-MM-DD format. |
target * | string | The domain or URL to analyze for keyword history. |
date_to | string | The end date for the historical period in YYYY-MM-DD format. If omitted, defaults to the current date. |
history_grouping | string | The time interval for grouping historical data: daily, weekly, or monthly. Defaults to monthly. |
mode | string | The search scope relative to your target: exact URL match, URL prefix, entire domain, or all subdomains. Defaults to subdomains. |
protocol | string | Filter results by protocol: both HTTP and HTTPS, HTTP only, or HTTPS only. Defaults to both. |
select | string | A comma-separated list of data columns to include in the response. Defaults to date, top 3 keywords, top 4-10 keywords, and top 11+ keywords. |
list_country_metrics List Country Metrics
Retrieve performance metrics broken down by country for a target domain or URL on a specific date. Useful for analyzing geographic traffic distribution and keyword performance across regions.
| Parameter | Type | Description |
|---|---|---|
date * | string | The date for which to retrieve metrics, specified in YYYY-MM-DD format. |
target * | string | The domain or URL to analyze. Can be a full domain (example.com) or a specific URL path depending on the mode parameter. |
mode | string | The scope of analysis based on your target: exact URL match, URL prefix match, entire domain, or all subdomains. Defaults to subdomains. |
protocol | string | The protocol to include in the analysis: both HTTP and HTTPS, HTTP only, or HTTPS only. Defaults to both. |
select | string | A comma-separated list of specific metrics to include in the response. If not specified, defaults to paid_cost, paid_keywords, org_cost, paid_pages, org_keywords_1_3, org_keywords, org_traffic, paid_t… |
volume_mode | string | Determines how search volume is calculated: either as a monthly total or as an average. This affects volume, traffic, and traffic value metrics. Defaults to monthly. |
list_pages_by_traffic List Pages by Traffic
Retrieve pages grouped by traffic volume ranges for a domain or URL. Useful for identifying high-traffic pages and traffic distribution patterns across your site.
| Parameter | Type | Description |
|---|---|---|
target * | string | The domain or URL to analyze for traffic data. |
mode | string | Define the search scope relative to your target: exact URL match, URL prefix match, entire domain, or all subdomains. Defaults to subdomains. |
protocol | string | Filter results by protocol type: both HTTP and HTTPS, HTTP only, or HTTPS only. Defaults to both protocols. |
volume_mode | string | Calculate search volume based on monthly totals or average values. Defaults to monthly calculation, which also affects traffic and traffic value metrics. |
get_search_volume_history Get Search Volume History
Retrieve historical search volume data for a domain or URL over a specified time period. Use this to analyze organic search trends and traffic patterns.
| Parameter | Type | Description |
|---|---|---|
date_from * | string | The start date for the historical data range in YYYY-MM-DD format. |
target * | string | The domain or URL to analyze. Can be a full domain, subdomain, or specific URL path depending on the mode selected. |
date_to | string | The end date for the historical data range in YYYY-MM-DD format. If not provided, defaults to the current date. |
history_grouping | string | The time interval for grouping historical data: daily, weekly, or monthly snapshots. Defaults to monthly grouping. |
mode | string | The scope of analysis relative to your target: exact URL match, URL prefix, entire domain, or all subdomains. Defaults to analyzing all subdomains. |
protocol | string | Whether to include both HTTP and HTTPS protocols, or filter to a specific protocol. Defaults to both. |
top_positions | string | The number of top organic search positions to include in volume calculations: top 10 or top 100 results. Defaults to top 10. |
volume_mode | string | How search volume is calculated: monthly totals or average per month. This affects reported volume, traffic, and traffic value metrics. Defaults to monthly totals. |
list_backlinks List Backlinks
Retrieve all backlinks pointing to a target domain or URL, including detailed backlink profile metrics and historical data. Results can be aggregated, filtered, and sorted to analyze link quality and sources.
| Parameter | Type | Description |
|---|---|---|
select * | string | Comma-separated list of data columns to include in the response. Refer to the response schema for valid column identifiers. |
target * | string | The domain or URL to analyze for backlinks. |
aggregation | string | How to group backlinks in results: similar links (deduplicated), one per domain, or all individual links. Defaults to similar links. |
history | string | Time frame for backlink data: live (current only), since a specific date in YYYY-MM-DD format, or all historical data. Defaults to all time. |
limit | integer | Maximum number of results to return. Defaults to 1000. |
mode | string | Search scope relative to the target: exact URL match, URL prefix, entire domain, or all subdomains. Defaults to subdomains. |
order_by | string | Column identifier to sort results by. Refer to the response schema for valid options; link_group_count is not supported for sorting. |
protocol | string | Filter results by protocol: both HTTP and HTTPS, HTTP only, or HTTPS only. Defaults to both. |
where | string | Filter expression to narrow results based on column values. Refer to the response schema for recognized column identifiers. |
list_broken_backlinks List Broken Backlinks
Retrieve broken backlinks pointing to a target domain or URL. Returns backlinks that result in HTTP errors, with options to filter, sort, and aggregate results by domain or similarity.
| Parameter | Type | Description |
|---|---|---|
select * | string | Comma-separated list of column names to include in the response. See the response schema for all available column identifiers. |
target * | string | The target of your search: either a domain name or a specific URL. |
aggregation | string | Grouping strategy for backlinks: 'similar_links' groups by similarity, '1_per_domain' returns one backlink per referring domain, or 'all' returns every backlink. Defaults to similar_links. |
limit | integer | Maximum number of results to return in the response. Defaults to 1000 results. |
mode | string | Scope of the search relative to your target. Use 'exact' for the precise URL, 'prefix' for URLs starting with the target, 'domain' for the exact domain, or 'subdomains' to include all subdomains. Defa… |
order_by | string | Column name to sort results by. Refer to the response schema for valid column identifiers; note that http_code_target, last_visited_target, and link_group_count cannot be used for sorting. |
protocol | string | Protocol to search within: both HTTP and HTTPS, HTTP only, or HTTPS only. Defaults to searching both protocols. |
where | string | Filter expression to narrow results. Use column identifiers from the response schema to construct conditions (column identifiers differ from those used in the select parameter). |
list_refdomains List Referring Domains
Retrieve referring domains data for a target domain or URL, with filtering and sorting capabilities to analyze backlink sources.
| Parameter | Type | Description |
|---|---|---|
select * | string | Comma-separated list of data columns to include in the response. Refer to the response schema for valid column identifiers. |
target * | string | The domain or URL to analyze for referring domains. |
history | string | Time frame for historical backlink data: 'live' for current data only, 'since:<date>' for data since a specific date in YYYY-MM-DD format, or 'all_time' for complete history. Defaults to all_time. |
limit | integer | Maximum number of results to return. Defaults to 1000. |
mode | string | Search scope relative to the target: exact URL match, URL prefix, entire domain, or all subdomains. Defaults to subdomains. |
order_by | string | Column identifier to sort results by. Refer to the response schema for valid column identifiers. |
protocol | string | Filter results by protocol type: both HTTP and HTTPS, HTTP only, or HTTPS only. Defaults to both. |
where | string | Filter expression to narrow results based on column values. Refer to the response schema for recognized column identifiers. |
list_anchor_text List Anchor Text
Retrieve anchor text (clickable words in hyperlinks) that point to a target domain or URL. Use this to analyze inbound link text and understand how external sites reference your target.
| Parameter | Type | Description |
|---|---|---|
select * | string | Comma-separated list of data columns to include in the response. Refer to the response schema for valid column identifiers. |
target * | string | The target domain or URL to analyze for incoming anchor text. Can be a full domain or specific URL path. |
history | string | Time frame for historical data: 'live' for current data only, 'since:YYYY-MM-DD' to include data from a specific date forward, or 'all_time' for complete historical records. Defaults to all_time. |
limit | integer | Maximum number of results to return in a single response. Defaults to 1000. |
mode | string | Search scope relative to your target: 'exact' for the precise URL, 'prefix' for URLs starting with your target, 'domain' for the entire domain, or 'subdomains' to include all subdomains. Defaults to s… |
order_by | string | Column identifier to sort results by. Refer to the response schema for valid column identifiers. |
protocol | string | Filter results by protocol type: 'http', 'https', or 'both' to include all protocols. Defaults to both. |
where | string | Filter expression to narrow results based on specific column values. Supports the column identifiers documented in the response schema. |
list_organic_keywords List Organic Keywords
Retrieve organic keywords that drive traffic to a target domain or URL, with metrics for a specified date. Results can be filtered, sorted, and customized to show specific data columns.
| Parameter | Type | Description |
|---|---|---|
date * | string | Date for which to report metrics, formatted as YYYY-MM-DD. |
select * | string | Comma-separated list of column names to include in the response; refer to the response schema for valid identifiers. |
target * | string | The domain or URL to analyze for organic keywords. |
limit | integer | Maximum number of results to return in the response; defaults to 1000 if not specified. |
mode | string | Search scope relative to the target: exact URL match, URL prefix match, entire domain, or domain with subdomains; defaults to subdomains. |
order_by | string | Column name to sort results by; refer to the response schema for valid column identifiers. |
protocol | string | Protocol scheme to target: both HTTP and HTTPS, HTTP only, or HTTPS only; defaults to both. |
volume_mode | string | Method for calculating search volume: monthly totals or average across the period; defaults to monthly. |
where | string | Filter expression to narrow results; use column identifiers recognized by the API (note: these differ from select parameter identifiers). |
list_organic_competitors List Organic Competitors
Identify organic search competitors for a target domain or URL by analyzing shared keyword rankings in a specific country and date.
| Parameter | Type | Description |
|---|---|---|
country * | string | Two-letter country code (ISO 3166-1 alpha-2 format) specifying the geographic market for competitor analysis. |
date * | string | Report date in YYYY-MM-DD format. Metrics will be calculated for this specific date. |
select * | string | Comma-separated list of data columns to include in results. Valid identifiers correspond to the response schema fields. |
target * | string | The domain or URL to analyze for competitors. Can be a full domain (example.com) or specific URL path. |
limit | integer | Maximum number of competitor results to return. Defaults to 1000. |
mode | string | Search scope relative to the target: exact URL match, URL prefix, entire domain, or all subdomains. Defaults to subdomains. |
offset | integer | Number of results to skip for pagination. Use with limit to retrieve subsequent result pages. |
order_by | string | Column identifier to sort results by. Must correspond to a valid response schema field. |
protocol | string | HTTP protocol filter: both HTTP and HTTPS, HTTP only, or HTTPS only. Defaults to both. |
volume_mode | string | Search volume calculation method: monthly totals or average across the period. Affects volume, traffic, and traffic value metrics. Defaults to monthly. |
where | string | Filter expression to narrow results. Supports column identifiers from the response schema (different set than select parameter). |
list_top_pages List Top Pages
Retrieve the top-performing pages for a domain or URL, including organic search metrics such as traffic and rankings for a specified date.
| Parameter | Type | Description |
|---|---|---|
date * | string | The date for which to retrieve metrics, specified in YYYY-MM-DD format. |
select * | string | A comma-separated list of metric columns to include in the response. Refer to the response schema for valid column identifiers. |
target * | string | The domain or URL to analyze. Can be a full domain, subdomain, or specific URL path depending on the mode selected. |
limit | integer | Maximum number of results to return. Defaults to 1000. |
mode | string | The scope of analysis relative to your target. Use 'exact' for the precise URL, 'prefix' for URL path matching, 'domain' for the entire domain, or 'subdomains' to include all subdomains. Defaults to s… |
order_by | string | Column identifier to sort results by. Refer to the response schema for valid column identifiers. |
protocol | string | Filter results by protocol type: 'http', 'https', or 'both' to include all protocols. Defaults to both. |
volume_mode | string | Calculation method for search volume metrics: 'monthly' for current month data or 'average' for historical average. Affects volume, traffic, and traffic value calculations. Defaults to monthly. |
where | string | Filter expression to narrow results based on column values. Refer to the response schema for recognized column identifiers and filtering syntax. |
list_paid_pages List Paid Pages
Retrieve paid search pages for a target domain or URL, showing which pages are generating paid search traffic on a specified date.
| Parameter | Type | Description |
|---|---|---|
date * | string | The date for which to report metrics, specified in YYYY-MM-DD format. |
select * | string | Comma-separated list of column names to include in the response. Refer to the response schema for valid column identifiers. |
target * | string | The domain or URL to analyze for paid pages. |
limit | integer | Maximum number of results to return in the response, up to 1000 by default. |
mode | string | Search scope relative to the target: exact URL match, URL prefix match, entire domain, or all subdomains. Defaults to all subdomains. |
order_by | string | Column name to sort results by. Refer to the response schema for valid column identifiers. |
protocol | string | Protocol to search within: both HTTP and HTTPS, HTTP only, or HTTPS only. Defaults to both. |
volume_mode | string | Calculation method for search volume metrics: monthly totals or average over time. Defaults to monthly and affects volume, traffic, and traffic value columns. |
where | string | Filter expression to narrow results. Use column identifiers from the response schema to construct conditions. |
list_pages_by_backlinks List Pages by Backlinks
Retrieve the best performing pages for a target domain or URL ranked by backlink count. Use this to identify which pages attract the most external links and understand your site's link profile.
| Parameter | Type | Description |
|---|---|---|
select * | string | Comma-separated list of column names to include in the response. Consult the response schema to see all available columns you can request. |
target * | string | The domain or URL to analyze. This is the target for which you want to find pages ranked by backlinks. |
history | string | Time frame for including historical backlink data: live data only, backlinks since a specific date (format: YYYY-MM-DD), or complete historical data. Defaults to all_time if not specified. |
limit | integer | Maximum number of results to return in the response. Defaults to 1000 results if not specified. |
mode | string | Search scope relative to your target: exact URL match, URL prefix match, entire domain, or all subdomains. Defaults to all subdomains if not specified. |
order_by | string | Column name to sort results by in ascending or descending order. Refer to the response schema for valid column names; note that certain columns like http_code_target, languages_target, last_visited_ta… |
protocol | string | Protocol scheme to filter results by: both HTTP and HTTPS, HTTP only, or HTTPS only. Defaults to both if not specified. |
where_column | string | Column identifier to filter on (e.g., 'backlinks', 'url_rating_source', 'domain_rating_source') |
where_operator | string | Comparison operator: '>', '<', '>=', '<=', '==', '!=' (default: '==') |
where_value | string | Value to compare against (will be properly escaped) |
list_pages_by_internal_links List Pages by Internal Links
Retrieve the best-performing pages for a target domain or URL ranked by the number of internal links pointing to them. Use this to identify which pages are most linked internally and understand your site's link structure.
| Parameter | Type | Description |
|---|---|---|
select * | string | Comma-separated list of data columns to include in the response. Refer to the response schema for valid column identifiers. |
target * | string | The domain or URL to analyze. Can be a full domain (example.com) or a specific URL path depending on the mode parameter. |
limit | integer | Maximum number of results to return. Defaults to 1000. |
mode | string | Defines the search scope relative to your target. Use 'exact' for the precise URL, 'prefix' for URL path matching, 'domain' for the root domain only, or 'subdomains' to include all subdomains. Default… |
order_by | string | Column identifier to sort results by. See the response schema for valid options. Note that certain columns like http_code_target, languages_target, last_visited_target, powered_by_target, target_redir… |
protocol | string | Filter results by protocol type. Choose 'http', 'https', or 'both' to include all protocols. Defaults to both. |
where | string | Filter expression to narrow results. Accepts column identifiers recognized by the API's filter syntax (note: these may differ from the select parameter's column identifiers). |
list_linked_domains List Linked Domains
Retrieve domains that link to your target domain or URL, with customizable filtering, sorting, and column selection for link analysis.
| Parameter | Type | Description |
|---|---|---|
select * | string | Comma-separated list of data columns to include in results. Refer to the response schema for valid column identifiers. |
target * | string | The domain or URL to analyze for incoming links. This is the target whose linked domains you want to discover. |
limit | integer | Maximum number of results to return. Defaults to 1000. |
mode | string | Defines the search scope relative to your target: exact URL match, URL prefix match, entire domain, or all subdomains. Defaults to subdomains. |
order_by | string | Column identifier to sort results by. Refer to the response schema for valid column identifiers. |
protocol | string | Filter results by protocol type: both HTTP and HTTPS, HTTP only, or HTTPS only. Defaults to both. |
where | string | Filter expression to narrow results. Supports column identifiers recognized by the API (note: these may differ from the select parameter identifiers). |
list_external_anchors List External Anchors
Retrieve outgoing external anchor links from a target domain or URL. Results can be filtered by search scope, protocol, and custom expressions, with configurable sorting and pagination.
| Parameter | Type | Description |
|---|---|---|
select * | string | Comma-separated list of column identifiers to include in the response. See response schema for valid column names. |
target * | string | The domain or URL to analyze for outgoing external anchors. |
limit | integer | Maximum number of results to return. Defaults to 1000. |
mode | string | The scope of the search relative to your target: exact URL match, URL prefix match, entire domain, or all subdomains. Defaults to subdomains. |
order_by | string | Column identifier to sort results by. See response schema for valid column names. |
protocol | string | Filter results by protocol type: both HTTP and HTTPS, HTTP only, or HTTPS only. Defaults to both. |
where | string | Filter expression to narrow results. Supports column identifiers recognized by the API (note: different set than the select parameter). |
list_internal_anchors List Internal Anchors
Retrieve outgoing internal anchor links from a target domain or URL. Results can be filtered, ordered, and scoped by search mode and protocol.
| Parameter | Type | Description |
|---|---|---|
select * | string | Comma-separated list of columns to include in the response. See response schema for valid column identifiers. |
target * | string | The domain or URL to analyze for outgoing internal anchors. |
limit | integer | Maximum number of results to return. Defaults to 1000. |
mode | string | The scope of the search relative to your target: exact URL match, URL prefix match, entire domain, or subdomains. Defaults to subdomains. |
order_by | string | Column identifier to sort results by. See response schema for valid column identifiers. |
protocol | string | Filter results by protocol type: both HTTP and HTTPS, HTTP only, or HTTPS only. Defaults to both. |
where | string | Filter expression to narrow results. Supports the column identifiers listed in the response schema (note: different identifiers than the select parameter). |
get_keyword_metrics Get Keyword Metrics
Retrieve keyword performance metrics and search data for specified keywords in a target country, with optional filtering by domain/URL ranking position and historical volume trends.
| Parameter | Type | Description |
|---|---|---|
country * | string | Two-letter ISO 3166-1 country code (e.g., 'us', 'gb', 'de') specifying the target market for keyword data. |
select * | string | Comma-separated list of data columns to include in the response. Refer to the response schema for valid column identifiers. |
limit | integer | Maximum number of results to return. Defaults to 1000 if not specified. |
order_by | string | Column identifier to sort results by. Refer to the response schema for valid options; note that volume_monthly is not supported for sorting on this endpoint. |
search_engine | string | Deprecated parameter. Only 'google' is supported; included for backward compatibility. |
target | string | Optional domain or URL to analyze keyword rankings for. Use with target_mode to define the scope of analysis. |
target_mode | string | Scope of the target URL analysis: 'exact' for the exact URL, 'prefix' for URL path prefix, 'domain' for the entire domain, or 'subdomains' for all subdomains. |
target_position | string | Filter keywords by the ranking position of the specified target: 'in_top10' for top 10 rankings or 'in_top100' for top 100 rankings. |
volume_monthly_date_from | string | Start date in YYYY-MM-DD format for retrieving historical monthly search volume data. Required only when requesting volume_monthly_history. |
volume_monthly_date_to | string | End date in YYYY-MM-DD format for retrieving historical monthly search volume data. Required only when requesting volume_monthly_history. |
where | string | Filter expression to narrow results based on keyword metrics and attributes. Refer to the response schema for supported column identifiers. |
get_keyword_volume_history Get Keyword Volume History
Retrieve historical search volume data for a keyword across a specified date range in a given country. Use this to analyze keyword popularity trends over time.
| Parameter | Type | Description |
|---|---|---|
country * | string | The target country for volume data, specified as a two-letter ISO 3166-1 alpha-2 country code (e.g., 'us' for United States, 'gb' for United Kingdom). |
keyword * | string | The keyword term to retrieve volume history for. |
date_from | string | The start date for the historical period in YYYY-MM-DD format. If omitted, defaults to the earliest available data. |
date_to | string | The end date for the historical period in YYYY-MM-DD format. If omitted, defaults to the most recent available data. |
get_keyword_volume_by_country Get Keyword Volume by Country
Retrieve search volume metrics for a keyword broken down by country. Use this to understand geographic demand patterns and identify high-opportunity markets for your target keyword.
| Parameter | Type | Description |
|---|---|---|
keyword * | string | The keyword to analyze. Provide the exact search term you want to get volume data for. |
limit | integer | Maximum number of countries to return in the results. Omit to get all available data. |
search_engine | string | Search engine to query (currently only Google is supported). This parameter is deprecated as of August 5, 2024. |
search_matching_keywords Search Matching Keywords
Find keyword variations and related search terms with performance metrics for a specific country. Returns matching keywords based on search mode (exact phrase or term-based) with optional filtering and sorting capabilities.
| Parameter | Type | Description |
|---|---|---|
country * | string | Two-letter ISO country code (e.g., 'us', 'gb', 'de') that determines the geographic market for keyword data and search volume metrics. |
select * | string | Comma-separated list of data columns to include in the response. Specify which metrics and attributes you want returned for each matching keyword. |
limit | integer | Maximum number of results to return in the response. Defaults to 1000 results if not specified. |
match_mode | string | Search matching mode: 'terms' finds keywords containing your search words in any order, while 'phrase' requires exact word order. Defaults to 'terms' mode. |
order_by | string | Column name to sort results by in ascending order. Refer to the response schema for valid column names; monthly search volume is not supported for sorting on this endpoint. |
search_engine | string | Deprecated parameter. Only 'google' is supported; included for backward compatibility. |
terms | string | Filter results to include all keyword ideas or only those phrased as questions. Defaults to returning all keyword ideas. |
where | string | Filter expression to narrow results based on keyword metrics and attributes. Use column identifiers from the response schema to construct filter conditions. |
search_keyword_suggestions Search Keyword Suggestions
Retrieve keyword search suggestions for a specified country. Returns relevant keyword variations and related search terms to help identify search opportunities in your target market.
| Parameter | Type | Description |
|---|---|---|
country * | string | Two-letter ISO 3166-1 country code specifying the geographic market for keyword suggestions. Required parameter that determines regional search data. |
select * | string | Comma-separated list of data columns to include in the response. Required parameter that determines which fields are returned for each suggestion. |
limit | integer | Maximum number of suggestions to return in the response. Defaults to 1000 results if not specified. |
order_by | string | Column name to sort results by. Refer to the response schema for valid column identifiers; note that monthly search volume is not available as a sort option for this endpoint. |
search_engine | string | Search engine source for suggestions. Currently supports Google only; this parameter is deprecated as of August 5, 2024. |
where | string | Filter expression to narrow results. Use column identifiers from the response schema to create conditions (different identifiers than those used in the select parameter). |
list_audit_projects List Audit Projects
Retrieve health scores and performance metrics for Site Audit projects. Returns data from the most recent crawl by default, or from a specified crawl date if provided.
| Parameter | Type | Description |
|---|---|---|
date | string | Retrieve metrics from a specific crawl date and time in ISO 8601 format (YYYY-MM-DDThh:mm:ss UTC). If omitted, returns data from the most recent available crawl. For scheduled crawls, returns the late… |
project_name | string | Filter results to projects matching this name. |
project_url | string | Filter results to projects matching this target URL. The comparison ignores protocol differences and trailing slashes for flexible matching. |
list_audit_issues List Audit Issues
Retrieve site audit issues for a specific project. This operation costs 50 API units per request and returns issues from either a specified crawl date or the most recent available crawl.
| Parameter | Type | Description |
|---|---|---|
project_id * | integer | The unique identifier of the project, found in the URL of your Site Audit project dashboard (https://app.ahrefs.com/site-audit/#project_id#). |
date | string | Optional timestamp in ISO 8601 format (YYYY-MM-DDThh:mm:ss UTC) to retrieve issues from a specific crawl. Defaults to the most recent crawl if not provided. For scheduled crawls, returns data from the… |
get_page_content Get Page Content
Retrieve page content and metadata from a Site Audit project for a specific URL. This operation consumes 50 API units per request.
| Parameter | Type | Description |
|---|---|---|
project_id * | integer | The unique identifier of the Site Audit project. Only projects with verified ownership are supported. You can find this ID in your Site Audit project URL on Ahrefs. |
select * | string | Comma-separated list of column identifiers to include in the response. Refer to the response schema for valid column names. |
target_url * | string | The full URL of the page to retrieve content for. |
date | string | Optional crawl date in ISO 8601 format (YYYY-MM-DDThh:mm:ss UTC). Defaults to the most recent crawl if omitted. For scheduled crawls, returns data from the latest crawl completed before this timestamp… |
list_audit_pages List Audit Pages
Retrieve page-level metrics and SEO data from a Site Audit crawl. This endpoint costs 50 API units per request and supports filtering, sorting, and comparison against previous crawls.
| Parameter | Type | Description |
|---|---|---|
project_id * | integer | The unique identifier of the project. Only projects with verified ownership are supported. You can find this in your Site Audit project URL on Ahrefs. |
date | string | The crawl date to retrieve metrics from in ISO 8601 format (YYYY-MM-DDThh:mm:ss UTC). Defaults to the most recent crawl if omitted. For scheduled crawls, returns data from the latest crawl before this… |
filter_mode | string | Filter pages by their status relative to the previous crawl. Use 'added' for new matches, 'new' for newly crawled pages, 'removed' for pages no longer matching filters, 'missing' for uncrawled pages t… |
issue_id | string | The unique identifier of a specific issue to filter by. When specified, only pages affected by this issue are returned. Retrieve issue IDs from the site-audit/issues endpoint. |
limit | integer | The maximum number of results to return. Defaults to 1000 results per request. |
order_by | string | The column name to sort results by. Must be one of the valid columns available in the response schema. |
select | string | A comma-separated list of columns to include in the response. Defaults to a comprehensive set including page rating, URL, HTTP status, content type, title, meta description, heading, traffic, canonica… |
where_column | string | Column identifier to filter on (e.g., 'backlinks', 'url_rating_source', 'domain_rating_source') |
where_operator | string | Comparison operator: '>', '<', '>=', '<=', '==', '!=' (default: '==') |
where_value | string | Value to compare against (will be properly escaped) |
get_rank_tracker_overview Get Rank Tracker Overview
Retrieve overview metrics for all tracked keywords in a Rank Tracker project on a specific date, with support for filtering, sorting, and device-specific rankings.
| Parameter | Type | Description |
|---|---|---|
date * | string | The date for which to report metrics, specified in YYYY-MM-DD format. |
device * | string | The device type for ranking data: either desktop or mobile. |
project_id * | integer | The unique identifier of the Rank Tracker project, found in the project URL on Ahrefs. |
select * | string | A comma-separated list of metric columns to include in the response. Refer to the response schema for valid column identifiers. |
limit | integer | The maximum number of results to return. Defaults to 1000 if not specified. |
order_by | string | A column identifier to sort results by. Refer to the response schema for valid column identifiers. |
volume_mode | string | The search volume calculation method: monthly (default) calculates based on monthly data, while average uses historical averages. This affects volume, traffic, and traffic value metrics. |
where | string | A filter expression to narrow results by specific criteria. Refer to the response schema for recognized column identifiers and filter syntax. |
get_serp_overview Get SERP Overview
Retrieve the current SERP overview for a tracked keyword, including top organic positions and ranking data. This endpoint is free and does not consume API units.
| Parameter | Type | Description |
|---|---|---|
country * | string | The target country specified as a two-letter ISO 3166-1 alpha-2 code (e.g., 'us', 'gb', 'de'). |
device * | string | The device type for ranking data: either 'desktop' or 'mobile'. |
keyword * | string | The keyword to retrieve SERP data for. |
project_id * | integer | The unique identifier of your Rank Tracker project, found in the project URL on Ahrefs. |
date | string | Optional timestamp to retrieve historical SERP data in ISO 8601 format (YYYY-MM-DDThh:mm:ss). If omitted, returns the most recent available data. |
language_code | string | Optional language code for the tracked keyword. Use the management/project-keywords endpoint to find the correct language code for your keyword. |
location_id | integer | Optional location ID for the tracked keyword. Use the management/project-keywords endpoint to find the correct location ID for your keyword. |
top_positions | integer | Optional limit on the number of top organic positions to return. If not specified, all available positions are included. |
list_competitor_rankings List Competitor Rankings
Retrieve an overview of competitor rankings for your tracked keywords on a specific date. This endpoint is free and does not consume API units.
| Parameter | Type | Description |
|---|---|---|
date * | string | The date for which to retrieve ranking metrics, specified in YYYY-MM-DD format. |
device * | string | The device type to report rankings for: either desktop or mobile. |
project_id * | integer | The unique identifier of your Rank Tracker project, found in the project URL within Ahrefs. |
select * | string | A comma-separated list of column identifiers to include in the response. Refer to the response schema for valid column names. |
limit | integer | The maximum number of results to return in the response. Defaults to 1000 if not specified. |
order_by | string | The column identifier to sort results by. Refer to the response schema for valid column names. |
volume_mode | string | The method for calculating search volume metrics: monthly (default) or average. This affects volume, traffic, and traffic value calculations. |
where | string | A filter expression to narrow results. Supports filtering by recognized column identifiers (which may differ from those used in the select parameter). |
list_competitor_pages List Competitor Pages
Retrieve competitor pages data for a Rank Tracker project on a specific date, filtered by device type and customizable metrics.
| Parameter | Type | Description |
|---|---|---|
date * | string | The date for which to retrieve metrics, specified in YYYY-MM-DD format. |
device * | string | The device type to report rankings for: either desktop or mobile. |
project_id * | integer | The unique identifier of your Rank Tracker project, found in the project URL on Ahrefs. |
select * | string | A comma-separated list of column identifiers to include in the response. Refer to the response schema for valid column names. |
limit | integer | The maximum number of results to return. Defaults to 1000 if not specified. |
order_by | string | A column identifier to sort results by. Refer to the response schema for valid column names. |
target_and_tracked_competitors_only | boolean | When enabled, restricts results to only target and tracked competitors. Defaults to false. |
volume_mode | string | The method for calculating search volume: monthly (default) or average. This affects volume, traffic, and traffic value metrics. |
where | string | A filter expression to narrow results. Supports column identifiers recognized by the API (which may differ from select parameter identifiers). |
list_competitor_stats List Competitor Stats
Retrieve competitor performance metrics for tracked keywords on a specified date and device type. Use this to analyze how competitors rank for your target keywords and monitor their search visibility.
| Parameter | Type | Description |
|---|---|---|
date * | string | The date for which to retrieve metrics, formatted as YYYY-MM-DD. |
device * | string | The device type to report rankings for: either desktop or mobile. |
project_id * | integer | The unique identifier of your Rank Tracker project, found in the project URL within Ahrefs. |
select * | string | Comma-separated list of metric columns to include in the response. Refer to the response schema for available column identifiers. |
volume_mode | string | The method for calculating search volume metrics: monthly (default) for monthly averages or average for overall average volume. This affects volume, traffic, and traffic value calculations. |
get_serp_overview_keyword Get SERP Overview for Keyword
Retrieve SERP (Search Engine Results Page) overview data for a keyword in a specified country, including top organic positions and customizable metrics.
| Parameter | Type | Description |
|---|---|---|
country * | string | Two-letter ISO 3166-1 country code (e.g., 'us', 'gb', 'de') indicating the search market for the SERP data. |
keyword * | string | The search keyword to retrieve SERP overview data for. |
select * | string | Comma-separated list of data columns to include in the response. Refer to the response schema documentation for valid column identifiers. |
date | string | Specific date and time for which to retrieve SERP data in ISO 8601 format (YYYY-MM-DDThh:mm:ss). If not provided, the most recent available data is returned. |
top_positions | integer | Maximum number of top organic search results to return. If omitted, all available positions are included. |
analyze_targets_batch Analyze Targets Batch
Perform batch SEO analysis on multiple targets to retrieve comprehensive metrics including backlinks, keywords, traffic, and ranking data. Customize which metrics to return and how results are ordered.
| Parameter | Type | Description |
|---|---|---|
select * | array | Specify which SEO metrics to include in the response (e.g., url, ahrefs_rank). Refer to the response schema for all available column identifiers. |
targets * | array | Provide a list of targets (domains, URLs, or keywords) to analyze. Each target will be evaluated for the selected metrics. |
order_by | string | Sort results by a specific SEO metric column. Refer to the response schema for valid column identifiers. |
volume_mode | string | Choose how search volume is calculated: monthly (current month data) or average (historical average). This affects volume, traffic, and traffic value metrics. |
get_subscription_limits_and_usage Get Subscription Limits and Usage
Retrieve current workspace and API key limits and usage information. This request is free and does not consume any API units.
list_projects List Projects
Retrieve your projects with optional filtering by owner, access type, and keyword tracking status. This operation is free and does not consume any API units.
| Parameter | Type | Description |
|---|---|---|
access | string | Filter projects by access type: either private (accessible only to you) or shared (accessible to others). |
has_keywords | boolean | Filter to only include projects that have Rank Tracker keywords configured. |
owned_by | string | Filter projects by the email address of the project owner. |
create_project Create Project
Create a new project by specifying a target URL, protocol, and matching scope. The project will be assigned to the specified owner or the workspace owner by default.
| Parameter | Type | Description |
|---|---|---|
mode * | string | The scope matching strategy for the target URL: exact (precise URL match), prefix (URL and all subpaths), domain (entire domain), or subdomains (domain and all subdomains). |
project_name * | string | A descriptive name for this project to identify it within the workspace. |
protocol * | string | The protocol(s) to monitor for the target: http only, https only, or both protocols. |
url * | string | The URL of the target resource or service that this project will monitor or manage. |
access | string | The access control level for this project, either private (restricted to owner) or shared (accessible to workspace members). |
owned_by | string | The email address of the user who will own this project. If not specified, ownership defaults to the workspace owner. |
update_project_access Update Project Access
Update the access setting for a project to control whether it is private or shared. This operation is free and does not consume any API units.
| Parameter | Type | Description |
|---|---|---|
access * | string | The new access level for the project. Must be either 'private' to restrict access to the project owner, or 'shared' to allow others to access it. |
project_id * | integer | The unique identifier of the project to update. You can find this ID in the URL of your Rank Tracker project dashboard in Ahrefs (the numeric value in the project URL). |
list_project_keywords List Project Keywords
Retrieve all keywords tracked for a specific project in Rank Tracker. This operation is free and does not consume any API units.
| Parameter | Type | Description |
|---|---|---|
project_id * | integer | The unique identifier of the project, found in the URL of your Rank Tracker project dashboard (the numeric ID in the project URL). |
add_keywords Add Keywords
Add keywords to a project and assign them to specific locations for tracking. This operation allows you to expand your keyword monitoring across different geographic regions.
| Parameter | Type | Description |
|---|---|---|
keywords * | array | A list of keywords to add to the project. Each keyword will be assigned to all specified locations. |
locations * | array | A list of locations where the keywords should be tracked. Use the Locations and languages endpoint to retrieve valid country codes, language codes, and location IDs for your target regions. |
project_id * | integer | The unique identifier of the project you want to add keywords to. You can find this ID in the URL of your Rank Tracker project dashboard. |
delete_keywords Delete Keywords
Remove one or more keywords from a Rank Tracker project. This operation is free and does not consume API units.
| Parameter | Type | Description |
|---|---|---|
keywords * | array | An array of keywords to remove from the project. Each keyword should be specified as a string value. |
project_id * | integer | The unique identifier of the Rank Tracker project, found in the project URL within Ahrefs. |
list_project_competitors List Project Competitors
Retrieve the list of competitors tracked for a specific project. This operation is free and does not consume any API units.
| Parameter | Type | Description |
|---|---|---|
project_id * | integer | The unique identifier of the project, found in the URL of your Rank Tracker project dashboard (the numeric ID in the project overview URL). |
add_competitors Add Competitors
Add competitors to a Rank Tracker project for monitoring and comparison. This operation is free and does not consume API units.
| Parameter | Type | Description |
|---|---|---|
competitors * | array | An array of competitor entries to add to the project. Each item represents a competitor domain or website to track. |
project_id * | integer | The unique identifier of the Rank Tracker project. You can find this ID in the URL of your project dashboard (https://app.ahrefs.com/rank-tracker/overview/#project_id#). |
delete_competitors Delete Competitors
Remove competitors from a Rank Tracker project. This operation is free and does not consume any API units.
| Parameter | Type | Description |
|---|---|---|
competitors * | array | An array of competitor identifiers to remove from the project. Each item should be a competitor ID. |
project_id * | integer | The unique identifier of the Rank Tracker project, found in the project URL within Ahrefs (e.g., https://app.ahrefs.com/rank-tracker/overview/#project_id#). |
list_locations List Locations
Retrieve available locations and supported languages for a specified country. This is a free operation that does not consume API units.
| Parameter | Type | Description |
|---|---|---|
country_code * | string | The two-letter ISO 3166-1 alpha-2 country code identifying the country for which to retrieve location and language information. |
us_state | string | The two-letter ISO 3166-2:US state code. Required only when country_code is set to 'us' to retrieve state-specific location and language data. |
list_keyword_list_keywords List Keyword List Keywords
Retrieve all keywords from a specified keyword list. This operation is free and does not consume any API units.
| Parameter | Type | Description |
|---|---|---|
keyword_list_id * | integer | The unique identifier of the keyword list from which to retrieve keywords. |
add_keywords_to_list Add Keywords to List
Add one or more keywords to an existing keyword list. The keywords will be appended to the list's current contents.
| Parameter | Type | Description |
|---|---|---|
keyword_list_id * | integer | The unique identifier of the keyword list to update. Must reference an existing keyword list. |
keywords * | array | An array of keywords to add to the list. Each keyword is a string value; order is preserved as provided. |
delete_keyword_list_keywords Delete Keyword List Keywords
Remove one or more keywords from an existing keyword list. Specify the keyword list by its ID and provide the keywords to be deleted.
| Parameter | Type | Description |
|---|---|---|
keyword_list_id * | integer | The unique identifier of the keyword list from which keywords will be removed. |
keywords * | array | An array of keywords to delete from the specified keyword list. Each keyword in the array will be removed from the list. |
list_brand_radar_prompts List Brand Radar Prompts
Retrieve the Brand Radar prompts associated with a specific report. This operation is free and does not consume any API units.
| Parameter | Type | Description |
|---|---|---|
report_id * | string | The unique identifier of the Brand Radar report. You can find this ID in the URL of your Brand Radar report within Ahrefs (the #report_id# segment in https://app.ahrefs.com/brand-radar/reports/#report… |
create_brand_radar_prompt Create Brand Radar Prompt
Create custom prompts for Brand Radar reports to customize monitoring and analysis. This operation is free and does not consume API units.
| Parameter | Type | Description |
|---|---|---|
countries * | array | A list of two-letter country codes in ISO 3166-1 alpha-2 format specifying the geographic regions for the prompts. |
prompts * | array | A list of custom prompts to apply to the report. Each prompt must be valid UTF-8 text and not exceed 400 characters in length. |
report_id * | string | The unique identifier of the Brand Radar report where prompts will be applied. You can find this ID in the URL of your Brand Radar report in Ahrefs. |
delete_brand_radar_prompts Delete Brand Radar Prompts
Remove custom prompts from a Brand Radar report. This operation is free and does not consume API units.
| Parameter | Type | Description |
|---|---|---|
prompts * | array | List of custom prompts to delete. Each prompt must be valid UTF-8 encoded text and not exceed 400 characters in length. |
report_id * | string | The unique identifier of the Brand Radar report from which to delete prompts. You can find this ID in the URL of your Brand Radar report in Ahrefs. |
countries | array | Optional list of two-letter country codes (ISO 3166-1 alpha-2 format) to scope the prompt deletion to specific countries. |
list_brand_radar_reports List Brand Radar Reports
Retrieve brand radar reports to monitor brand performance and competitive insights. This endpoint is free to use and does not consume any API units.
create_brand_radar_report Create Brand Radar Report
Create a brand radar report that monitors brand mentions across AI-powered data sources. This operation is free and does not consume API units.
| Parameter | Type | Description |
|---|---|---|
data_source * | string | The AI data source to monitor for brand mentions. Choose from ChatGPT, Gemini, Perplexity, or Copilot. |
frequency * | string | The update frequency for the report. Select daily for real-time monitoring, weekly for periodic summaries, monthly for long-term trends, or off to disable the report. |
name | string | A custom name for the report to help identify it in your dashboard. |
update_brand_radar_report Update Brand Radar Report
Update the configuration of a Brand Radar report, including its monitoring frequency. This operation is free and does not consume API units.
| Parameter | Type | Description |
|---|---|---|
prompts_frequency * | array | The frequency at which the report should generate prompts. Specify as an array of frequency values. |
report_id * | string | The unique identifier of the Brand Radar report to update. You can find this ID in the URL of your report in Ahrefs at https://app.ahrefs.com/brand-radar/reports/#report_id#/... |
list_ai_responses List AI Responses
Retrieve AI-generated responses from multiple chatbot models for brand-related queries. API unit consumption depends on prompt type: custom prompts are free, while Ahrefs prompts follow standard pricing.
| Parameter | Type | Description |
|---|---|---|
data_source * | string | Comma-separated list of chatbot models to query. Choose from Google AI Overviews, Google AI Mode, ChatGPT, Gemini, Perplexity, or Copilot. Note: Google models cannot be combined with each other or wit… |
select * | string | Comma-separated list of columns to include in the response. Required to specify which data fields you want returned. |
date | string | Specific date to search for, formatted as YYYY-MM-DD. |
limit | integer | Maximum number of results to return in the response. Defaults to 1000 if not specified. |
order_by | string | Column to sort results by. Choose between relevance (default) or volume-based ordering. |
prompts | string | Type of prompts to use for generating responses. Choose Ahrefs prompts (standard pricing), custom prompts (free, requires report_id), or both (default). Custom prompts require a report_id to be provid… |
report_id | string | ID of a saved report to use as the base configuration. When provided, brand, competitors, market, and country settings are inherited from the report, though country and filters can be overridden. |
where | string | Filter expression to narrow results using recognized column identifiers. Refer to the response schema for valid column names to use in filter conditions. |
list_cited_pages List Cited Pages
Retrieve pages that cite your brand across specified chatbot models and AI overviews. API unit consumption depends on the prompts parameter: custom prompt data requests are free, while requests including Ahrefs prompt data incur standard API unit charges.
| Parameter | Type | Description |
|---|---|---|
data_source * | string | Comma-separated list of chatbot models to query. Choose from Google AI Overviews, Google AI Mode, ChatGPT, Gemini, Perplexity, or Copilot. Note: Google models cannot be combined with each other or wit… |
select * | string | Comma-separated list of columns to include in the response. Required to specify which data fields you want returned. |
date | string | Specific date to search for in YYYY-MM-DD format. If omitted, returns results across all available dates. |
limit | integer | Maximum number of results to return in the response. Defaults to 1000 if not specified. |
prompts | string | Type of prompts to apply: 'ahrefs' for Ahrefs-generated prompts, 'custom' for your own prompts (requires report_id), or omit to use both types. |
report_id | string | ID of a saved Brand Radar report to use as the configuration source. When provided, brand, competitors, market, and country settings are inherited from the report. You can find this ID in your Ahrefs… |
where | string | Filter expression to narrow results by specific column criteria. Refer to the response schema for valid column identifiers supported by this filter. |
list_cited_domains List Cited Domains
Retrieve domains cited in AI visibility data from chatbot models and search engines. API unit consumption depends on the prompts parameter: requests using only custom prompts are free, while requests including Ahrefs prompts follow standard pricing.
| Parameter | Type | Description |
|---|---|---|
data_source * | string | Comma-separated list of chatbot models and AI sources to query. Choose from Google AI Overviews, Google AI Mode, ChatGPT, Gemini, Perplexity, or Copilot. Note: Google models cannot be combined with ea… |
select * | string | Comma-separated list of column identifiers to include in the response. Required to specify which data fields you want returned. |
date | string | Specific date to retrieve data for, formatted as YYYY-MM-DD. |
limit | integer | Maximum number of results to return in the response. Defaults to 1000 if not specified. |
prompts | string | Type of prompts to use for analysis. Choose 'ahrefs' for Ahrefs-generated prompts, 'custom' for your own prompts (requires report_id), or omit to use both types. |
report_id | string | ID of a saved Brand Radar report to use as the configuration source. When provided, brand, competitors, market, and country settings are inherited from the report. You can find this ID in the URL of y… |
where | string | Filter expression to narrow results using recognized column identifiers. Refer to the response schema for valid column names to use in filter conditions. |
list_brand_radar_impression_overviews List Brand Radar Impression Overviews
Retrieve impressions overview data for Brand Radar across specified chatbot models and data sources. API unit consumption depends on prompt type: custom prompts are free, while Ahrefs prompts follow standard pricing.
| Parameter | Type | Description |
|---|---|---|
data_source * | string | Comma-separated list of chatbot models to query. Choose from: google_ai_overviews, google_ai_mode, chatgpt, gemini, perplexity, or copilot. Note: Google models cannot be combined with each other or wi… |
select * | string | Comma-separated list of columns to include in the response. Required parameter that determines which data fields are returned. |
prompts | string | Type of prompts to use for data retrieval: 'ahrefs' for Ahrefs-generated prompts, 'custom' for user-defined prompts, or omit to use both types. Custom prompts require a report_id to be specified. |
report_id | string | ID of an existing Brand Radar report to use as a configuration source. When provided, brand, competitors, market, and country settings are inherited from the report. Can be found in the URL of your Br… |
where | string | Filter expression to narrow results using recognized column identifiers. Refer to the response schema for valid column names to use in filter conditions. |
list_brand_mentions_overview List Brand Mentions Overview
Retrieve an overview of brand mentions data across specified data sources. API unit consumption depends on prompt type: custom prompts only are free, while Ahrefs prompts follow standard pricing.
| Parameter | Type | Description |
|---|---|---|
data_source * | string | Comma-separated list of AI chatbot models to query. Choose from Google AI Overviews, Google AI Mode, ChatGPT, Gemini, Perplexity, or Copilot. Note: Google models cannot be combined with each other or… |
select * | string | Comma-separated list of column identifiers to include in the response. Required to specify which data fields to return. |
prompts | string | Type of prompts to apply to the data. Choose 'ahrefs' for Ahrefs-generated prompts, 'custom' for your own prompts (requires a report_id), or omit to use both types. |
report_id | string | The Brand Radar report ID to use as a template. When provided, brand, competitors, market, and country settings are inherited from the report. You can find this ID in your Brand Radar report URL. Coun… |
where | string | Filter expression to narrow results using recognized column identifiers. Use this to apply conditions on the mentions data. |
list_brand_mention_impressions_history List Brand Mention Impressions History
Retrieve historical impression data for brand mentions across AI chatbot platforms. API consumption varies based on prompt type: custom prompts are free, while Ahrefs prompts follow standard pricing.
| Parameter | Type | Description |
|---|---|---|
brand * | string | The brand name to track for mentions and impressions. |
data_source * | string | One or more AI chatbot platforms to query, provided as a comma-separated list. Google models (google_ai_overviews, google_ai_mode) cannot be combined with each other or with non-Google platforms (chat… |
date_from * | string | The start date for the historical period, formatted as YYYY-MM-DD. |
date_to | string | The end date for the historical period, formatted as YYYY-MM-DD. If omitted, defaults to the current date. |
prompts | string | The type of prompts to include in results: 'ahrefs' for Ahrefs-generated prompts, 'custom' for user-defined prompts (requires report_id), or omit to include both types. |
report_id | string | The ID of a saved report to use as a template. When provided, market, country, and filter settings are inherited from the report, though country and filters can be overridden with explicit parameters. |
where | string | A filter expression to narrow results. Supports recognized column identifiers for advanced filtering. |
list_brand_mention_history List Brand Mention History
Retrieve historical mention data for a brand across specified AI chatbot models and date range. API consumption varies based on prompt type: custom prompts are free, while Ahrefs prompts follow standard pricing.
| Parameter | Type | Description |
|---|---|---|
brand * | string | The brand name to retrieve mention history for. |
data_source * | string | One or more chatbot models to query, provided as a comma-separated list. Google models (google_ai_overviews, google_ai_mode) cannot be combined with each other or with non-Google models (chatgpt, gemi… |
date_from * | string | The start date for the historical period in YYYY-MM-DD format (inclusive). |
date_to | string | The end date for the historical period in YYYY-MM-DD format (inclusive). If omitted, defaults to the current date. |
prompts | string | Filter results to a specific prompt type: 'ahrefs' for Ahrefs-generated prompts or 'custom' for user-defined prompts. If not specified, both types are included. Custom prompts require a report_id. |
report_id | string | The Brand Radar report ID to use as a configuration source. When provided, market, country, and filter settings are inherited from the report, though country and filters parameters can override report… |
where | string | A filter expression to narrow results by specific columns. Refer to API documentation for recognized column identifiers. |
list_brand_sov_history List Brand SOV History
Retrieve historical Share of Voice data for brands across specified chatbot models and date ranges. API unit consumption depends on prompt type: custom prompts only are free, while Ahrefs prompts follow standard pricing.
| Parameter | Type | Description |
|---|---|---|
data_source * | string | Comma-separated list of chatbot models to analyze (google_ai_overviews, google_ai_mode, chatgpt, gemini, perplexity, or copilot). Google models cannot be combined with each other or with non-Google mo… |
date_from * | string | Start date for the historical period in YYYY-MM-DD format. |
date_to | string | End date for the historical period in YYYY-MM-DD format. If omitted, defaults to the current date. |
prompts | string | Type of prompts to include in results: 'ahrefs' for Ahrefs-generated prompts, 'custom' for user-defined prompts (requires report_id), or omit to include both types. |
report_id | string | ID of an existing Brand Radar report to use as a template. When provided, brand, competitors, market, and country settings are inherited from the report, though country and filters parameters can over… |
where | string | Optional filter expression to narrow results based on specific column identifiers. |
list_web_analytics_stats List Web Analytics Stats
Retrieve aggregated web analytics statistics for a project, with optional filtering, sorting, and date range constraints.
| Parameter | Type | Description |
|---|---|---|
project_id * | integer | The unique identifier of the project for which to retrieve analytics statistics. |
from | string | Start of the date range for the analytics query, specified in ISO 8601 format. If omitted, defaults to the earliest available data. |
limit | integer | Maximum number of results to return in the response. Useful for pagination and controlling response size. |
order_by | string | Sort results by a metric in ascending or descending order, specified as metric_name:asc or metric_name:desc. |
to | string | End of the date range for the analytics query, specified in ISO 8601 format. If omitted, defaults to the current date. |
where | string | Filter expression to narrow results by dimensions and metrics. Use standard filter syntax to specify conditions on available dimensions and metrics. |
get_web_analytics_chart Get Web Analytics Chart
Retrieve time-series chart data for web analytics metrics with configurable time granularity. Use this to visualize analytics trends across different time periods.
| Parameter | Type | Description |
|---|---|---|
granularity * | string | The time interval for aggregating data points. Choose from hourly, daily, weekly, or monthly granularity depending on the level of detail needed. |
project_id * | integer | The unique identifier for the project whose analytics data you want to retrieve. |
from | string | Optional start datetime for the query range. Specify in ISO 8601 format to define when the data collection period begins. |
to | string | Optional end datetime for the query range. Specify in ISO 8601 format to define when the data collection period ends. |
where | string | Optional filter expression to narrow results by specific dimensions and metrics. Use standard filter syntax to refine the data returned. |
list_source_channels List Source Channels
Retrieve web analytics data grouped by source channels, including visitor counts, bounce rates, and session duration metrics. This endpoint is free and does not consume API units.
| Parameter | Type | Description |
|---|---|---|
project_id * | integer | The unique identifier for the project whose source channel analytics you want to retrieve. |
from | string | Start of the date range for the analytics query in ISO 8601 datetime format. |
limit | integer | Maximum number of results to return in the response. |
order_by | string | Sort results by a metric in ascending or descending order. Supported metrics include visitors, session_bounce_rate, and avg_session_duration_sec. |
to | string | End of the date range for the analytics query in ISO 8601 datetime format. |
where | string | Filter results using expressions that reference dimensions and metrics to narrow down the data returned. |
get_source_channels_chart Get Source Channels Chart
Retrieve source channels chart data with visitor analytics and session metrics, aggregated at the specified time granularity.
| Parameter | Type | Description |
|---|---|---|
granularity * | string | The time interval for aggregating data points in the chart. Choose from hourly, daily, weekly, or monthly granularity. |
project_id * | integer | The unique identifier for the project whose analytics data should be retrieved. |
from | string | Start datetime for the data query range. Use ISO 8601 format to define the beginning of the analysis period. |
source_channels_to_chart | string | Comma-separated list of source channels to include in the chart. If not specified, defaults to the top 5 channels by visitor count. |
to | string | End datetime for the data query range. Use ISO 8601 format to define the end of the analysis period. |
where | string | Filter expression to narrow results by dimensions and metrics. Use standard filter syntax to refine the dataset. |
list_traffic_sources List Traffic Sources
Retrieve traffic sources data for a project, showing where visitors are coming from. Results can be filtered by date range and custom criteria, with optional sorting and pagination.
| Parameter | Type | Description |
|---|---|---|
project_id * | integer | The unique identifier of the project to retrieve traffic sources for. |
from | string | Start of the date range for the query in ISO 8601 datetime format. |
limit | integer | Maximum number of results to return in the response. |
order_by | string | Sort results by a specific metric in ascending or descending order using the format metric:asc or metric:desc. |
to | string | End of the date range for the query in ISO 8601 datetime format. |
where | string | Filter results using expressions that reference available dimensions and metrics to narrow down the data. |
get_traffic_sources_chart Get Traffic Sources Chart
Retrieve traffic sources chart data with visitor metrics aggregated by your specified time granularity (hourly, daily, weekly, or monthly). This endpoint is free to use and does not consume API units.
| Parameter | Type | Description |
|---|---|---|
granularity * | string | The time interval for grouping data points in the chart. Choose from hourly, daily, weekly, or monthly granularity. |
project_id * | integer | The unique identifier for the project whose traffic sources you want to analyze. |
from | string | Start datetime for the data query range in ISO 8601 format. If omitted, data retrieval begins from the earliest available records. |
sources_to_chart | string | Comma-separated list of traffic sources to include in the chart. If not specified, the top 5 sources by visitor count are displayed by default. |
to | string | End datetime for the data query range in ISO 8601 format. If omitted, data retrieval extends to the most recent available records. |
where | string | Optional filter expression to narrow results by dimensions and metrics relevant to your traffic sources data. |
list_referrers List Referrers
Retrieve referrer traffic sources and their associated metrics for a project, with optional filtering, sorting, and date range selection.
| Parameter | Type | Description |
|---|---|---|
project_id * | integer | The unique identifier of the project for which to retrieve referrer analytics. |
from | string | Start of the date range for the analytics query in ISO 8601 datetime format. |
limit | integer | Maximum number of referrer records to return in the response. |
order_by | string | Sort results by a specific metric in ascending or descending order using the format `metric:asc` or `metric:desc`. |
to | string | End of the date range for the analytics query in ISO 8601 datetime format. |
where | string | Filter results using a filter expression that can reference available dimensions and metrics to narrow down referrer data. |
get_referrers_chart Get Referrers Chart
Retrieve referrers chart data for web analytics, showing traffic sources over a specified time period with configurable granularity and filtering options.
| Parameter | Type | Description |
|---|---|---|
granularity * | string | Time granularity for data points in the chart. Choose from hourly, daily, weekly, or monthly intervals. |
project_id * | integer | The unique identifier for the project whose referrers data should be retrieved. |
from | string | Start datetime for the data query range. Use ISO 8601 format for the timestamp. |
source_referers_to_chart | string | Comma-separated list of referrer values to include in the chart. If not specified, defaults to the top 5 referrers by visitor count. |
to | string | End datetime for the data query range. Use ISO 8601 format for the timestamp. |
where | string | Filter expression to narrow results by dimensions and metrics. Use standard filter syntax to refine the data returned. |
list_utm_parameters List UTM Parameters
Retrieve UTM parameter data for web analytics, grouped by a specified UTM dimension (source, medium, campaign, term, or content) with optional filtering and time range selection.
| Parameter | Type | Description |
|---|---|---|
project_id * | integer | The unique identifier of the project for which to retrieve UTM parameter analytics. |
utm_param * | string | The UTM parameter to use as the grouping dimension. Choose from: utm_source, utm_medium, utm_campaign, utm_term, or utm_content. |
from | string | Start datetime for the data query range in ISO 8601 format. |
limit | integer | Maximum number of results to return in the response. |
order_by | string | Sort results by a metric in ascending or descending order using the format metric:asc or metric:desc. |
to | string | End datetime for the data query range in ISO 8601 format. |
where | string | Filter results using expressions that reference available dimensions and metrics. |
get_utm_params_chart Get UTM Parameters Chart
Retrieve UTM parameters chart data for web analytics, visualizing traffic patterns across a specified UTM dimension over time. Use this to analyze campaign performance, traffic sources, or other UTM-tracked metrics.
| Parameter | Type | Description |
|---|---|---|
granularity * | string | The time interval for data aggregation in the chart. Choose from: hourly, daily, weekly, or monthly granularity. |
project_id * | integer | The unique identifier for the project whose analytics data you want to retrieve. |
utm_param * | string | The UTM parameter to use as the primary dimension for the chart. Choose from: utm_source, utm_medium, utm_campaign, utm_term, or utm_content. |
from | string | Optional start datetime for the data query range. Use ISO 8601 format to define when the analytics period begins. |
to | string | Optional end datetime for the data query range. Use ISO 8601 format to define when the analytics period ends. |
utm_params_to_chart | string | Optional comma-separated list of specific UTM parameter values to include in the chart. If omitted, the top 5 values by visitor count are displayed by default. |
where | string | Optional filter expression to refine the data. You can reference available dimensions and metrics to narrow results based on specific criteria. |
list_entry_pages List Entry Pages
Retrieve entry pages analytics data for a project, showing which pages users first land on. Supports filtering by date range and result limits.
| Parameter | Type | Description |
|---|---|---|
project_id * | integer | The unique identifier for the project whose entry pages data should be retrieved. |
from | string | Start of the date range for analytics data in ISO 8601 format. Only data from this datetime onward will be included. |
limit | integer | Maximum number of results to return in the response. Useful for pagination and controlling response size. |
order_by_direction | string | Sort direction: 'asc' for ascending or 'desc' for descending |
order_by_metric | string | Metric to order by. Supported values: entry_page, visitors, entries, avg_session_duration_sec |
to | string | End of the date range for analytics data in ISO 8601 format. Only data up to this datetime will be included. |
where_column | string | Column identifier to filter on (e.g., 'backlinks', 'url_rating_source', 'domain_rating_source') |
where_operator | string | Comparison operator: '>', '<', '>=', '<=', '==', '!=' (default: '==') |
where_value | string | Value to compare against (will be properly escaped) |
get_entry_pages_chart Get Entry Pages Chart
Retrieve entry pages chart data for a project, showing visitor traffic patterns across specified time periods. This endpoint is free and does not consume API units.
| Parameter | Type | Description |
|---|---|---|
granularity * | string | Set the time interval for data points on the chart: hourly, daily, weekly, or monthly granularity. |
project_id * | integer | The unique identifier of the project for which to retrieve entry pages chart data. |
entry_pages_to_chart | string | Specify which entry page metrics to display on the chart as a comma-separated list. Defaults to the top 5 pages by visitor count if not provided. |
from | string | Start datetime for the data query range in ISO 8601 format. |
to | string | End datetime for the data query range in ISO 8601 format. |
where | string | Apply filters to the data using dimension and metric expressions to narrow results to specific criteria. |
list_exit_pages List Exit Pages
Retrieve exit pages analytics data for a project, showing which pages users exit from most frequently. Supports filtering, sorting, and date range specification.
| Parameter | Type | Description |
|---|---|---|
project_id * | integer | The unique identifier of the project to retrieve exit pages data for. |
from | string | Start of the date range for the query in ISO 8601 datetime format. |
limit | integer | Maximum number of results to return in the response. |
order_by | string | Sort results by a metric in ascending or descending order using the format `metric:asc` or `metric:desc`. |
to | string | End of the date range for the query in ISO 8601 datetime format. |
where | string | Filter results using expressions that reference available dimensions and metrics to narrow down the data. |
get_exit_pages_chart Get Exit Pages Chart
Retrieve exit pages chart data for a project, showing which pages visitors exit from. Supports filtering, time-based aggregation, and customizable metrics selection.
| Parameter | Type | Description |
|---|---|---|
granularity * | string | Time granularity for aggregating chart data points. Choose from hourly, daily, weekly, or monthly intervals. |
project_id * | integer | The unique identifier of the project to retrieve exit pages data for. |
exit_pages_to_chart | string | Specify which exit page metrics to display on the chart as a comma-separated list. If not provided, defaults to the top 5 pages by visitor count. |
from | string | Start datetime for the data query range. Use ISO 8601 format. |
to | string | End datetime for the data query range. Use ISO 8601 format. |
where | string | Filter the data using expressions that reference available dimensions and metrics to narrow results. |
list_top_pages_by_pageviews List Top Pages by Page Views
Retrieve the top-performing pages for a project ranked by pageviews and other engagement metrics. Use filtering and date range parameters to analyze specific traffic patterns and time periods.
| Parameter | Type | Description |
|---|---|---|
project_id * | integer | The unique identifier for the project whose page analytics you want to retrieve. |
from | string | Start of the date range for the analytics query. Specify as an ISO 8601 formatted datetime. |
limit | integer | Maximum number of top pages to return in the results. Defaults to a system-defined limit if not specified. |
order_by | string | Sort results by a specific metric in ascending or descending order. Supported metrics include pageviews, visitors, session_bounce_rate, and avg_page_visit_duration_sec. Use the format metric:asc or me… |
to | string | End of the date range for the analytics query. Specify as an ISO 8601 formatted datetime. |
where | string | Apply filters to narrow results by dimensions and metrics. Specify filter conditions to focus on specific pages or traffic characteristics. |
get_top_pages_chart Get Top Pages Chart
Retrieve a chart of your top-performing pages with visitor metrics and engagement statistics, aggregated at your specified time granularity.
| Parameter | Type | Description |
|---|---|---|
granularity * | string | Time granularity for data aggregation: hourly, daily, weekly, or monthly. |
project_id * | integer | The numeric identifier of the project to retrieve analytics for. |
from | string | Start datetime for the data query range in ISO 8601 format. |
pages_to_chart | string | Comma-separated list of values to display on the chart. If not specified, defaults to the top 5 pages by visitor count. |
to | string | End datetime for the data query range in ISO 8601 format. |
where | string | Filter expression to narrow results by dimensions and metrics (e.g., country, device type, traffic source). |
list_web_analytics_by_city List Web Analytics by City
Retrieve web analytics metrics aggregated by city for a specified project. This endpoint is free to use and does not consume API units.
| Parameter | Type | Description |
|---|---|---|
project_id * | integer | The unique identifier of the project for which to retrieve city-level analytics data. |
from | string | Start of the date range for the analytics query in ISO 8601 datetime format. Data returned will be from this point forward. |
limit | integer | Maximum number of city results to return in the response. If not specified, a default limit applies. |
order_by | string | Sort results by a specific metric in ascending or descending order using the format `metric:asc` or `metric:desc`. |
to | string | End of the date range for the analytics query in ISO 8601 datetime format. Data returned will be up to this point. |
where | string | Filter results using expressions that reference available dimensions and metrics. Allows narrowing data to specific criteria. |
get_web_analytics_cities_chart Get Web Analytics Cities Chart
Retrieve cities chart data for web analytics showing visitor distribution across geographic locations. This endpoint is free to use and does not consume API units.
| Parameter | Type | Description |
|---|---|---|
granularity * | string | The time interval for data aggregation. Choose from hourly, daily, weekly, or monthly granularity to control the resolution of your chart data points. |
project_id * | integer | The unique identifier for the project whose analytics data you want to retrieve. |
cities_to_chart | string | Comma-separated list of specific cities to include in the chart. If not specified, the top 5 cities by visitor count are displayed by default. |
from | string | The start datetime for the data query range. Use ISO 8601 format to specify when the analytics period begins. |
to | string | The end datetime for the data query range. Use ISO 8601 format to specify when the analytics period ends. |
where | string | Optional filter expression to narrow results based on dimensions and metrics. Use this to segment data by specific criteria. |
list_continent_analytics List Continent Analytics
Retrieve web analytics metrics aggregated by continent for a specified project and time period. This endpoint is free to use and does not consume API units.
| Parameter | Type | Description |
|---|---|---|
project_id * | integer | The unique identifier for the project whose analytics data you want to retrieve. |
from | string | Start of the date range for the analytics query in ISO 8601 datetime format. |
limit | integer | Maximum number of continent records to return in the response. |
order_by | string | Sort results by a specific metric in ascending or descending order using the format `metric:asc` or `metric:desc`. |
to | string | End of the date range for the analytics query in ISO 8601 datetime format. |
where | string | Filter results using expressions that reference available dimensions and metrics to narrow down the data returned. |
get_continents_chart Get Continents Chart
Retrieve web analytics chart data aggregated by continent. This endpoint is free to use and does not consume API units.
| Parameter | Type | Description |
|---|---|---|
granularity * | string | The time interval for data aggregation. Choose from hourly, daily, weekly, or monthly granularity. |
project_id * | integer | The unique identifier for the project whose analytics data you want to retrieve. |
continents_to_chart | string | Comma-separated list of continents to include in the chart. If not specified, the top 5 continents by visitor count are displayed by default. |
from | string | Start of the date range for the query in ISO 8601 format. Data will be included from this datetime onwards. |
to | string | End of the date range for the query in ISO 8601 format. Data will be included up to this datetime. |
where | string | Filter expression to narrow results based on dimensions and metrics. Use standard filter syntax to refine the data. |
list_web_analytics_by_country List Web Analytics by Country
Retrieve web analytics metrics aggregated by country for a specified project and time period. Results can be filtered, sorted, and paginated to analyze geographic performance data.
| Parameter | Type | Description |
|---|---|---|
project_id * | integer | The unique identifier of the project for which to retrieve country-level web analytics data. |
from | string | Start datetime for the analytics query range in ISO 8601 format. Data will be included from this point forward. |
limit | integer | Maximum number of country records to return in the response. Use this to paginate through large result sets. |
order_by | string | Sort results by a specific metric in ascending or descending order using the format `metric:asc` or `metric:desc`. |
to | string | End datetime for the analytics query range in ISO 8601 format. Data will be included up to this point in time. |
where | string | Filter results using expressions that reference available dimensions and metrics. Enables targeted analysis of specific geographic or performance segments. |
get_countries_chart Get Countries Chart
Retrieve web analytics chart data aggregated by country with configurable time granularity and filtering. This endpoint is free and does not consume API units.
| Parameter | Type | Description |
|---|---|---|
granularity * | string | Time granularity for data points: hourly, daily, weekly, or monthly aggregation. |
project_id * | integer | The numeric identifier of the project to retrieve analytics for. |
countries_to_chart | string | Comma-separated list of countries to include in the chart. If not specified, defaults to the top 5 countries by visitor count. |
from | string | Start datetime for the query range in ISO 8601 format. If omitted, defaults to a standard lookback period. |
to | string | End datetime for the query range in ISO 8601 format. If omitted, defaults to the current time. |
where | string | Filter expression to narrow results by dimensions and metrics (e.g., visitor count thresholds, traffic source). |
list_language_analytics List Language Analytics
Retrieve browser language statistics for a project, showing how visitors are distributed across different language preferences. This endpoint is free to use and does not consume API units.
| Parameter | Type | Description |
|---|---|---|
project_id * | integer | The unique identifier of the project for which to retrieve language analytics data. |
from | string | Start of the date range for the analytics query in ISO 8601 datetime format. Data returned will be from this point forward. |
limit | integer | Maximum number of language records to return in the response. Useful for pagination or limiting result set size. |
order_by | string | Sort results by a specific metric in ascending or descending order using the format metric:asc or metric:desc. |
to | string | End of the date range for the analytics query in ISO 8601 datetime format. Data returned will be up to this point. |
where | string | Filter results using expressions that reference available dimensions and metrics to narrow down the dataset. |
get_language_analytics_chart Get Language Analytics Chart
Retrieve browser language distribution data for web analytics with support for time-series charting across different granularities. This endpoint is free to use and does not consume API units.
| Parameter | Type | Description |
|---|---|---|
granularity * | string | The time interval for aggregating data points in the chart. Choose from hourly, daily, weekly, or monthly granularity. |
project_id * | integer | The unique identifier for the project whose language analytics data should be retrieved. |
browser_language_to_chart | string | Comma-separated list of browser languages to include in the chart. If not specified, the top 5 languages by visitor count are displayed by default. |
from | string | Start datetime for the analytics query range in ISO 8601 format. If omitted, defaults to an appropriate historical starting point. |
to | string | End datetime for the analytics query range in ISO 8601 format. If omitted, defaults to the current time. |
where | string | Optional filter expression to narrow results based on dimensions and metrics available in the analytics dataset. |
list_browser_analytics List Browser Analytics
Retrieve browser analytics data for a project, including visitor counts, bounce rates, and session duration metrics. This endpoint is free and does not consume API units.
| Parameter | Type | Description |
|---|---|---|
project_id * | integer | The unique identifier of the project for which to retrieve browser analytics data. |
from | string | Start of the date range for the analytics query in ISO 8601 datetime format. |
limit | integer | Maximum number of results to return in the response. |
order_by | string | Sort results by a specific metric in ascending or descending order. Supported metrics include browser name, visitor count, session bounce rate, and average session duration in seconds. |
to | string | End of the date range for the analytics query in ISO 8601 datetime format. |
where | string | Filter results using expressions that reference dimensions (such as browser) and metrics (such as visitors or bounce rate). |
get_browser_chart Get Browser Chart
Retrieve browser usage chart data for a project, showing visitor distribution across different browsers over a specified time period with configurable granularity.
| Parameter | Type | Description |
|---|---|---|
granularity * | string | The time interval for aggregating data points in the chart. Choose from hourly, daily, weekly, or monthly granularity. |
project_id * | integer | The unique identifier of the project for which to retrieve browser analytics data. |
browser_to_chart | string | Comma-separated list of browsers to include in the chart. If not specified, the top 5 browsers by visitor count are displayed by default. |
from | string | Start datetime for the data query range. Use ISO 8601 format to define when the analytics period begins. |
to | string | End datetime for the data query range. Use ISO 8601 format to define when the analytics period ends. |
where | string | Filter expression to narrow results based on dimensions and metrics. Use this to segment data by specific criteria. |
list_browser_versions List Browser Versions
Retrieve browser version statistics and metrics for web analytics. This endpoint is free to use and does not consume API units.
| Parameter | Type | Description |
|---|---|---|
project_id * | integer | The unique identifier for the project whose browser version data you want to retrieve. |
from | string | Start of the date range for the query in ISO 8601 datetime format. Data returned will be from this point forward. |
limit | integer | Maximum number of results to return in the response. If not specified, a default limit applies. |
order_by | string | Sort results by a specific metric in ascending or descending order using the format `metric:asc` or `metric:desc`. |
to | string | End of the date range for the query in ISO 8601 datetime format. Data returned will be up to this point. |
where | string | Filter results using expressions that reference available dimensions and metrics. Allows you to narrow down the data returned. |
get_browser_versions_chart Get Browser Versions Chart
Retrieve a chart of browser version performance metrics including visitor counts and session statistics over a specified time period.
| Parameter | Type | Description |
|---|---|---|
granularity * | string | Time interval for chart data points. Choose from hourly, daily, weekly, or monthly granularity. |
project_id * | integer | The unique identifier of the project to retrieve analytics data for. |
browser_version_to_chart | string | Comma-separated list of browser versions to include in the chart. If not specified, defaults to the top 5 browser versions by visitor count. |
from | string | Start date and time for the data query in ISO 8601 format. If omitted, defaults to a standard lookback period. |
to | string | End date and time for the data query in ISO 8601 format. If omitted, defaults to the current time. |
where | string | Filter expression to narrow results by dimensions and metrics (e.g., country, device type, traffic source). |
list_device_analytics List Device Analytics
Retrieve device analytics data for a project, including metrics such as user counts, sessions, and engagement by device type. Results can be filtered, sorted, and scoped to a specific time range.
| Parameter | Type | Description |
|---|---|---|
project_id * | integer | The unique identifier of the project for which to retrieve device analytics. |
from | string | Start of the time range for the query in ISO 8601 datetime format (inclusive). |
limit | integer | Maximum number of results to return in the response. |
order_by | string | Sort results by a specific metric in ascending or descending order using the format `metric:asc` or `metric:desc`. |
to | string | End of the time range for the query in ISO 8601 datetime format (inclusive). |
where | string | Filter results using a filter expression that can reference available dimensions and metrics to narrow the dataset. |
get_devices_chart Get Devices Chart
Retrieve device analytics chart data showing visitor distribution across different devices over a specified time period. This endpoint is free and does not consume API units.
| Parameter | Type | Description |
|---|---|---|
granularity * | string | Time granularity for data aggregation. Choose from hourly, daily, weekly, or monthly intervals. |
project_id * | integer | The unique identifier of the project for which to retrieve device analytics. |
devices_to_chart | string | Comma-separated list of device values to include in the chart. If not specified, defaults to the top 5 devices by visitor count. |
from | string | Start datetime for the data query range. Use ISO 8601 format. |
to | string | End datetime for the data query range. Use ISO 8601 format. |
where | string | Filter expression to narrow results by dimensions and metrics (e.g., country, device type, visitor segment). |
list_operating_systems_analytics List Operating Systems Analytics
Retrieve analytics data for operating systems across your project. This endpoint provides insights into visitor behavior by operating system and is available at no cost.
| Parameter | Type | Description |
|---|---|---|
project_id * | integer | The unique identifier for the project whose operating system analytics you want to retrieve. |
from | string | Start of the date range for the analytics query in ISO 8601 datetime format. Data returned will include this date and time onward. |
limit | integer | Maximum number of results to return in the response. Useful for pagination and controlling response size. |
order_by | string | Sort results by a specific metric in ascending or descending order. Available metrics include visitors, session_bounce_rate, and avg_session_duration_sec. |
to | string | End of the date range for the analytics query in ISO 8601 datetime format. Data returned will include results up to this date and time. |
where | string | Filter results using expressions that reference dimensions and metrics. Allows you to narrow down data based on specific criteria. |
get_operating_systems_chart Get Operating Systems Chart
Retrieve operating systems chart data for web analytics across a specified time period and granularity. This endpoint is free to use and does not consume API units.
| Parameter | Type | Description |
|---|---|---|
granularity * | string | Time granularity for data points in the chart. Choose from hourly, daily, weekly, or monthly intervals. |
project_id * | integer | The unique identifier of the project for which to retrieve operating systems chart data. |
from | string | Start datetime for the data query range. Use ISO 8601 format. |
os_to_chart | string | Specify which operating systems to include in the chart as a comma-separated list. If not provided, defaults to the top 5 operating systems by visitor count. |
to | string | End datetime for the data query range. Use ISO 8601 format. |
where | string | Filter the data using expressions that reference available dimensions and metrics to narrow results to specific criteria. |
list_operating_system_versions List Operating System Versions
Retrieve operating system versions analytics data for a specified project, with optional filtering, sorting, and date range selection.
| Parameter | Type | Description |
|---|---|---|
project_id * | integer | The unique identifier of the project for which to retrieve operating system versions data. |
from | string | Start of the date range for the query in ISO 8601 datetime format. |
limit | integer | Maximum number of results to return in the response. |
order_by | string | Sort results by a metric in ascending or descending order using the format metric:asc or metric:desc. |
to | string | End of the date range for the query in ISO 8601 datetime format. |
where | string | Filter results using expressions that reference available dimensions and metrics to narrow the dataset. |
get_operating_system_versions_chart Get Operating System Versions Chart
Retrieve a time-series chart of visitor counts and engagement metrics broken down by operating system versions. Data can be filtered, aggregated at different time intervals, and limited to specific OS versions.
| Parameter | Type | Description |
|---|---|---|
granularity * | string | Time interval for aggregating data points in the chart. Choose from hourly, daily, weekly, or monthly granularity. |
project_id * | integer | Unique identifier of the project to retrieve analytics data for. |
from | string | Start datetime for the data query range in ISO 8601 format. |
os_versions_to_chart | string | Comma-separated list of operating system versions to include in the chart. If not specified, defaults to the top 5 versions by visitor count. |
to | string | End datetime for the data query range in ISO 8601 format. |
where | string | Filter expression to narrow results by dimensions and metrics (e.g., country, device type, engagement thresholds). |
get_search_performance_history Get Search Performance History
Retrieve Google Search Console performance metrics over a specified historical period, with options to filter by device type, search category, and time interval grouping.
| Parameter | Type | Description |
|---|---|---|
date_from * | string | The start date for the historical period in YYYY-MM-DD format. Required to define the beginning of the data range. |
date_to | string | The end date for the historical period in YYYY-MM-DD format. If not specified, defaults to the current date. |
device | string | Limit results to a specific device type: desktop, mobile, or tablet. |
history_grouping | string | Choose the time interval for grouping historical data: daily, weekly, or monthly. Defaults to monthly grouping. |
search_type | string | Specify the search result category to analyze: web, image, video, or news. Defaults to web search results. |
where | string | Filter results by specific fields using supported filter expressions to narrow down the performance data returned. |
list_keyword_position_history List Keyword Position History
Retrieve historical keyword position data for a project, aggregated into position ranges over a specified time period. Use this to analyze ranking trends and performance across different time intervals.
| Parameter | Type | Description |
|---|---|---|
date_from * | string | The start date for the historical period in YYYY-MM-DD format. Required to define the beginning of your analysis window. |
date_to | string | The end date for the historical period in YYYY-MM-DD format. If not specified, defaults to the current date. |
device | string | Limit results to a specific device type: desktop, mobile, or tablet. |
history_grouping | string | Set the time interval for grouping historical data: daily, weekly, or monthly. Defaults to monthly aggregation. |
search_type | string | Specify the type of search results to analyze: web, image, video, or news. Defaults to web search results. |
where | string | Filter conditions to narrow results by specific criteria such as keywords, URLs, or other query parameters. |
list_page_history_gsc List Page History (GSC)
Retrieve historical page performance metrics from Google Search Console, including impressions, clicks, and rankings over a specified time period.
| Parameter | Type | Description |
|---|---|---|
date_from * | string | The start date for the historical period in YYYY-MM-DD format. Required to define the beginning of the data range. |
date_to | string | The end date for the historical period in YYYY-MM-DD format. If not specified, defaults to the current date. |
device | string | Limit results to a specific device type: desktop, mobile, or tablet. |
history_grouping | string | Set the time interval for grouping historical data: daily, weekly, or monthly. Defaults to monthly grouping. |
search_type | string | Specify the search result category to analyze: web, image, video, or news. Defaults to web search results. |
where | string | Filter results by supported fields using query syntax to narrow down the page history data returned. |
list_device_performance List Device Performance
Retrieve Google Search Console performance metrics aggregated by device type (desktop, mobile, tablet) for a specified date range.
| Parameter | Type | Description |
|---|---|---|
date_from * | string | Start date for the performance data in YYYY-MM-DD format (e.g., 2024-01-01). This is the beginning of the historical period to analyze. |
date_to | string | End date for the performance data in YYYY-MM-DD format (e.g., 2024-01-31). If not provided, defaults to the current date. Must be on or after the start date. |
search_type | string | Filter results to a specific search type: web search, image search, video search, or news search. Defaults to web search if not specified. |
where | string | Optional filter expression to narrow results by supported fields (e.g., country, device, query). Use this to segment performance data further. |
list_gsc_metrics_by_country List GSC Metrics by Country
Retrieve Google Search Console metrics aggregated by country for a specified date range. This endpoint is free to use and does not consume API units.
| Parameter | Type | Description |
|---|---|---|
date_from * | string | The start date for the metrics period in YYYY-MM-DD format. Required to define the historical data range. |
date_to | string | The end date for the metrics period in YYYY-MM-DD format. If not specified, defaults to the current date. |
device | string | Filter metrics by device type: desktop, mobile, or tablet. |
history_grouping | string | Set the time interval for grouping historical data: daily, weekly, or monthly. Defaults to monthly aggregation. |
search_type | string | Specify the type of search results to include in metrics: web, image, video, or news. Defaults to web search. |
where | string | Filter results using supported field conditions to narrow down the metrics returned. |
list_ctr_by_position List CTR by Position
Retrieve click-through rate (CTR) metrics aggregated by search position for a specified date range. This endpoint is free to use and does not consume API units.
| Parameter | Type | Description |
|---|---|---|
date_from * | string | Start date for the historical period in YYYY-MM-DD format (required). |
date_to | string | End date for the historical period in YYYY-MM-DD format. If omitted, defaults to the start date. |
device | string | Filter results by device type: desktop, mobile, or tablet. If omitted, returns metrics across all device types. |
list_search_performance_by_position List Search Performance by Position
Retrieve search performance metrics aggregated by search result position. This endpoint provides free access to performance data without consuming API units.
| Parameter | Type | Description |
|---|---|---|
date_from * | string | The start date for the historical period you want to analyze, specified in YYYY-MM-DD format. This parameter is required. |
date_to | string | The end date for the historical period you want to analyze, specified in YYYY-MM-DD format. |
device | string | Filter results by device type: desktop, mobile, or tablet. |
search_type | string | Specify the type of search results to analyze: web, image, video, or news. Defaults to web search results. |
where | string | Filter results using supported field conditions to narrow down the performance data returned. |
list_keyword_history_gsc List Keyword History (GSC)
Retrieve historical Google Search Console keyword performance data with optional filtering by device type, country, and date range. Data can be grouped by daily, weekly, or monthly intervals.
| Parameter | Type | Description |
|---|---|---|
date_from * | string | Start date for the historical period in YYYY-MM-DD format (inclusive). Required to define the date range for keyword history retrieval. |
date_to | string | End date for the historical period in YYYY-MM-DD format (inclusive). |
device | string | Filter results by device type: desktop, mobile, or tablet. |
history_grouping | string | Group historical data by time interval: daily, weekly, or monthly. Defaults to monthly grouping. |
where | string | Filter results by supported fields using query syntax to narrow down keyword history data. |
list_gsc_keywords List GSC Keywords
Retrieve keywords from Google Search Console data for a specified date range. This operation is free and does not consume API units.
| Parameter | Type | Description |
|---|---|---|
date_from * | string | Start date for the historical data range in YYYY-MM-DD format. Required to define the beginning of the analysis period. |
date_to | string | End date for the historical data range in YYYY-MM-DD format. If not provided, defaults to the current date. |
device | string | Filter results by device type: desktop, mobile, or tablet. |
limit | integer | Maximum number of keyword results to return in the response. Defaults to 1000 if not specified. |
search_type | string | Type of search results to include: web, image, video, or news. Defaults to web if not specified. |
where | string | Filter keywords using a filter expression to narrow results by specific criteria. |
get_page_history Get Page History
Retrieve historical performance data for specified pages from Google Search Console, including metrics like clicks, impressions, and average position over a configurable time period.
| Parameter | Type | Description |
|---|---|---|
date_from * | string | Start date for the historical period in YYYY-MM-DD format. Required to define the beginning of the data range. |
date_to | string | End date for the historical period in YYYY-MM-DD format. If not specified, defaults to the current date. |
device | string | Filter results by device type: desktop, mobile, or tablet. If not specified, data for all device types is included. |
history_grouping | string | Time interval for grouping historical data points. Choose from daily, weekly, or monthly granularity. Defaults to monthly if not specified. |
pages | string | Comma-separated list of page URLs to retrieve history data for. If not specified, data for all pages is included. |
list_gsc_pages List GSC Pages
Retrieve page performance metrics from Google Search Console, including impressions, clicks, and rankings for specified date ranges and filters.
| Parameter | Type | Description |
|---|---|---|
date_from * | string | Start date for the historical data range in YYYY-MM-DD format; required to define the beginning of the analysis period. |
date_to | string | End date for the historical data range in YYYY-MM-DD format; if omitted, defaults to the current date. |
device | string | Filter results by device type: desktop, mobile, or tablet. |
limit | integer | Maximum number of results to return in the response; defaults to 1000 if not specified. |
search_type | string | Type of search results to include in the data; defaults to web search and supports web, image, video, and news results. |
where | string | Filter pages by supported field criteria using query syntax to narrow results to specific pages or patterns. |
list_anonymous_queries List Anonymous Queries
Retrieve anonymous search queries for a specific project and country. Returns query data filtered by date range with customizable columns, sorting, and filtering options.
| Parameter | Type | Description |
|---|---|---|
country * | string | Two-letter country code in ISO 3166-1 alpha-2 format (e.g., 'us', 'gb', 'de') to scope results to a specific country. |
date_from * | string | Start date for the historical data range in YYYY-MM-DD format. Results will include data from this date onward. |
project_id * | integer | Unique identifier of the project for which to retrieve anonymous queries. |
select * | string | Comma-separated list of column names to include in the response. Refer to the response schema for valid column identifiers. |
limit | integer | Maximum number of results to return in the response. Defaults to 1000 if not specified. |
order_by | string | Column name to sort results by. Refer to the response schema for valid column identifiers available for ordering. |
where | string | Filter expression to narrow results. Supports filtering by keyword (string) and url (string) columns using standard filter syntax. |