When are the historical metrics available?

333 views
Skip to first unread message

Markus Heiden

unread,
May 3, 2023, 7:37:42 AM5/3/23
to Google Ads API and AdWords API Forum
Hi,

I am using KeywordPlanIdeaService.generateKeywordIdeas(). If I set the date range for the historical metrics (today: 3rd of May 2023) to the last month (start and end: April 2023) I get an INVALID_VALUE:

Request
-------
MethodName: google.ads.googleads.v13.services.KeywordPlanIdeaService/GenerateKeywordIdeas
Endpoint: googleads.googleapis.com:443
Headers: {developer-token=REDACTED, login-customer-id=REDACTED, x-goog-api-client=gl-java/20.0.1 gccl/25.0.0 gapic/25.0.0 gax/2.25.0 grpc/1.54.0 pb/3.21.12}
Body: customer_id: "REDACTED"
keyword_and_url_seed {
  url: "REDACTED"
  keywords: "adidas"
}
keyword_plan_network: GOOGLE_SEARCH
language: "languageConstants/1001"
historical_metrics_options {
  year_month_range {
    start {
      year: 2023
      month: APRIL
    }
    end {
      year: 2023
      month: APRIL
    }
  }
  include_average_cpc: true
}


Response
--------
Headers: Metadata(content-type=application/grpc,request-id=0AoWTLfIy_hX3ZdVM-zSWw,date=Wed, 03 May 2023 10:34:28 GMT,alt-svc=h3=":443"; ma=2592000,h3-29=":443"; ma=2592000)
Body: null
Failure message: errors {
  error_code {
    keyword_plan_idea_error: INVALID_VALUE
  }
  message: "The input has an invalid value."
}
request_id: "0AoWTLfIy_hX3ZdVM-zSWw"

Status: Status{code=INVALID_ARGUMENT, description=Request contains an invalid argument., cause=null}.

When are the historical data safely available?

Best regards,
Markus

Google Ads API Forum Advisor

unread,
May 3, 2023, 1:19:50 PM5/3/23
to markus...@adsoul.com, adwor...@googlegroups.com

Hi Markus,

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

Kindly note that the INVALID_VALUE (https://developers.google.com/google-ads/api/reference/rpc/v11/KeywordPlanIdeaErrorEnum.KeywordPlanIdeaError#invalid_value) error indicates that the field's value is invalid. I've tried your request by using "APRIL" and was able to encounter the error. However, I've also checked in the keyword planner in the UI that the month for April or May of the same year is disabled and cannot be selected. Kindly note that the API mirrors the reports/data of the Google Ads UI. With that, kindly update your request and set the historical_metrics_options to "March" or 2 months prior to the current month to generate keyword ideas.

Regards,

Google Logo Google Ads API Team


ref:_00D1U1174p._5004Q2l9nS5:ref

Markus Heiden

unread,
May 4, 2023, 2:55:28 PM5/4/23
to Google Ads API and AdWords API Forum
Hi,

I am aware of the fact that the data is not available yet. 
But is there any documentation on when the data will be available exactly? 
Or an API that provides that information?
Otherwise programmatic access would be a bit unreliable.

Best regards,
Markus

Google Ads API Forum Advisor

unread,
May 5, 2023, 3:33:15 AM5/5/23
to markus...@adsoul.com, adwor...@googlegroups.com
Hi Markus,

Thank you for returning to our team.

Regarding your concern, we really understand your situation. However, as mentioned, please note that the Google Ads API mirrors the Google Ads UI data. Meaning, the API should be able to retrieve or manage the data visible in the Google Ads UI. Note that using the KeywordPlanIdeaService, you can search for new keywords that are relevant to your Google Search campaign, or find historical metrics on keywords. You may check this Keyword Ideas (https://developers.google.com/google-ads/api/docs/keyword-planning/generate-keyword-ideas) document for more information about this in Google Ads API. Also, note that if this is not yet available in the UI then it is also highly not available in the Google Ads API.

If you happen to need Google Ads UI perspective about this matter, then you may reach out to the Google Ads Product support team (https://support.google.com/google-ads/gethelp) and ask for their insights about this matter.

Markus Heiden

unread,
May 5, 2023, 9:59:22 AM5/5/23
to Google Ads API and AdWords API Forum
Hi,

thanks for your explanation. I already read that, but I did not find what I was searching for:

If there is no API call for retrieving that information (as you pointed out), it would have been nice, if at least the day-in-month would be documented from that the data is guaranteed to be available.

For now, I will evaluate that heuristically when this day may be.

Thanks,
Markus

Google Ads API Forum Advisor

unread,
May 5, 2023, 10:59:10 AM5/5/23
to markus...@adsoul.com, adwor...@googlegroups.com

Hi Markus, 

Thank you for coming back to us and for sharing your insights. I hope you are doing well today.

If you have further clarifications or assistance on this matter, feel free to contact us again. But please note that, if you have other issues or concerns we recommend creating a new email thread for better tracking and updates.

I would also suggest keeping an eye on our blog post or release notes for the updates. 

Reference links:


Have a great day.

Regards,

Reply all
Reply to author
Forward
0 new messages