DataSiteMetricsHistoriesFetch

⌘K

Use this endpoint to get daily or monthly metric histories for a single site. Histories can be returned as absolute values, or relative +/- deltas.

JSON-RPC Method:

data.site.metrics.histories.fetch
Go to Example Code

Request

site_query

object

A SiteQuery provides a target URL along with a scope to define how the query is parsed.

get_daily_history_deltas_for

array

Optional array of values for which to get daily history deltas. Valid values are all non-deleted link count metrics from the site_metrics object in Fetch Site Metrics (pages_to_page, etc), page_authority, and domain_authority. At least one value must be provided between get_daily_history_deltas_for, get_daily_history_values_for, get_monthly_history_deltas_for, and get_monthly_history_values_for.

get_daily_history_values_for

array

Optional array of values for which to get daily history values. Valid values are all non-deleted link count metrics from the site_metrics object in Fetch Site Metrics (pages_to_page, etc), page_authority, domain_authority, nofollow_pages_to_root_domain_by_spam_score, nofollow_root_domains_to_root_domain_by_root_domains, nofollow_root_domains_to_root_domain_by_spam_score, pages_to_root_domain_by_spam_score, root_domains_to_root_domain_by_root_domains, root_domains_to_root_domain_by_spam_score. At least one value must be provided between get_daily_history_deltas_for, get_daily_history_values_for, get_monthly_history_deltas_for, and get_monthly_history_values_for.

get_monthly_history_deltas_for

array

Optional array of values for which to get monthly history deltas. Valid values are all non-deleted link count metrics from the site_metrics object in Fetch Site Metrics (pages_to_page, etc), page_authority, and domain_authority. At least one value must be provided between get_daily_history_deltas_for, get_daily_history_values_for, get_monthly_history_deltas_for, and get_monthly_history_values_for.

get_monthly_history_values_for

array

Optional array of values for which to get monthly history values. Valid values are all non-deleted link count metrics from the site_metrics object in Fetch Site Metrics (pages_to_page, etc), page_authority, domain_authority, nofollow_pages_to_root_domain_by_spam_score, nofollow_root_domains_to_root_domain_by_root_domains, nofollow_root_domains_to_root_domain_by_spam_score, pages_to_root_domain_by_spam_score, root_domains_to_root_domain_by_root_domains, root_domains_to_root_domain_by_spam_score. At least one value must be provided between get_daily_history_deltas_for, get_daily_history_values_for, get_monthly_history_deltas_for, and get_monthly_history_values_for.

1{
2  "site_query": {
3    "query": "https://moz.com",
4    "scope": "domain"
5  },
6  "get_monthly_history_deltas_for": [
7    "page_authority",
8    "domain_authority"
9  ]
10}

Response

site_query

object

Represents a parsed site query.

site_metrics_histories

object

Represents a Site Metrics Histories object.


Example Code

Quota Usage

Uses 1 row of quota for every root-level item in result.site_metrics_histories.daily_history_values, 1 row of quota for every root-level item in result.site_metrics_histories.daily_history_deltas, 1 row of quota for every root-level item in result.site_metrics_histories.monthly_history_values, and 1 row of quota for every root-level item in result.site_metrics_histories.monthly_history_deltas (i.e. total quota used is the sum of the length of each of these 4 arrays in the response).

api.limits.data.rows