GenerateKeywordForecastMetricsRequest - raise INVALID_ARGUMENT

90 views
Skip to first unread message

Nadav Amami

unread,
Jun 15, 2023, 10:39:52 AM6/15/23
to Google Ads API and AdWords API Forum
Hi,

I am trying to execute generate_keyword_forecast_metrics from python, and i keep getting 
INVALID_ARGUMENT but with no meaningful data, i have checked the request attributes and it seems ok, please find bellow the request:
customer_id: "<customer_id>"
forecast_period {
  start_date: "2023-06-15"
  end_date: "2023-07-15"
}
campaign {
  keyword_plan_network: GOOGLE_SEARCH
  bidding_strategy {
    manual_cpc_bidding_strategy {
      max_cpc_bid_micros: 10000000
    }
  }
  ad_groups {
    biddable_keywords {
      keyword {
        text: "hotel"
        match_type: EXACT
      }
    }
    biddable_keywords {
      keyword {
        text: "restaurant"
        match_type: EXACT
      }
    }
  }


the error i am seeing is :
Host: googleads.googleapis.com, Method: /google.ads.googleads.v14.services.KeywordPlanIdeaService/GenerateKeywordForecastMetrics, RequestId: lOBRmnwt80w6Zi4-z7RScg, IsFault: True, FaultMessage: The input has an invalid value.
(<_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:172.217.22.106:443 {created_time:"2023-06-15T17:37:14.924307+03: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:172.217.22.106:443 {created_time:"2023-06-15T17:37:14.924307+03: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."
}

Am i missing something?
Thanks,
Nadav

Google Ads API Forum Advisor

unread,
Jun 20, 2023, 10:38:25 AM6/20/23
to na...@simpool.io, adwor...@googlegroups.com

Hi Nadav,

Thank you for reaching out to us.

Upon checking the logs you have provided, I can see that you are using the same day start date, please note that the start date must be in the future and the end date must be within 1 year from today. You may check this reference (https://developers.google.com/google-ads/api/reference/rpc/v14/GenerateKeywordForecastMetricsRequest#forecast_period) for more information. That being said, I would suggest you to change your start date to future date.

Let me know if you have further questions.

 
This message is in relation to case "ref:_00D1U1174p._5004Q2mU9yK:ref"

Thanks,
 
Google Logo Google Ads API Team


Reply all
Reply to author
Forward
0 new messages