Take the 2-minute tour ×
Stack Apps is a question and answer site for apps, scripts, and development with the Stack Exchange API. It's 100% free, no registration required.

A lot of ideas I've had for Stack apps have been of the "question of the day" variety. It would be nice if there was a way to retrieve one or more random questions.

/questions/random/

The max parameter could be used to determine how many results to return. If no max is specified then only a single result should be returned. All other parameters could apply to this, including answers, body and sort.

/questions/random/?max=10&body=true

I realize that I could simply have my app guess a random question ID or something, but most of these solutions will waste precious requests trying to find a positive result and will still only return one result at a time.

share|improve this question
add comment

2 Answers 2

up vote 2 down vote accepted

You can implement this yourself pretty easily.

A random date range, with todate & fromdate on /questions, will work fine. Basically, pick a random question (via page) from a random hour/day/week/month/whatever.

share|improve this answer
add comment

Why can't you call the

/questions

method and just pick a random question from a random page?

share|improve this answer
    
Ah true, the paging would certainly replicate most of this functionality. There's still a high degree of repeatability this way, requiring a few pages of results to be called if I wanted a more random set. –  Soviut Jun 15 '10 at 4:30
add comment

You must log in to answer this question.

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