Python Forum
Pytrends related querie & suggestion limitations
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Pytrends related querie & suggestion limitations
#1
Hey! So I learned that Pytrends has its limits regarding keywords that you can search and filter for. I also learned that you can bypass that with multi thread and combining the results.

It also appears that the limit for "top" and "rising" related queries is 25 and for suggestions it's 5? I wonder if there is a way to get more out of a request, similar to the multi thread solution for keywords, when using a filter.

That's the script I'm using:

from pytrends.request import TrendReq

pytrends = TrendReq()

# Set search parameters
keyword = 'baby'
category = 18 # Shopping category

# Get related queries and suggestions
pytrends.build_payload(kw_list=[keyword], cat=category)
related_queries = pytrends.related_queries()
suggestions = pytrends.suggestions(keyword)

# Extract top and rising related queries
top_related = related_queries[keyword]['top']
rising_related = related_queries[keyword]['rising']

# Print top related queries
print("Top related queries for", keyword, "in shopping category:")
for query in top_related['query']:
    print(query)

# Print rising related queries
print("\nRising related queries for", keyword, "in shopping category:")
for query in rising_related['query']:
    print(query)

# Print keyword suggestions
print("\nKeyword suggestions for", keyword + ":")
for suggestion in suggestions:
    print(suggestion['title'])
As always thanks for your time, help and maybe even your answer!

With kind regards
Chris
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Need some help with Pytrends cmg15326 4 1,321 May-01-2023, 05:41 AM
Last Post: cmg15326
  Can you give me some suggestion about PCEP Newbie1114 0 1,029 Oct-14-2021, 03:02 PM
Last Post: Newbie1114
  instagram followers name without suggestion for you jacklee26 1 3,172 Oct-02-2021, 04:57 AM
Last Post: ndc85430
  Although this is a talib related Q it's mostly related to python module installing.. Evalias123 4 5,704 Jan-10-2021, 11:39 PM
Last Post: Evalias123
  Fraction Calculation with Limitations TINMAN01 13 5,427 Dec-22-2020, 04:45 AM
Last Post: bowlofred
  Optimization suggestion Julia 2 1,738 Mar-29-2020, 12:02 PM
Last Post: Julia
  Need suggestion how to handle this error farrukh 1 2,271 Dec-21-2019, 03:21 PM
Last Post: DeaD_EyE
  first try with python class, suggestion for improvement please anna 18 5,954 Nov-01-2019, 11:16 AM
Last Post: anna
  switch limitations MuntyScruntfundle 3 2,389 Jan-27-2019, 06:11 PM
Last Post: aakashjha001
  [split] suggestion required for new script anna 1 2,979 Mar-27-2018, 06:42 PM
Last Post: nilamo

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020