generateKeywordHistoricalMetrics not returning aggregateMetricTypes

108 views
Skip to first unread message

teambs

unread,
May 2, 2023, 1:40:00 PM5/2/23
to Google Ads API and AdWords API Forum
For the end point https://googleads.googleapis.com/v13/customers/${customerclientid}:generateKeywordHistoricalMetrics

we are seeing only results object in response, we are not getting 
aggregateMetricResults for devices

As aggregateMetricTypess is mentioned it should return
Are there any restrictions?
can we get devices data for 5,000 keywords at a time,  or only one keyword at a time?


let link=`https://googleads.googleapis.com/v13/customers/${customerclientid}:generateKeywordHistoricalMetrics`;
const fetchresult=await fetch(link,{
method: 'POST',
body:JSON.stringify({
// "keywords": keywordstobeplanned,
"keywords": ["sharad pawar"],
// "includeAdultKeywords": true,
"geoTargetConstants": [
"geoTargetConstants/2356","geoTargetConstants/2826","geoTargetConstants/2036"
],
"keywordPlanNetwork": 'GOOGLE_SEARCH',
"aggregateMetrics":
{
"aggregateMetricTypes":["DEVICE"]
},
"language": "languageConstants/1000"
}),
headers:{
"Content-Type": 'application/json',
"Authorization": `Bearer ${access_token}`,
"developer-token": `xxxxxxxxxxxxxxxxx`,
"login-customer-id": customerid
}
});

var finalresult=await fetchresult.json();

Response {"results":[{"text":"sharad pawar","keywordMetrics":{"competition":"LOW","monthlySearchVolumes":[{"month":"APRIL","year":"2022","monthlySearches":"201000"},{"month":"MAY","year":"2022","monthlySearches":"135000"},{"month":"JUNE","year":"2022","monthlySearches":"550000"},{"month":"JULY","year":"2022","monthlySearches":"246000"},{"month":"AUGUST","year":"2022","monthlySearches":"110000"},{"month":"SEPTEMBER","year":"2022","monthlySearches":"110000"},{"month":"OCTOBER","year":"2022","monthlySearches":"135000"},{"month":"NOVEMBER","year":"2022","monthlySearches":"135000"},{"month":"DECEMBER","year":"2022","monthlySearches":"301000"},{"month":"JANUARY","year":"2023","monthlySearches":"301000"},{"month":"FEBRUARY","year":"2023","monthlySearches":"246000"},{"month":"MARCH","year":"2023","monthlySearches":"246000"}],"avgMonthlySearches":"246000","competitionIndex":"0"}}]}

teambs

unread,
May 3, 2023, 8:33:22 AM5/3/23
to Google Ads API and AdWords API Forum
Hi Any update?

Google Ads API Forum Advisor

unread,
May 4, 2023, 11:45:43 AM5/4/23
to saranyap...@gmail.com, adwor...@googlegroups.com

Hi,

Thanks for reaching out to Google Ads API Support.

With regards to your concern, as per our KeywordPlanAggregateMetrics documentation the enum “Device” specified in aggregateMetricTypes field would return the device breakdown of aggregate search volume. 

With that being said, for us to address your question, please note that in Google Ads API perspective, we need the complete logs to be able to see if there’s an error thrown on your side and further investigate. With that being said, can you provide the complete request and response logs with request ID generated as shown in the respective links? 

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.

Links included in this email:


Regards,

Google Logo Google Ads API Team


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