关于Twitter Search API中result_type参数的细节与差异问询
Twitter Search API: Clarifying the
result_type Parameter Great question—this is one of those API details where the official docs are a bit vague, so let's break down exactly how each result_type option works, especially the tricky recent and popular ones.
What Each Option Does
mixed: This is the default setting. It returns a blend of relevant, recent, and popular tweets matching your query, balancing recency and engagement signals.recent: As the name suggests, this prioritizes newest tweets first.- To answer your specific question: There's no hardcoded "X hours" limit documented. The Twitter Search API generally pulls tweets from the last 7 days, and
recentjust sorts those results strictly by post time (newest first) instead of factoring in engagement metrics. You won't get older tweets outside that 7-day window, but within it, recency is the top priority.
- To answer your specific question: There's no hardcoded "X hours" limit documented. The Twitter Search API generally pulls tweets from the last 7 days, and
popular: This focuses on tweets that Twitter's algorithm considers "popular."- About that retweet threshold: Twitter doesn't publish a specific number of retweets (or likes, impressions, etc.) that makes a tweet qualify as popular. The algorithm uses a mix of signals—how quickly the tweet is being shared, overall engagement rate, the account's reputation, and more. It's essentially the tweets that are gaining traction or trending for your query at the time of your request.
Quick Example Requests
To fetch only the latest tweets for your query:
GET /1.1/search/tweets.json?q=your_query&result_type=recent
To get the most engaging, popular tweets instead:
GET /1.1/search/tweets.json?q=your_query&result_type=popular
Key Context from Official Docs
The
result_typeparameter allows you to filter search results by category.popularreturns tweets that are most relevant to your query, whilerecentreturns the most recent tweets matching your query.mixedcombines both.
内容的提问来源于stack exchange,提问作者Michael
相关产品推荐
相关产品推荐

