generateKeywordHistoricalMetrics Not returning aggregateMetricResults

81 views
Skip to first unread message

teambs

unread,
May 4, 2023, 6:01:45 AM5/4/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 aggregateMetricResults

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"}}]}

Google Ads API Forum Advisor

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

Hello,

Thank you for reaching out to Google Ads API Forum.

It appears that this concern has already been raised to us with the subject: “generateKeywordHistoricalMetrics not returning aggregateMetricTypes”. Please note that we have already replied to that thread. That said, we would recommend continuing our discussion there for better tracking of issues. Hoping for your kind understanding of this.

Regards,

Google Logo Google Ads API Team


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