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