Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Can I get 1 row per day while filtering by campaign name in Google Ads API?

16 views
Skip to first unread message

Andjela Trickovic

unread,
Apr 17, 2025, 4:21:55 AMApr 17
to Google Ads API and AdWords API Forum
Hi everyone,

I'm using the Google Ads API v15 with the googleAds:searchStream endpoint, and I need to retrieve daily campaign performance data. I am using API connector in Google Sheets.

 I am trying to:

1. Filter out campaigns where the name includes “brand awareness”.
2. Aggregate data by day (one row per day).
3. Include metrics such as clicks, impressions, cost, conversions, etc.

However, I am encountering an issue where the API returns multiple rows per day, one for each campaign. This happens even though I don’t include campaign.name in the SELECT clause - because I am filtering by campaign.name in the WHERE clause.

My current query:

{
  "query": "SELECT segments.date, segments.day_of_week, metrics.clicks, metrics.impressions, metrics.average_cpc, metrics.cost_micros, metrics.conversions, metrics.cost_per_conversion, metrics.conversions_value_by_conversion_date FROM campaign WHERE campaign.name NOT LIKE '%brand awareness%' AND segments.date DURING LAST_30_DAYS"
}

 I need to aggregate the results so that I only receive one row per day (total for all non-brand-awareness campaigns).

My Questions:
  1. Is it possible to use the Google Ads API to aggregate data to one row per day while filtering out specific campaigns (like "brand awareness")?

  2. Is there a way to filter by campaign name but avoid the campaign-level granularity in the returned data?

  3.   If not, what is the recommended way to handle this type of aggregation?

  Thank you!

Google Ads API Forum Advisor

unread,
Apr 17, 2025, 10:00:54 AMApr 17
to and...@ascendancydigital.com, adwor...@googlegroups.com
Hi,

Thank you for reaching out to the Google Ads API support team.

I request you please use the given GAQL query to aggregate the campaign data and also I would like to inform you that it is not possible to get the data as a single row via the Google Ads API. Kindly refer to the below given GAQL query to get the aggregate of the campaign data:
{
  "query": "SELECT campaign.name, campaign.id, metrics.clicks, 
metrics.impressions, metrics.average_cpc, 
metrics.cost_micros, metrics.conversions, 
metrics.conversions_value_by_conversion_date, 
metrics.cost_per_conversion FROM campaign WHERE campaign.name NOT LIKE '%brand awareness%'",
  "searchSettings": {
    "returnSummaryRow": true
  }
}
If you still need any further assistance, I request you kindly share the uncropped UI screenshot by highlighting the campaigns data that you would like to retrieve via the Google Ads API.

Also, I could see that you are still using the 'v15' of the Google Ads API which is already deprecated. I would recommend migrating to the latest version v19, please follow this guide to upgrade to the latest version. Please note that we are unable to reproduce any response with the request that you have provided.

You can send the details via Reply privately to the author option, or direct private reply to this email.
 

Thanks,
 
Google Logo Google Ads API Team

Feedback
How was our support today?

rating1    rating2    rating3    rating4    rating5
[2025-04-17 13:59:46Z GMT] This message is in relation to case "ref:!00D1U01174p.!500Ht01pTDDZ:ref" (ADR-00300270)



Reply all
Reply to author
Forward
0 new messages