Twitter Streaming API Restrictions & Terms

streaming
api

#1

I wanted to clarify the terms of use for Twitter Streaming API (Tweepy). I’m trying to build a platform which uses twitter streaming API to search for tweets matching a particular search criteria. My model is something like this:

  • Fetch matching tweets continuously using Twitter Streaming API
  • Store the tweets temporarily in the DB
  • Display the tweets from the DB in front-end for analysis

Just wanted to make sure about following points:

  • Terms and condition for storing the tweets temporarily in the DB
  • Time for which tweets are allowed to be stored in DB
  • Streaming API limits - Rate limits, re-connection time limit
  • Is Streaming API allowed to fetch tweets indefinitely or is there some limit

Thanks in advance!


#3

Hi! Thanks for your questions, and for taking the time to make sure you’re following our rules.

In general, the key terms regarding the storage and display of Tweets are in section I.C. of the Developer Policy. Specifically:

Developer Policy I.C.3
If Content is deleted, gains protected status, or is otherwise suspended, withheld, modified, or removed from the Twitter Service (including removal of location information), you will make all reasonable efforts to delete or modify such Content (as applicable) as soon as reasonably possible, and in any case within 24 hours after a request to do so by Twitter or by a Twitter user with regard to their Content, unless otherwise prohibited by applicable law or regulation, and with the express written permission of Twitter.

Developer Policy I.C.4
If your Service will display Content to the public or to end users of your Service, and you do not use Twitter Kit or Twitter for Websites to do so, then you must use the Twitter API to retrieve the most current version of the Content for such display. If Content ceases to be available through the Twitter API, you may not display such Content and must remove it from non-display portions of your Service as soon as reasonably possible.

While you should carefully review the full guidance in the Developer Policy, a couple of points to keep in mind regarding the specific questions you raised are:

  • You are required to keep any Twitter Content you store offline (e.g. in a database) up to date with the current state of that content on Twitter. The standard is “as soon as reasonably possible.” If you’re storing the data only temporarily (a good rule of thumb is less than 24 hours), then this may be less of a concern. But you should make every effort to keep your copy of Twitter data up to date.
  • If you’re going to display those stored Tweets, the best way to do so to ensure you’re compliant with our rules is via TwitterKit or Twitter for Websites.
  • If you choose not to use TwitterKit or Twitter for Websites, you are required to ensure that any Tweet you display is up to date with the most current version of that Tweet on Twitter before displaying it. You can check the current status of it using the statuses/lookup endpoint. For example, if a Tweet has been deleted between when you first ingested it from the API and when you display it, you should not display that Tweet.
  • Please also note that any display of Tweets is also bound by the Display Requirements; if you don’t use TwitterKit/Twitter for Websites, you should ensure you’re following those as well.

#4

Thanks a lot Yoyoel for the clarification.


#5

Hi Yoyoel,

One more query regarding the Twitter Content. Just wanted to verify once, does profile images and the media we get from the Twitter API in the form of links, counts under the Twitter Content and will abide by the same rules as other Twitter Content?

Thanks in advance!