query_ad_metrics but with built-in sort + limit semantics. Optimized for “show me top 10 campaigns by ROAS” style questions where you want a ranked list, not a flat aggregate.
When to use
- “Top 10 campaigns by ROAS last 7 days.”
- “Worst 5 adsets by CPA this month.”
- Any ranked list.
query_ad_metrics_compare), multi-attribution (query_attribution_models), or single-row aggregates (query_ad_metrics), use those tools instead.
Parameters
Accepts every parameterquery_ad_metrics does, plus:
Output
CSV by default. Same shape asquery_ad_metrics, with an added _rank column reflecting the requested ordering: