Curl command to pull mentioned dimensions and metrics

43 views
Skip to first unread message

gadsm wiley

unread,
Jun 24, 2022, 9:19:48 AM6/24/22
to Google Ads API and AdWords API Forum
Hi Team,
I am building a pipeline to pull data from Google ads to our environment with rest call. I am able to fetch few metrics and dimensions using campaign table and Keyword_view but not able to pull other. Please provide some inputs to proceed.


Data
Ad group
Day
Account
Campaign
Campaign state
Campaign type
Clicks
Conversion action
Conversions
Cost
Cost / conv.
Device
Impr. (Abs. Top) %
Impr. (Top) %
Impressions
View-through conv.

Thanks
Saurav

Google Ads API Forum Advisor

unread,
Jun 24, 2022, 10:35:52 AM6/24/22
to gadsmwi...@gmail.com, adwor...@googlegroups.com
Hello,

Thanks for reaching out. Can you please clarify your request? For which resource would you like to retrieve the listed attributes and metrics?

Thanks,

Google Logo
Matt
Google Ads API Team
 


ref:_00D1U1174p._5004Q2cCaxv:ref

gadsm wiley

unread,
Jun 24, 2022, 2:05:34 PM6/24/22
to Google Ads API and AdWords API Forum
Hello Team,
I have a request where i am building a pipeline to pull data from Google Ads to our local environment. In body section i need to pass the dimension an metrics for which data needs to be pulled. In Google Ads docs i found we need to pass it in form of query. So when i am trying to add metrics it is throwing error as incorrect attribute. So please guide to build the query to pull information of above kpis.

Sample query which i found in docs. Any Sample document to connect to KPIs will help.

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
WHERE
segments.date DURING LAST_7_DAYS
AND campaign.advertising_channel_type = 'SEARCH'
AND ad_group.status = 'ENABLED'
AND ad_group_criterion.status IN ('ENABLED', 'PAUSED')
ORDER BY metrics.impressions DESC

Thanks
Saurav

Google Ads API Forum Advisor

unread,
Jun 26, 2022, 11:05:56 PM6/26/22
to gadsmwi...@gmail.com, adwor...@googlegroups.com

Hi Saurav,


Thank you for getting back to us. I work with Matt and allow me to assist you here.
 

Upon checking your concern, you said that you encountered an error when you tried to add metrics and the error you are getting is an incorrect attribute.
 

However, so our team further investigates your concern, could you please provide the complete API log (request and response with request-id)? So we could have a closer look at your concern and give you guidance about the error you encountered.
 

You can provide it via Reply privately to the author option. If this option is not available, then send it instead on this email address googleadsa...@google.com.


Regards,

Google Logo
Darwin
Google Ads API Team
 


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