I have a script which stores incoming tweets for a phrase (e.g. "python") into database table "A" using twitter streaming api. Later, another script searches the same phrase using twitter search api and stores results into table "B". My question is why there are some tweets in "A" that are not in "B" and vice versa.
I can think of one reason to have tweets in "B" and not in "A":
"A" only contains tweets that are posted after streaming api started while search api returns results from the last week. If streaming api has been running for more than a week, then there must not any tweet in "B" that is not in "A".
I know two reasons to have some tweets in "A" and not in "B":
- search API only returns only results from the last week while streaming api returns everything
- search API returns only a portion of results and not all as its focus is not on completeness.
I'd like to make sure if I got it correct or not.
Copyright Notice:Content Author:「PHA」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/32689558/why-some-tweets-are-in-search-api-and-not-in-streaming-api-and-vice-versa