Take the 2-minute tour ×

It would be useful if the API allowed you to return items based on their last activity date. Let's take a question for example.


All questions having been created, edited, commented on or answered on as their last activity during the requested period would be returned.

There is already a last-activity field returned in the API, so I assume it would be a trivial concept to implement. It would be great if that could also be applied to Users as well.

The returned values should only include the activities that took place during that period of time, for example, only comments and answers that have been made during the requested period.

A possibly more complex, but related, query would be to provide an activity period, which doesn't have to be the last activity date of a question, and the returned values would be all questions which had activity during said period and including only answers/comments that were made during that period.

share|improve this question

1 Answer 1

up vote 4 down vote accepted

Anything that supports a sort of activity can do this already.


Where start-date and end-date are unix timestamps.


/questions and /questions/unanswered now honor min, max, and order.

sort     | min and max limit
active   | last_activity_date
newest   | creation_date
featured | bounty_closes_date*
hot      | last_activity_date
week     | last_activity_date
month    | last_activity_date
votes    | score

todate and fromdate, as always, limit creation_date.

*bounty_closes_date is always in the future, as featured only returns those questions whose bounties haven't passed yet.

share|improve this answer
Of course, /questions doesn't haven an activity sort so you can't do it in that case... only creation date. –  ColinD May 25 '10 at 21:04
@ColinD - /questions has an active sort. –  Kevin Montrose May 25 '10 at 21:14
Yes, but it doesn't support min and max so you can't do this. –  ColinD May 25 '10 at 21:39
@ColinD - well, it should. Makes this a [bug]. Looking into it. –  Kevin Montrose May 25 '10 at 22:07
Just curious: none of the other sorts for /questions (including votes and newest) seem to support min or max or order, so I'd assumed it was an intentional restriction for all of them due to the large set of data involved. Are any of those supposed to have them too? –  ColinD May 26 '10 at 4:39
@ColinD - /questions and /questions/unanswered are going to have some restrictions when the dust settles due to data size. Stay tuned for exactly what those restrictions turn out to be. –  Kevin Montrose May 26 '10 at 8:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .