I am trying to find latest tweets related to “Protection”, but it’s not giving me 30 tweets, it’s giving less number. what to do to get exact number?
What endpoint are you calling? The Search API may return fewer results as some index items may be filtered out (for example, if content is withheld, or marked as possible spam).
I am calling API results directly, sometimes they are 30, sometimes less than 30. But I want the consistent result. I am calling https://api.twitter.com/1.1/search/tweets.json? API with parameters “q” => “Protection”, “count” => 30. Is anything needed to add?
No, there’s nothing additional to add - the count is a maximum. There’s no guarantee that you will receive that number of results as any Tweets you’re unable to see (due to blocks, mutes, spam filtering or other reasons) will be removed from the result set returned.
what can I do to get exact 30 tweets?
You could grab 100, and then select only the most recent from the result set.