I am trying to navigate our main site to find question and answers to improve:

  • Edit posts which I can fix
  • Up and down vote what I can
  • Vote to close or reopen
  • Flag those lengthy comment threads and other broken windows for mod attention

and so on.

However, there seem to be no easy way of finding a "random" selection of posts to review holistically.

Is there a script I can use?


2 Answers 2


Yes, why, I am surprised you asked!

You can use the very efficient Random Post v0.1™ user script!

  1. Install the user script available as a gist here.

  2. Go fetch any Physics.SE page.

  3. Notice the die on the top right

    enter image description here

  4. Click on the die to go to a completely random post!

  • 1
    $\begingroup$ You may want to post this on StackApps as well :) $\endgroup$ Commented Dec 23, 2012 at 17:54
  • $\begingroup$ @Manishearth It only works on physics, until I figure out how to extract the maximum postId for each site :-) $\endgroup$
    – Sklivvz
    Commented Dec 23, 2012 at 18:02
  • $\begingroup$ GET request api.stackexchange.com/2.1/info?site=stackoverflow. Use api.stackexchange.com/docs/… to customize the query. $\endgroup$ Commented Dec 23, 2012 at 18:06
  • $\begingroup$ Alternatively, whenever the user is on the main page,check all the question ids on the page and update a "max_known_postid" variable in localStorage. No need for AJAX then. $\endgroup$ Commented Dec 23, 2012 at 18:07
  • $\begingroup$ @Manishearth thanks. The first method does not give out the MAX(Id), just the COUNT(Id), which is useless to us ... I could do the second but of course stateless would be better :-) $\endgroup$
    – Sklivvz
    Commented Dec 23, 2012 at 18:12
  • $\begingroup$ Thanks for this, Sklivvz. Now if only things could settle down enough that I can find so time to play with it... $\endgroup$ Commented Dec 23, 2012 at 20:58

While not a script, you can get much more targeted results through the Stack Exchange Data Explorer.

There are weekly refreshes, so if you're looking for anything less than a week old, it won't show up in the query.

Basically, you want to use the newid() function in SQL to order by. A new GUID is produced for every single row (this expression is not evaluated one time and then cached).

That means that you can get a completely random set of questions every time.

Add the [Post Link] and then you get a list of URLs that you can use to navigate to the post.

I've created the following query to be forked:

    p.Id as [Post Link],
    Posts as p with (nolock)
    --- Just questions for now
    p.PostTypeId in (1) 

    --- Add new filter criteria here
    --- to suit your needs.

order by 
    --- Randomize each time.

Note the --- Add new filter criteria here to suit your needs. comment. You should adjust the filter in order to target the posts that you specifically want. For example, you might check the ClosedDate column is null to filter out closed posts.

Also note that you can change this query to work on any site by selecting "Switch sites" on by the "Run Query" button:

Switch sites option on Stack Exchange Data Explorer


You must log in to answer this question.

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