Leaving pytrends is a field map, not a rewrite of the research question. TrendReq plus build_payload plus a method name becomes one JSON object on POST https://api.trendsapi.ai/api. body in the envelope is a JSON string and must be parsed a second time. The pytrends README lists the old methods. The new names live on the API reference. Google web interest still uses source google search. Property notes: the Google Trends guide. Plan text: pricing.

interest_over_time maps to get_time_series

pytrends Trends API
interest_over_time() mode get_time_series, source google search
trending_searches(pn=...) mode get_top_trends, type Google Trends
realtime_trending_searches(pn=...) same live board, not a second mode
gprop='youtube' source youtube on a new POST
gprop='images' source google images
gprop='news' source google news
gprop='froogle' source google shopping

interest_by_region, related_topics, and related_queries have no one-to-one field. Do not invent them on the inner payload.

trending_searches maps to type Google Trends

POST https://api.trendsapi.ai/api
Authorization: Bearer <api_key>
Content-Type: application/json

{"mode":"get_top_trends","type":"Google Trends","limit":25}

No keyword. pn='united_states' does not exist on this call. Category boards use type Google Trends by Category plus a category string. That is a different feed, not a geo argument on the first feed.

timeframe strings versus percent_growth presets

today 5-y, today 3-m, and now 7-d are Google explore strings. They do not travel. get_growth takes presets such as 3M, 12M, 1Y, YTD. get_time_series returns the full stored series for custom math. Pick get_growth when the notebook was only subtracting the first point from the last.

Delete TrendReq from the import list

A cutover is finished when from pytrends.request import TrendReq is gone. Shadows that still call interest_over_time for "just one geo" keep the 429 surface. The product MCP server at https://api.trendsapi.ai/mcp uses the same mode names if the next consumer is an agent instead of a notebook.