Menu

pytrends trending_searches() returns 404: how to get Google trending searches in Python (2026)
πŸ“°

pytrends trending_searches() returns 404: how to get Google trending searches in Python (2026)

DEV Community: pythonΒ·LogicBase SystemsΒ·about 6 hours ago
#p8h8oiqJ
#devtopython#devto#dev#trending#google
Long article (1758 words) β€” no AI summary yet.
Reading 0:00
15s threshold

Disclosure: I built the Apify Actor in the last section, so I'm biased. Apify links here are referral links. The free fix below doesn't need it.

You want today's trending searches for a country, so you reach for the pytrends call every old tutorial uses:

from pytrends . request import TrendReq

pytrends = TrendReq ( hl = "en-US" , tz = 0 ) pytrends . trending_searches ( pn = "united_states" )

Enter fullscreen mode

Exit fullscreen mode

And it fails:

pytrends.exceptions.ResponseError: The request failed: Google returned a response with code 404

Enter fullscreen mode

Exit fullscreen mode

realtime_trending_searches(pn="US") and today_searches(pn="US") fail with the same 404. I ran all three with pytrends 4.9.2 (the latest release) on 20 November 2026.

Why it's a 404 and not a 429

A 429 means Google is rate-limiting you, and waiting or slowing down helps. (I covered that one in pytrends 429 TooManyRequestsError: why it happens and 3 ways to fix it .)

A 404 means the address no longer exists.…

Continue reading β€” create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.