You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the header is set to false for KEYWORD_VOLUME_SEMRUSH and the return is "ERROR 50" then the function returns "#REF!". Appears there needs to be a check for ERROR 50, then ignore the header setting.
The text was updated successfully, but these errors were encountered:
Thanks for catching that, will add the fix into the newer version of the script. For now, please change your KEYWORD_VOLUME_SEMRUSH function code to the following:
/**
Returns Keyword Volume from semrush
@param {"apartments"} query REQUIRED The keyword you want information for. Example: "brown shoes".
@param {true} excludeHeaders OPTIONAL true to EXCLUDE column headers or false to include. Default is false.
@param {"us"} db OPTIONAL The country database you want to search from, default is "us"
function KEYWORD_VOLUME_SEMRUSH(query,excludeHeaders,db) {
if (!query) return "Error: Missing query"
var db = db || SemrushGlobal.data.DEFAULT_DB
SemrushGlobal.methods.giveApiRest()
if (!checkAccount()) return SemrushGlobal.data.ERROR_MESSAGE
try {
var result = UrlFetchApp.fetch(SemrushGlobal.queries.keywordVolume + SemrushGlobal.data.API_KEY+"&export_columns=Ph,Nq,Cp,Co,Nr&phrase="+query+"&database="+db).getContentText()
if (result.indexOf("ERROR") > -1) throw "ERROR 50 :: NOTHING FOUND"
return parseApiResponse(result,excludeHeaders)
} catch (e) {
return e
}
}
If the header is set to false for KEYWORD_VOLUME_SEMRUSH and the return is "ERROR 50" then the function returns "#REF!". Appears there needs to be a check for ERROR 50, then ignore the header setting.
The text was updated successfully, but these errors were encountered: