This project has moved and is read-only. For the latest updates, please go here.

How to get the total number of tweets for a specific time period

Nov 16, 2014 at 11:09 PM

I am trying to write code to get the TOTAL number of tweets for specific periods of time, say from two days ago until one day ago and then from one day ago until today. I can not find Since as a filter so what I am doing here is I get the result count for two Until search calls and calculate the difference. The code I have so far for searching is:

var searchResponse = await
            from search in _tweetCtx.Search
                search.Type == SearchType.Search 
                && search.Query == _query
                && search.Count == 100
                && search.Until == until
            select search

        switch (_timeLineBound)
            case timeLineBound.since: { searchResultCount_since += searchResponse.Statuses.Count; break; }
            case timeLineBound.until: { searchResultCount_until += searchResponse.Statuses.Count; break; }
Which is obviously not working the way I want it to. I cannot find Page and PageSize in the list of filters for search and I am just wondering what I am missing here. I have seen some previous posts like but I am still stuck.

Any help would be very much appreciated.
Nov 17, 2014 at 5:10 AM

I might be helpful to review Twitter's documentation of the Search API to see what is and isn't available. The matching LINQ to Twitter Search API documentation has parameters that match Twitter's Search API command-line parameters. In particular, pay attention to Twitter's list of Query Operators, which is text you use and assign to the Query property filter in LINQ to Twitter.

Marked as answer by JoeMayo on 11/30/2014 at 10:57 PM