From: Harmon Date: Sat, 23 Oct 2021 16:11:14 +0000 (-0500) Subject: Add FAQ section on Client.search_all_tweets per second rate limit X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=564b49fa10819d10d9e4bd8903236ee605dbdb99;p=tweepy.git Add FAQ section on Client.search_all_tweets per second rate limit --- diff --git a/docs/faq.rst b/docs/faq.rst index ca10715..5c89a2a 100644 --- a/docs/faq.rst +++ b/docs/faq.rst @@ -80,3 +80,15 @@ How do I access ``includes`` data while using :class:`Paginator`? :meth:`Paginator.flatten` flattens the ``data`` and iterates over each object. To access ``includes``, you'll need to iterate through each response instead. + +Why am I getting rate-limited so quickly when using :meth:`Client.search_all_tweets` with :class:`Paginator`? +------------------------------------------------------------------------------------------------------------- + +The `GET /2/tweets/search/all`_ Twitter API endpoint that +:meth:`Client.search_all_tweets` uses has an additional 1 request per second +rate limit that is not handled by :class:`Paginator`. + +You can :func:`time.sleep` 1 second while iterating through responses to handle +this rate limit. + +.. _GET /2/tweets/search/all: https://developer.twitter.com/en/docs/twitter-api/tweets/search/api-reference/get-tweets-search-all