0
votes

So the Twitter API has a limit of 100 tweets when you search by keyword. Example:

results = api.GetSearch(
raw_query="q=KeyordForSearch%20&result_type=recent&since=2014-07-19&count=100")

https://dev.twitter.com/rest/reference/get/search/tweets

Let's assume that the request above would find 400 tweets matching.

The question is how can i send multiple requests that dont return the same tweets? The first request will return 100 tweets, i want the second one to return the next 100(so i will have 200 unique tweets).

1
Did you read through dev.twitter.com/rest/public/search where it suggests how to approach retrieving multiple pages of results (for timeline and search) or considered a twitter library that does this for you? (tweepy springs to mind) - Jon Clements
I just read what you pointed out and i can't seem to find anything there helping me. And yes, i'm currently using python-twitter.readthedocs.io/en/latest/index.html and i didnt find any library that would do that for me. - Mike

1 Answers

0
votes

I found the answer:

After running the first search you should find the lowest ID of the results and pass it to the next query as max_id. This means that on the first search you will get the latest or the most popular 100 tweets, afterwords the next 100 and so forth.