How to get the "Served Cost" for a campaign for a specific date?

107 views
Skip to first unread message

Chris Sun

unread,
Jan 4, 2023, 7:28:35 PM1/4/23
to Google Ads API and AdWords API Forum
Hello,

In this webpage, there's a section that shows how to view a "Billed Cost" report.
That report includes a "Served Cost" value for a campaign for a given date range.

Using the Google Ads API, how can I get the "Served Cost" for a campaign?

I have tried querying for the metrics.cost_micros (query shown below), but that value is slightly lower than what the report shows.
My query:
SELECT campaign.name, metrics.cost_micros
FROM campaign
WHERE segments.date >= '2023-01-02' AND
segments.date < '2023-01-03' AND
campaign.name = 'my_campaign_name'

Also, I set the summary_row_setting to be the SUMMARY_ROW_WITH_RESULTS enum value.

Any feedback is appreciated.

Google Ads API Forum Advisor

unread,
Jan 5, 2023, 12:38:25 AM1/5/23
to chri...@gmail.com, adwor...@googlegroups.com

Hi Chris, 

Thanks for reaching out to the Google Ads API Forum. I hope you are doing well today.

With regard to your concern, “Using the Google Ads API, how can I get the "Served Cost" for a campaign?”, the campaign report and metrics.cost_micros field is correct for the query provided. 

However, could you confirm if you are using date filters with the same filters in UI and API? If you still get an issue after following the steps, for our team to further compare, investigate, and validate why you are encountering discrepancies between the UI and the API, could you please provide us the whole UI screenshot where you can see the expected data you want to retrieve?

You may then send the requested information via the Reply privately to the author option. If this option is not available, you may send the details directly to our googleadsa...@google.com alias instead.

Regards,

Google Logo
Marjorie
Google Ads API Team
 


ref:_00D1U1174p._5004Q2hZoaz:ref
Reply all
Reply to author
Forward
0 new messages