Storing Twitter content in a datastore is not allowed?


The Rules of the Road say that exporting Twitter content to a datastore is not allowed. How are all the archiving services getting around this rule? They must be storing information in a database. I want to store direct messages to an account in a database daily and be able to report on these, but I’m not sure if this is allowed.

This is the section of the rules that I’m wondering about : “You may export or extract non-programmatic, GUI-driven Twitter Content as a PDF or spreadsheet by using “save as” or similar functionality. Exporting Twitter Content to a datastore as a service or other cloud based service, however, is not permitted.”


For absolute answers about terms like this, contact our API policy team at

This rule is pointed more towards export options you may provide to users in your application. Storing/caching tweets for the purpose of display or analysis within your own private datastore is commonplace and a requirement for many classes of applications. However, you can’t provide an API that serves Twitter content/data or share that data with other services.


So it’s ok for Twitter developers to store DMs on behalf of the application user for the user experience within the product so long as they don’t give access to third parties via their API?


If you’re otherwise following the terms of service and ensuring the privacy of that data for our shared users, yes.


what about storing user’s search queries for later use by the user?


As long as the user is aware of what data you are or are not storing on their behalf and what you’ll be doing with that data, that sounds like it’s fine by the policies. Consider using the saved_search feature of the API/service.


Ok, thanks for the quick reply :slight_smile:


We are working on a website (TTT) that will store tweets of TTT’s merchant members who TTT is following in a database for the purpose of

  1.   Categorize merchants in their business categories (such as food, pets, etc.)
  2.   Show only the latest tweet by the merchants on the TTT website
  3.   Delete any tweets from TTT website site if merchants use any foul language (tweets will not be deleted from merchant's Twitter account though)
  4.   Purging tweets in 30 days from the TTT website database



As part of a project, we wanted to be able to retrieve tweets in real-time related to the keywords “last night i dreamt that” using the Twitter API and store them in our database. We want to be able to perform research on the dream related tweets and develop statistics.
Please let me know if it is ok to store the twitter data in our database.
Any guidance is appreciated.



As long as you aren’t redistributing that data, this is typically allowed by the terms.


How about if I want to write a book on the aggregate properties of the Tweets of people in a list. May I store the data I get from Ctrl-S-ing into spreadsheets, and then do statistical correlations, etc.? Can you tell me what are the areas where this kind of project would get into a danger zone wrt/ TOS? thanks kindly


You should take a look at the Developer Policy on this. You certainly should not be redistributing the data in a printed (or online) book, although there are some clauses referring to “downloadable datasets” that provide some ability to share information. In general we’d strongly recommend only sharing Tweet (or user) IDs in such a dataset (not full objects), that a third party would then have to re-query - this means that you don’t have to manage the requirement to retrospectively remove deleted Tweets from your dataset as they will not be retrievable via the API later. Also refer to the clauses that talk about “responding to Content changes reported through the Twitter API” as they affect Tweet deletions and removal.