How to get data from google trends?

Here you can find an easy way to get google trends data and bring it to your code.

I am going to try to get the trends about Data Science

Code sample

from pytrends.request import TrendReq
import plotly.express as px
pytrends = TrendReq(hl='en-US', tz=360)
pytrends.build_payload(kw_list=['data science'])
df = pytrends.interest_over_time()
display(df.sample(5))
px.line(df['data science'])

Leave a Reply