Hello everyone,

I'm using the generateKeywordHistoricalMetrics method from the 
KeywordPlanIdeaServiceClient in the Google Ads API v21 to retrieve 
historical keyword metrics.

I've encountered an issue where requests for an older month (e.g., June 
2025) succeed, while requests for a more recent month (July 2025) are 
failing. I'm hoping to get some help and clarification from the community.

Context & Environment:

API Version: v21

Service: KeywordPlanIdeaServiceClient

Method: generateKeywordHistoricalMetrics

Current Date: August 23, 2025

Successful Request Parameters (for June 2025):

code

JSON

{

  "customer_id": "[My Customer ID]",

  "keywords": "silk pillowcase",

  "historical_metrics_options": {

    "year_month_range": {

      "start": {

        "year": 2025,

        "month": "JUNE"

      },

      "end": {

        "year": 2025,

        "month": "JUNE"

      }

    }

  },

  "geo_target_constants": "geoTargetConstants/2840",

  "keyword_plan_network": "GOOGLE_SEARCH"

}

Failing Request Parameters (for July 2025):

code

JSON

{

  "customer_id": "[My Customer ID]",

  "keywords": "silk pillowcase",

  "historical_metrics_options": {

    "year_month_range": {

      "start": {

        "year": 2025,

        "month": "JULY"

      },

      "end": {

        "year": 2025,

        "month": "JULY"

      }

    }

  },

  "geo_target_constants": "geoTargetConstants/2840",

  "keyword_plan_network": "GOOGLE_SEARCH"

}


Error Message:

Request ID reqeust-id failed due to GoogleAdsException. Underlying errors:

  Error 0: error_code {

  keyword_plan_idea_error: INVALID_VALUE

}

message: "The input has an invalid value."



My Analysis & Hypothesis:

My main observation is that the only variable between the successful and 
failing requests is the year_month_range.

Given that the current date is August 23rd, my hypothesis is that this 
failure is caused by the historical metrics data for July not being fully 
processed or available to the API yet. In other words, I suspect this is a 
data latency issue.

My Questions:

Is my hypothesis correct? Is there any official documentation regarding the 
data latency for historical metrics? (e.g., after which day of the month is 
the previous month's data considered stable and available?)

What is the community's best practice for this? Is there a recommended 
"safe" waiting period before querying the most recent full month's data?

If data latency is not the cause, what other potential issues could lead to 
this behavior based on the information provided?

Thank you in advance for any help or insights

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/adwords-api/b4661897-4c2a-4807-8981-bd288e9af041n%40googlegroups.com.
  • Qu... Chuankun Liang
    • ... 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum

Reply via email to