title: Tweepy Cursor and Search API to save all tweets
body: <p>Disclaimer: new to python and Twitter API</p>
  
  <p>I am using tweepy to access the Search API with various filter combinations.  I am iterating over each tweet returned,  processing the tweet and then writing the results to a CSV as a row.  </p>
  
  <p>Relevant portion of script:</p>
  
  <pre><code>tweets=tweepy.Cursor(api.search, q=keywords).items()    
  
  for tweet in tweets:    
  *some code*
  </code></pre>
  
  <p>I have not included a max value in .items() because I want to retrieve all available tweets with the keyword (I know this is limited to ~1week in the past).  My keyword returns upwards of 10000 results.  This results in a rate limit exceeded 88 error.  </p>
  
  <p>If I include a time.sleep for 15 minutes in my loop and make the request again, I retrieve the same tweets over again.  How can I either retrieve only new results or process all the results without exceeding the rate limit?</p>