target | string | Yes | - | The domain, subdomain, subfolder or URL to get history for (e.g. example.com). url_rating needs a page URL. |
mode | string or SelectableOption | No | subdomains | How to interpret the target: ‘subdomains’ (domain and all subdomains, default), ‘domain’ (the exact host only), ‘prefix’ (every URL starting with the target), or ‘exact’ (the exact URL only). Ignored for domain_rating and url_rating. |
metric_group | string or SelectableOption | No | traffic_and_cost | Which history to return: ‘traffic_and_cost’ (org_traffic, org_cost, paid_traffic, paid_cost; 10 units per metric per row), ‘keywords_by_position’ (ranking keywords in top3, top4_10, top11_20, top21_50, top51_plus), ‘referring_domains’ (5 units per row), ‘domain_rating’, ‘url_rating’, ‘pages’ (ranking pages), or ‘total_search_volume’ (10 units per row). |
country | string or SelectableOption | No | - | Two-letter country code to restrict to one country. Leave empty for all countries. Applies to traffic_and_cost, keywords_by_position, pages and total_search_volume. |
date_from | string | Yes | - | Start of the period in YYYY-MM-DD format. |
date_to | string | No | - | End of the period in YYYY-MM-DD format. Defaults to today. |
grouping | string or SelectableOption | No | monthly | Time interval of the data points: ‘monthly’ (default), ‘weekly’ or ‘daily’. Every data point is a billed row. |
page_positions | string or SelectableOption | No | top100 | For metric_group ‘pages’: count pages ranking in the ‘top100’ (default) or only the ‘top10’. |
top_positions | string or SelectableOption | No | top_10 | For metric_group ‘total_search_volume’: sum the volume of keywords the target ranks for in the ‘top_10’ (default) or ‘top_100’. |