每天都有成千上万的开发者向Twitter的API提出请求。为了帮助管理这些请求的庞大数量,对可以提出的请求的数量进行了限制。这些限制有助于我们提供可靠和可扩展的API,而这正是我们的开发者社区所依赖的。
允许的最大请求数是基于一个时间间隔,一些指定的时期或时间窗口。最常见的请求限制时间间隔是15分钟。如果一个端点的速率限制是900个请求/15分钟,那么在任何15分钟的间隔内最多允许900个请求。
速率限制是根据你所使用的认证方法而应用的。例如,如果你使用的是OAuth 1.0a User Context,你将对每组用户的访问令牌在每个时间段有一个限制,而如果你使用的是OAuth 2.0 Bearer Token,你将对你的应用程序的请求在每个时间段有一个单独的限制。当超过这些限制时,会返回一个错误。继续阅读以了解更多关于这些细节和如何避免被限制速率的提示。

下表列出了Twitter API v2的速率限制。这些速率限制也记录在每个端点的API参考页面上,也显示在开发者门户的产品部分。

Resource Endpoint Requests per 15-minute window unless otherwise stated
Per App Per user
Tweets Tweet lookup 300 900

Manage Tweets

– Post a Tweet
– Delete a Tweet

 

 

200

50

Timelines
– User Tweet timeline
– User mention timeline
– Reverse chronological home timeline


1500
450

 


900
180
180
Search Tweets
– Recent search
– Full-archive search

450
300

Full-archive also has a 1 request / 1 second limit

180
Tweet counts
– Recent Tweet counts
– Full-archive Tweet counts

300
300
 
Filtered stream
– Connecting
– Adding/deleting filters



– Listing filters

50
Essential access – 25
Elevated access – 50
Academic Research access – 100
Enterprise access – 450
450
 

Volume streams

– Sampled stream

 

50

 
Retweets lookup 75 75
Quote Tweets lookup 75 75
Manage Retweets **
– Retweet a Tweet
– Undo a Retweet

50
50


Bookmarks lookup 180  
Manage Bookmarks 
– Bookmark a Tweet
– Undo a Bookmarks

50
50


Likes lookup
– Tweets liked by a user
– Users who have liked a Tweet

75
75

75
75
Manage Tweets **
– Create a Tweet
– Delete a Tweet a Tweet
 
200
50
Manage Likes **
– Like a Tweet
– Unlike a Tweet
 
50
50
Hide replies 50  
Users User lookup
– Authenticated user lookup
300
900
75
Follows lookup 15 15
Manage follows **
– Follow a user
– Unfollow a user
 
50
50
Blocks lookup   15
Manage blocks
– Block a user
– Unblock a user
 
50
50
Mutes lookup   15
Manage mutes
– Mute a user
– Unmute a user
 
50
50
Lists Manage Lists
– Create a List
– Delete a List
– Update a List
 
300
300
300
List lookup
– Get List by ID
– Get user-owned Lists

75
15

75
15
List Tweets lookup 900 900
List members
– Add a member
– Remove a member
– Get List members
– Get user’s List memberships



900
75

300
300
900
75
List follows
– Follow a List
– Unfollow a List
– Get List followers
– Get user’s followed Lists



180
15

50
50
180
15
Manage pinned Lists
– Pin a List
– Unpin a List
– Get user’s pinned Lists
 
50
50
15
Spaces Spaces lookup 300  
Search Spaces 300  
Compliance Batch compliance
– Create a job
– Get jobs
– Get job by ID

150
150
150
 

推文上限

推文上限取决于您的访问级别:

Essential access 500k Tweets per month, 50 Tweets/second
Elevated access 2 million Tweets per month, 50 Tweets/second
Elevated+ access More details coming soon. Sign up for our waitlist
Academic Research access 10 million Tweets per month, 250 Tweets/second
Enterprise access 10+ million Tweets per month, Tweets/second set at access level

你可以通过查看开发者门户中的主仪表板页面来检查你对每月Tweet上限的使用。在你的项目名称下,你会看到一个状态栏,说明你当前月的使用量与推特上限的关系。你还会看到你这个月的推特数量,与上限有关的推特使用百分比,以及你的推特使用上限重置的日期。

相关新闻

关注微信
关注微信
分享本页
返回顶部