Not working: fromDate of fullarchive Premium search APIs


I upgraded my account to access the fullarchive Premium search API, but when I tried this query:

$request = array(
	"query" => "5Gconnectedmobility",
	"maxResults" => 150,
	"fromDate" => "200603220000"

…with this base URI

It returns tweets from the last 30 days only. I am unable to retrieve tweets from June and July 2018 as seen here:

Please help!


Hi @ninjazhai - I suggest you include both a fromDate and a toDate parameter. If neither the fromDate or toDate parameter is used, the API will deliver all results for the most recent 30 days, starting at the time of the request, going backwards.

Your request should work, but please note that for such a long period of time, you will likely need to paginate through the data.

Let us know if you have any more questions.


I changed the query and included both the fromDate and toDate. It still returns data from the last 30 days on the first page. On the second page, it shows the data before the last 30 days. Is this the expected behavior?

I just want to show 300 results on the first page (both the last 30 days and before it). I don’t want waste a request count because your API is quite expensive.

I suggest you change your pricing. The way Facebook API does this is that, they count only the unique number of search term, not per request like the way you do it now. I hope you guys hear a customer like me.


Hi @ninjazhai - Thank you for your feedback, and yes this behaviour is expected.

With the data endpoint, Tweets are returned in reverse chronological order. Each page contains Tweets from a period of 31 days OR the number of Tweets defined with the maxResults operator, whichever comes first. So, in your case, it is not surprising that you received Tweets from the last 31 days on the first page, Tweets from the 31 days prior to that on the second page, and so on.


This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.