How do I limit the number of tweets the GET sample/status method can return?


The GET statuses/sample method, when ran in the console, returns infinite number of tweets, I just wanted to know how do I limit that number to, let’s say, 20.


You can’t – it’s a streaming API and you’re meant to connect to it for extended periods of time, rather than just to capture a small handful of tweets.