Hey Brad, I was able to set the HistoricalMetricsOptions like this (in Python):
keyword_plan_service = client.get_service("KeywordPlanService") metric_request = client.get_type("GenerateHistoricalMetricsRequest") resource_name = keyword_plan_service.keyword_plan_path(customer_id, keyword_plan_id) metric_request.keyword_plan=resource_name metric_request.historical_metrics_options.year_month_range.start.year=2019 metric_request.historical_metrics_options.year_month_range.start.month= client.get_type("MonthOfYearEnum").MonthOfYear.JANUARY metric_request.historical_metrics_options.year_month_range.end.year=2021 metric_request.historical_metrics_options.year_month_range.end.month= client.get_type("MonthOfYearEnum").MonthOfYear.MAY response = keyword_plan_service.generate_historical_metrics(metric_request) On Monday, June 21, 2021 at 3:37:40 PM UTC-7 Brad Wilcox wrote: > I am trying to define the YearMonth settings in the > HistoricalMetricsOptions from this documentation: > https://developers.google.com/google-ads/api/rest/reference/rest/v8/HistoricalMetricsOptions > I haven't been able to figure out how to use and haven't seen any example > pieces of code. Can anyone help me with understanding how this object can > be set? > -- Privileged/Confidential Information may be contained in this message. If you are not the addressee indicated in this message (or responsible for delivery of the message to such person), you may not copy or deliver this message to anyone. In such case, you should destroy this message and kindly notify the sender by reply email. Please advise immediately if you or your employer does not consent to email for messages of this kind. Opinions, conclusions and other information in this message that do not relate to the official business of Group M Worldwide LLC and/or other members of the GroupM group of companies shall be understood as neither given nor endorsed by it. GroupM is the global media investment management arm of WPP. For more information on our business ethical standards and Corporate Responsibility policies please refer to WPP's website at http://www.wpp.com/WPP/About/ <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.wpp.com_WPP_About_&d=DwMFaQ&c=N-xPqDyeLJg5V3gLll2thA&r=aMkvY63z6j7EsF4XIb9BQM9Vg_NPq0Tyq_c4qEjSGuI&m=KGmvFRgWqLXTGN-0TqwJrXtnIjxRssANR2E_1vsPHZg&s=CtJil6FZbGrYDvuuovO87MZKGQbQYXhR41-kweAs1C0&e=> -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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 adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@googlegroups.com 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 "AdWords API and Google Ads API Forum" group. To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/07c304c0-64f8-44c8-a9b3-902e6ae4cb11n%40googlegroups.com.