Google Trends is an excellent tool for marketing purposes. It shows how frequently a specific search term is entered into Google’s search engine over a period of time. Also, it allows you to monitor and analyze both your company and competitors.
As PEMAVOR, we also frequently used Google Trends data in past projects. But there is one big challenge that affects the efficiency, which is limited keywords analysis. In Google, you can analyze five keywords to have a transparent and scalable solution.
However, Google Trends Chart Creator ends this problem by producing embeddable HTML Code. You can easily add fancy search trends visualizations to your website. First, in our opinion, it was the best way to show the search trend data. But we need to agree that Year to Date and Previous Period perspectives might not be familiar right away to everybody. Finally, we decided to show you how you can combine Google Trends Data with fancy visuals
E-Car Search Trends (Germany)
Change over weeks
No official Google Trends API — PyTrends to the rescue
Big keyword lists don't have an option for manually fetching the Google Trends data. There is no official API for it, but luckily Python has a super effective solution called PyTrends. This module makes browser requests to the Google Trends website and parses the results. There are different API methods that return other data that you know from the Web UI. There are several API models, but for our application, our choice is “Interest over Time” which returns indexed search volume over time for each keyword.
How to get Google Trends data for more than 5 keywords
Google shows indexed search data and no absolute numbers. As a result, looping over a big keyword list and having a clear outcome isn't possible. It sounds like a deadlock, but we have an excellent solution to get comparable search trends data across bigger keyword lists! Always keep one keyword static and request with four changing keywords from your big list. By doing this, we can calculate a global search index based on our fixed baseline keyword.
Python Microservice for the data processing — JavaScript for the data visualization
Playing around with Trends data is a lot of fun, and running a local script is not always the way to go. For that reason, we put everything related to the data fetching and processing in one Python Microservice published to Google Cloud Functions.
So far, we haven't had any blocking issues due to too many requests. So, we don’t need to use proxy servers. The Python Service is called with the keyword list you want Trends data for and parameters like “Country” and “Time Period”. The response is a JSON object, and you can easily visualize the chart with some JavaScript.