KeywordPlanIdeaService GenerateKeywordHistoricalMetrics not working

135 views
Skip to first unread message

Ofir Chityat

unread,
Mar 30, 2022, 12:49:06 PM3/30/22
to Google Ads API and AdWords API Forum
Hi
I am trying to use the KeywordPlanIdeaService
https://developers.google.com/google-ads/api/reference/rpc/v10/KeywordPlanIdeaService
And use the GenerateKeywordHistoricalMetrics function but I get the following errors:
  1. ValueError: Specified type 'GenerateKeywordHistoricalMetricsRequest' does not exist in Google Ads API v10
  2. AttributeError: 'KeywordPlanIdeaServiceClient' object has no attribute 'generate_keyword_historical_metrics
This is my code:
client = GoogleAdsClient.load_from_dict(credentials, version='v10')
keyword_plan_idea_service = client.get_service("KeywordPlanIdeaService")
request = client.get_type("GenerateKeywordHistoricalMetricsRequest")
request.customer_id = 'xxxxxxxxxxx'
request.keywords.extend(['nurse jobs'])

keyword_ideas = keyword_plan_idea_service.generate_keyword_historical_metrics(
request=request
)
Any ideas what is wrong?

Евгений Калейчик

unread,
Apr 7, 2022, 12:57:37 PM4/7/22
to Google Ads API and AdWords API Forum
That method was erroneously published in the reference docs and is not available yet. Docs have been updated

среда, 30 марта 2022 г. в 19:49:06 UTC+3, of...@ziprecruiter.com:

Google Ads API Forum Advisor

unread,
Apr 7, 2022, 4:48:48 PM4/7/22
to kaleych...@gmail.com, adwor...@googlegroups.com
Hi everyone,

The REST implementation works, for correct calls through a client library you may reach out the issue tracker of the client library you are using.

Regards,

Google Logo
Aryeh
Google Ads API Team
 


 

ref:_00D1U1174p._5004Q2ZKq5O:ref

Евгений Калейчик

unread,
Apr 7, 2022, 6:07:30 PM4/7/22
to Google Ads API and AdWords API Forum
The link does not containt information about GenerateKeywordHistoricalMetrics

четверг, 7 апреля 2022 г. в 23:48:48 UTC+3, adsapi:

Google Ads API Forum Advisor

unread,
Apr 7, 2022, 11:37:42 PM4/7/22
to kaleych...@gmail.com, adwor...@googlegroups.com

Hi,
 

Thanks for your response, I am also a member of the Google Ads API team and let me provide support to your concern.
 

Moving forward to your concern, can you check this one if this is what you are looking for about GenerateKeywordHistoricalMetrics. I refer you to this guide as well as this documentation for the API GenerateHistoricalMetrics for more information on this.
 

You can also find here the REST API documentation of the said feature.
 

If you are encountering errors, could you provide the complete API logs (request and response with request-id)?
 

You can provide it via Reply privately to author option. If this option is not available, then send it instead on this email address googleadsa...@google.com.


Regards,

Google Logo
Darwin
Google Ads API Team
 


ref:_00D1U1174p._5004Q2ZKq5O:ref

Евгений Калейчик

unread,
Apr 12, 2022, 10:35:29 AM4/12/22
to Google Ads API and AdWords API Forum
i want replace adwords targeting service with STATS type (https://developers.google.com/adwords/api/docs/reference/v201809/TargetingIdeaService.TargetingIdeaSelector). GenerateHistoricalMetrics should contain keyword_plan. i want get metrics (cpc,volume and etc.) without pass keyword_plan to request

пятница, 8 апреля 2022 г. в 06:37:42 UTC+3, adsapi:

Google Ads API Forum Advisor

unread,
Apr 13, 2022, 12:35:26 AM4/13/22
to kaleych...@gmail.com, adwor...@googlegroups.com
Hi,

Thank you for raising your concern to our team.

Unfortunately, utilizing of the keyword plan to generate historical metrics is required in the Google Ads API so you will need to pass it in the API request. Please see this document to know more information about generating historical metrics in Google Ads API.

Let me know if you have further questions.

Regards,
Google Logo
Ernie John
Google Ads API Team
 


ref:_00D1U1174p._5004Q2ZKq5O:ref
Reply all
Reply to author
Forward
0 new messages