Is it possible to get numerical values from a Google trend plot in Python 3?

Keywords: python-3.x


I would like to get the numerical values from different queries once plotted Google trends using Python 3.

I am using three different queries (e.g. 'cat', 'dog', 'bird') and I would like to find similarity in their trends once plotted. I would prefer to not download the file from Google Trend.

totalTrend = TrendReq(hl='en', tz=360)

kw_list = ["cat", "dog", "bird"]  
_cat = 0
_geo = ''
_gprop = ''

# Build payload request to get data from Google trends
_timeframe = '2018-01-01 2019-06-03'

totalTrend.build_payload(kw_list, cat=_cat, timeframe=_timeframe, geo=_geo, gprop=_gprop)

totalTrend = totalTrend.interest_over_time()

# Print the maximum value

# print(kw_list[i], max(totalTrend[i]) for i in kw_list()) #, max(totalTrend[kw_list[1]]))

totalTrend.plot(title='Google Trends Monthly Data Points', figsize=(20,10))

What I would like to do is to extract numerical values corresponding to a specific date or range. For example, in corresponding of the peaks, I would like to find: x = 27th May and y = 89. Thank you for your time. I hope you can help me to better understand if it is possible or not to do something like this.