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


Messages In This Thread
Pytrends related querie & suggestion limitations - by cmg15326 - May-02-2023, 03:47 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Suggestion on how to speed up this code? sawtooth500 1 372 May-04-2024, 07:13 PM
Last Post: sawtooth500
  Need some help with Pytrends cmg15326 4 1,504 May-01-2023, 05:41 AM
Last Post: cmg15326
  Can you give me some suggestion about PCEP Newbie1114 0 1,115 Oct-14-2021, 03:02 PM
Last Post: Newbie1114
  instagram followers name without suggestion for you jacklee26 1 3,286 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,991 Jan-10-2021, 11:39 PM
Last Post: Evalias123
  Fraction Calculation with Limitations TINMAN01 13 5,881 Dec-22-2020, 04:45 AM
Last Post: bowlofred
  Optimization suggestion Julia 2 1,845 Mar-29-2020, 12:02 PM
Last Post: Julia
  Need suggestion how to handle this error farrukh 1 2,390 Dec-21-2019, 03:21 PM
Last Post: DeaD_EyE
  switch limitations MuntyScruntfundle 3 2,493 Jan-27-2019, 06:11 PM
Last Post: aakashjha001
  pytrends problem Karen 10 11,039 Apr-14-2017, 12:55 PM
Last Post: Karen

Forum Jump:

User Panel Messages

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