Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to set the sub category of search term Google Trends – Pytrends

I am trying to fetch the results of Google Trends using Pytrends pytrends1.interest_over_time() there are terms that sometimes correspond to a regular search term vs a specific category like Peaky Blinders (as search term vs British Drama Series), where I would want to fetch the results for British Drama Series. I have observed the URL patterns as well and when toggling between generic search to a sub category it becomes encoded like:

regular search term:
https://trends.google.com/trends/explore?q=peaky%20blinders&geo=IN

British TV Show:
https://trends.google.com/trends/explore?geo=IN&q=%2Fm%2F0ql2gt3

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

How do I pass in the Pytrends API call that I want for British Drama Series?

enter image description here

>Solution :

From the pytrends documentation, there’s a section that talks about "advanced keywords" which seems to be what you want. There’s also some information about extracting the correct category for your search term, though it looks like you’ll need to do that in a separate script before you can add the category to your main program.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading