Skip to content
luis@data:~$

projects / google-trends-pytrends

Google Trends data with pytrends

A hands-on notebook that shows how to pull Google Trends data in Python with pytrends, method by method.

date
stack
Python, pytrends, pandas, Kaggle
notebook
www.kaggle.com/code/luisresendiz/get-google-trends-data-using-pytrends

A beginner-friendly walkthrough of pytrends, the unofficial Python wrapper for Google Trends, run end to end on Kaggle. It has been viewed almost 5,000 times.

What it covers

Installing the library, connecting to Google, building a payload, and then each API method in turn: interest over time, historical hourly interest, interest by region, related topics and queries, trending searches, real-time search trends, top charts, suggestions and categories.

Each method is shown with a working example, so you can copy the call you need and adapt it.