@@ -163,7 +163,7 @@ export const getAdwordsKeywordIdeas = async (credentials:AdwordsCredentials, adw
163
163
}
164
164
165
165
try {
166
- // API: https://developers.google.com/google-ads/api/rest/reference/rest/v16 /customers/generateKeywordIdeas
166
+ // API: https://developers.google.com/google-ads/api/rest/reference/rest/v18 /customers/generateKeywordIdeas
167
167
const customerID = account_id . replaceAll ( '-' , '' ) ;
168
168
const geoTargetConstants = countries [ country ] [ 3 ] ; // '2840';
169
169
const reqPayload : Record < string , any > = {
@@ -178,7 +178,7 @@ export const getAdwordsKeywordIdeas = async (credentials:AdwordsCredentials, adw
178
178
reqPayload . siteSeed = { site : domain } ;
179
179
}
180
180
181
- const resp = await fetch ( `https://googleads.googleapis.com/v16 /customers/${ customerID } :generateKeywordIdeas` , {
181
+ const resp = await fetch ( `https://googleads.googleapis.com/v18 /customers/${ customerID } :generateKeywordIdeas` , {
182
182
method : 'POST' ,
183
183
headers : {
184
184
'Content-Type' : 'application/json' ,
@@ -297,7 +297,7 @@ export const getKeywordsVolume = async (keywords: KeywordType[]): Promise<{error
297
297
for ( const country in keywordRequests ) {
298
298
if ( Object . hasOwn ( keywordRequests , country ) && keywordRequests [ country ] . length > 0 ) {
299
299
try {
300
- // API: https://developers.google.com/google-ads/api/rest/reference/rest/v16 /customers/generateKeywordHistoricalMetrics
300
+ // API: https://developers.google.com/google-ads/api/rest/reference/rest/v18 /customers/generateKeywordHistoricalMetrics
301
301
const customerID = account_id . replaceAll ( '-' , '' ) ;
302
302
const geoTargetConstants = countries [ country ] [ 3 ] ; // '2840';
303
303
const reqKeywords = keywordRequests [ country ] . map ( ( kw ) => kw . keyword ) ;
@@ -306,7 +306,7 @@ export const getKeywordsVolume = async (keywords: KeywordType[]): Promise<{error
306
306
geoTargetConstants : `geoTargetConstants/${ geoTargetConstants } ` ,
307
307
// language: `languageConstants/${language}`,
308
308
} ;
309
- const resp = await fetch ( `https://googleads.googleapis.com/v16 /customers/${ customerID } :generateKeywordHistoricalMetrics` , {
309
+ const resp = await fetch ( `https://googleads.googleapis.com/v18 /customers/${ customerID } :generateKeywordHistoricalMetrics` , {
310
310
method : 'POST' ,
311
311
headers : {
312
312
'Content-Type' : 'application/json' ,
0 commit comments