target | string | Yes | - | The domain or URL to find organic search competitors for (e.g. example.com). Use mode ‘exact’ with a page URL to get competing pages (competitor_url) instead of competing domains. |
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). |
country | string or SelectableOption | No | us | Two-letter country code (e.g. us, gb, de). Required by Ahrefs for this report; defaults to us. |
date | string | No | - | Report date in YYYY-MM-DD format. Defaults to today (latest data). |
date_compared | string | No | - | Optional earlier date in YYYY-MM-DD format to compare against; enables the *_prev and *_diff metrics. |
metrics | array of string or SelectableOption | No | - | Metrics to return. Available: competitor_domain, competitor_url (pages mode), domain_rating, keywords_common, keywords_competitor, keywords_target, share, pages, pages_prev, pages_diff, traffic, traffic_prev, traffic_diff, value (USD), value_prev, value_diff. Ahrefs API unit cost per row: traffic, traffic_prev, value and value_prev cost 10 units, the rest 1. Defaults to competitor_domain, domain_rating, keywords_common, keywords_competitor, keywords_target, share, pages, traffic, value. |
filters | array of FilterItem | No | - | Filters on the available metrics, e.g. keywords_common GREATER_THAN 100 or domain_rating GREATER_THAN 40. Filter fields count towards the unit cost per row. |
orders | array of OrderItem | No | - | Sort by one or more metrics. |
limit | integer | No | 100 | Maximum number of rows to return. Defaults to 100. Your Ahrefs plan caps rows per request (Lite 100, Standard 250, Advanced 500). |