Keyword Planner Suddenly Throws Error

103 views
Skip to first unread message

Matt Dworkin

unread,
Aug 1, 2024, 4:40:26 PM8/1/24
to Google Ads API and AdWords API Forum
Hello,


We've been using keyword planner via for a while, and today it randomly stopped working for our employees. Our look back date was 2024-07 (start) - 2024-08 (end). If we expand the look back to a few months ago, it seems to work. 

We get the following error: Failure: {"errors":[{"errorCode":{"keywordPlanIdeaError":"INVALID_VALUE"},"message":"The input has an invalid value."}],"requestId":"1NsCjUiyBp4xdm0NRG3iTg"}

I think this has happened around the first of the month before. Is there a reason why we would suddenly get this error at the start of a month? 

Thanks,
Matt

Google Ads API Forum Advisor

unread,
Aug 1, 2024, 6:42:23 PM8/1/24
to mdwor...@gmail.com, adwor...@googlegroups.com
Hi,

Thank you for reaching out to the Google Ads API support team.

Based on the provided information, I understand that you are getting an INVALID_VALUE error while using the KeywordPlanIdeaService via the Google Ads API. The invalid value error indicates that the field's value is invalid. I would recommend following the prerequisites in the document for generating keyword ideas for a campaign with KeywordPlanIdeaService.GenerateKeywordIdeas.

If you have followed all the prerequisites and are still facing the issue, please provide us with the complete API logs (request and response with request-id and request header) and uncropped UI screenshots to further investigate this issue.

If you are using a client library and haven't enabled the logging yet, I would request you to enable logging for the specific client library that you are using. You can refer to the guides Java, .NetPHPPythonRuby or Perl to enable logging at your end. For REST interface requests, you can enable logging via the curl command by using the -i flag.
 
This message is in relation to case "ref:!00D1U01174p.!5004Q02vEQ5U:ref" (ADR-00260556)

Thanks,

 
Google Logo Google Ads API Team

Register for the upcoming workshop: Performance Max and the Google Ads API!
 


Panu Kuuluvainen

unread,
Sep 30, 2024, 7:00:05 PM9/30/24
to Google Ads API and AdWords API Forum
Hi 

I have the same issue, getting INVALID VALUE in code that worked before.

campaign_to_forecast
PyDev console: starting.
language_constants: "languageConstants/1011"
geo_modifiers {
  geo_target_constant: "geoTargetConstants/2246"
}
keyword_plan_network: GOOGLE_SEARCH
bidding_strategy {
  manual_cpc_bidding_strategy {
    max_cpc_bid_micros: 1000000
  }
}
conversion_rate: 0.05
ad_groups {
  biddable_keywords {
    keyword {
      match_type: EXACT
      text: "matkailuauto"
    }
    max_cpc_bid_micros: 1000000
  }
  biddable_keywords {
    keyword {
      match_type: EXACT
      text: "matkailuvaunu"
    }
    max_cpc_bid_micros: 1000000
  }
}

google.ads.googleads.errors.GoogleAdsException: (<_InactiveRpcError of RPC that terminated with:
status = StatusCode.INVALID_ARGUMENT
details = "Request contains an invalid argument."
debug_error_string = "UNKNOWN:Error received from peer ipv4:216.58.204.74:443 {created_time:"2024-09-30T22:59:39.4979135+00:00", grpc_status:3, grpc_message:"Request contains an invalid argument."}"
>, <_InactiveRpcError of RPC that terminated with:
status = StatusCode.INVALID_ARGUMENT
details = "Request contains an invalid argument."
debug_error_string = "UNKNOWN:Error received from peer ipv4:216.58.204.74:443 {created_time:"2024-09-30T22:59:39.4979135+00:00", grpc_status:3, grpc_message:"Request contains an invalid argument."}"
>, errors {
  error_code {
    keyword_plan_idea_error: INVALID_VALUE

  }
  message: "The input has an invalid value."
}
request_id: "kXF2LvFLx-DestEStBHpCw"
, 'kXF2LvFLx-DestEStBHpCw')

Doesn't give any indication of which value is invalid.

Panu Kuuluvainen

unread,
Sep 30, 2024, 7:02:51 PM9/30/24
to Google Ads API and AdWords API Forum
Period

request.forecast_period.start_date
PyDev console: starting.
'2024-10-02'
request.forecast_period.end_date
'2024-10-31'


Throws that error. 

If I use a slightly different timeframe like

request.forecast_period.start_date
'2024-10-21'
request.forecast_period.end_date
'2024-11-20'

it works. 

Google Ads API Forum Advisor

unread,
Oct 1, 2024, 8:42:05 AM10/1/24
to panu.kuu...@gmail.com, adwor...@googlegroups.com
Panu:

I don't know to what this refers. We have resolved the issue for this case.

Please, open a new case with your details.
 
This message is in relation to case "ref:!00D1U01174p.!5004Q02vEQ5U:ref" (ADR-00260556)

Thanks,
 
Google Logo
Bob Hancock
Google Ads API Team


Matt Dworkin

unread,
Oct 1, 2024, 10:11:53 AM10/1/24
to Google Ads API and AdWords API Forum
Hey Panu,


You're likely getting the error because keyword data for your date range doesn't exist yet. That was the problem for me.

Best,
Matt

Panu Kuuluvainen

unread,
Oct 1, 2024, 10:31:49 AM10/1/24
to Google Ads API and AdWords API Forum
Hi Matt

Thanks for your response. Not sure why keyword data for the date range I was trying wouldn't exist yet but you are probably right about the cause.

So weirdly

  • yesterday dates  '2024-10-02' to   '2024-10-31' resulted in an error
  • if I pushed the forecasting period to  '2024-10-21' to  '2024-11-20' it worked. 
Today both date ranges seem to work. 

Just quite annoying that the API does not respond with a sensible error code, and instead just give the   INVALID_VALUE   without indicating where the issue is.

I resolved this by catching the  INVALID_VALUE  , shifting the date range by 15 days forward, and trying again. Seems to do the trick. 

to @Bob Hancock this obviously referes to the issue the OP posted which was similar to the one I posted in my OP. If you want to add something to your backlog, add proper error messages if the date values are "invalid". 

best
Panu
Reply all
Reply to author
Forward
0 new messages