keywords | array of string or string | Yes | - | Keywords to get the SERP for. Accepts a list or a newline/comma-separated string. One Ahrefs request is made per keyword (minimum 50 API units each); rows carry a keyword column. |
country | string or SelectableOption | No | us | Two-letter country code of the Google SERP (e.g. us, gb, de). Defaults to us. |
serp_types | array of string or SelectableOption | No | - | Only return positions of these SERP result types, e.g. organic, paid_top, snippet, ai_overview, video, local_pack, question. Leave empty for all types. Available: organic, paid_top, paid_bottom, paid_right, paid_sitelink, sitelink, snippet, image, image_th, article, knowledge_card, knowledge_panel, local_pack, local_teaser, news, question, review, shopping, organic_shopping, tweet, spelling, video, video_th, discussion, ai_overview, ai_overview_sitelink, ai_overview_found. |
top_positions | integer | No | - | Only return the top N organic positions. Leave empty for the full top 100 SERP. |
metrics | array of string or SelectableOption | No | - | Columns to return (position and url are always included). Available: type, title, domain_rating, url_rating, ahrefs_rank, backlinks, refdomains, keywords, traffic, value (USD), top_keyword, top_keyword_volume, page_type, update_date. Ahrefs API unit cost per row: traffic, value and top_keyword_volume cost 10 units, refdomains 5, the rest 1. Defaults to type, title, domain_rating, url_rating, backlinks, refdomains, keywords, traffic. |