Not able to find attribute for cost

34 views
Skip to first unread message

gadsm wiley

unread,
Jun 27, 2022, 2:59:58 AM6/27/22
to Google Ads API and AdWords API Forum
Hi Team,
I am trying to build a pipeline to pull data from Google Ads. The attributes i need to pull are 
Campaign, Adgroup, Cost, Clicks and Impression. I am able to build the query for all fields except Cost. Please help me in adding Cost (i.e Sum of Spend ) attribute.

Please find the query that i am using.
SELECT ad_group.NAME,
       segments.day_of_week,
       ad_group.campaign,
       campaign.NAME,
       campaign.status,
       metrics.clicks,
       metrics.impressions,
FROM   keyword_view
WHERE  segments.date ='yyyy-MM-dd'
AND campaign.advertising_channel_type = 'SEARCH'
AND ad_group.status = 'ENABLED'
AND ad_group_criterion.status IN ('ENABLED', 'PAUSED')

Thanks
Saurav

Google Ads API Forum Advisor

unread,
Jun 27, 2022, 6:55:29 AM6/27/22
to gadsmwi...@gmail.com, adwor...@googlegroups.com
Hi Saurav,

Thank you for reaching out to the Google Ads Forum.

With regard to your concern,  I can refer you using keyword_view reports and include the metrics.cost_micros to get the information that you are looking for.

Best regards,
Google Logo
Jinky
Google Ads API Team
 


ref:_00D1U1174p._5004Q2cDRBN:ref

gadsm wiley

unread,
Jun 27, 2022, 7:22:26 AM6/27/22
to Google Ads API and AdWords API Forum

Hi Team,
Cost_micros is the correct attribute for cost as the description for  cost_micros is The sum of your cost-per-click (CPC) and cost-per-thousand impressions (CPM) costs during this period.

The Cost i am looking for is sum of Spend during this period.

Thanks
Saurav

Google Ads API Forum Advisor

unread,
Jun 27, 2022, 9:07:46 AM6/27/22
to gadsmwi...@gmail.com, adwor...@googlegroups.com

Hi Saurav,

Thanks for getting back to us.

Could you please provide us with a screenshot of the whole Ads UI where we can see the sum of Spend during this period in the Ads UI via reply privately to author option? This so that our team can accurately verify, and provide specific recommendations.

Regards,

Google Logo
Yasar
Google Ads API Team
 


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