Hello Qaiser,
Assuming that you are using the
Google Ads API. If yes, you can order the result in the descending order for the impressions and put a limit of 10 on the query so that it will only return the top 10 keywords with highest impressions. Below is the query share for your reference.
Query for Google Ads API below:
"SELECT
campaign.id, "
+ "
campaign.name, "
+ "
ad_group.id, "
+ "
ad_group.name, "
+ "ad_group_criterion.criterion_id, "
+ "ad_group_criterion.keyword.text, "
+ "ad_group_criterion.keyword.match_type, "
+ "metrics.impressions, "
+ "metrics.clicks, "
+ "metrics.cost_micros "
+ "FROM keyword_view "
// Limits to the 10 keywords with the most impressions in the date range.
+ "ORDER BY metrics.impressions DESC "
+ "LIMIT 10";
If you are facing any issues please share the query you are performing so that I can take a look.
If you are using the AdWords API and facing this error, it is not possible to order by impressions in the AdWords API, you can try to apply more filters in the where clause to narrow down your results. If the issue persists please share the entire error log and the report definition you are trying along with the CID. You could use reply privately to the author option while sharing the information requested.
Regards,
Sai Teja, AdWords API Team