Hi Matt,

I've tried retrieving the historical values from both "KeywordPlanService" 
and "KeywordPlanIdeaService" leading to the same result (cpc values seem to 
always be the same no matter the period requested).

I am sharing here the example for "KeywordPlanService" only, as the 
requests sent and responses returned seem to be the same (in case I am 
wrong, I can share another example using the "KeywordPlanIdeaService").

As seen in the responses, the returned monthly_search_volumes do refer to 
the requested period, but competition metrics such as 
low_top_of_page_bid_micros and high_top_of_page_bid_micros always stay the 
same.

Though I am still not certain this isn't due to the keywords mantaining the 
same cpc values throughout the entire year, I've tested a dozen keywords 
and observed they all return unchanging competition metrics.

Is this because competition metrics are always aggregated to the last 12 
months? I couldn't find an explicit indication about this in the 
documentation.

Thanks,
Martino

*Code:*
```
from google.ads.googleads.client import GoogleAdsClient

def test(client, customer_id, keyword_plan_id):
    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=2021
    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.FEBRUARY
    response = 
keyword_plan_service.generate_historical_metrics(metric_request)
    print(response)

client = GoogleAdsClient.load_from_storage('./google-ads.yaml', version
="v10")
test(client, CUSTOMER_ID, KEYWORD_PLAN_ID)
```

*Responses:*
*- *2021 JAN to 2021 FEB returns:
*```*
metrics {
  keyword_metrics {
    competition: MEDIUM
    monthly_search_volumes {
      month: JANUARY
      year: 2021
      monthly_searches: 18100
    }
    monthly_search_volumes {
      month: FEBRUARY
      year: 2021
      monthly_searches: 18100
    }
    avg_monthly_searches: 33100
    competition_index: 55
    low_top_of_page_bid_micros: 713887
    high_top_of_page_bid_micros: 3617029
  }
  search_query: "cheap cruise"
}
```

2022 JAN to 2022 FEB returns:
```
metrics {
  keyword_metrics {
    competition: MEDIUM
    monthly_search_volumes {
      month: JANUARY
      year: 2022
      monthly_searches: 33100
    }
    monthly_search_volumes {
      month: FEBRUARY
      year: 2022
      monthly_searches: 40500
    }
    avg_monthly_searches: 33100
    competition_index: 55
    low_top_of_page_bid_micros: 713887
    high_top_of_page_bid_micros: 3617029
  }
  search_query: "cheap cruise"
}
```
Il giorno giovedì 28 aprile 2022 alle 15:55:28 UTC+2 adsapi ha scritto:

> Hi Martino,
>
> Thanks for reaching out. I understand that you are finding that setting 
> the year_month_range does have an impact on page bids. Can you please 
> privately provide us with the complete request and response logs so that we 
> can confirm?
>
> Thanks,
> Matt
> Google Ads API Team
>
> [image: Google Logo] 
> Matt 
> Google Ads API Team 
>   
>
> ref:_00D1U1174p._5004Q2aO3QK:ref
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 on the web visit 
https://groups.google.com/d/msgid/adwords-api/ec4e02da-85b6-4569-a27b-41975c6837ebn%40googlegroups.com.
  • Re... Martino Anzi
    • ... 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum
      • ... Martino Anzi
        • ... 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum

Reply via email to