'Is there parameter to limit no of tweet replies retrieved based on given conversation_id?

In below code I am trying to retrieve recent tweet replies based on given conversation id but the problem is due to randomly fetching all the recent tweet it is retrieving more no of tweets than I need which is causing 429:too many request error

pager = TwitterPager(twapi, 'tweets/search/recent',
                            {
                              'query': f'conversation_id:{conversation_id}',
                                
'tweet.fields':'author_id,conversation_id,created_at,in_reply_to_user_id',
                            })

I've tried above code. Also I wanted to know how to resolve the error 429:too many request error?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source