6

Featured questions have more information than is currently available through the /questions/featured API route. Could the following be added?

  • The user who posted the bounty (since it's no longer the same as the owner of the post).
  • The reason selected for posting the bounty.
  • The custom message entered by the bounty poster.

The main piece that I'd like to see is the reason selected for the bounty. My immediate use case is for @BountyBot, a Twitter bot that tweets interesting bounty questions. I'd like to filter out bounties posted for the "Reward existing answer" reason, since I only want to draw attention to questions that need new answers. (The other pieces of information would be useful if I were posting on Facebook, Google+, a blog, or anywhere that allowed more than 140 characters.)

1
  • question.bounty_user was added in 2.2, but you're still out of luck on the actual bounty reason.
    – Tim Stone
    Commented Apr 2, 2014 at 20:45

1 Answer 1

3

While not perfect, some of what you're looking for is currently available. The bounty owner user ID and custom message will be in the results if you supply a filter that returns question.notice, since the notice visible during the bounty should be the one associated with the bountying user.

This won't give you the high-level bounty reason though, and if they picked a preexisting option the notice.body field will just be a blank <p>. The best you could do right now would be to weed through /posts/{ids}/revisions and find the relevant information, and then parse it out of the HTML.

Given that that's extremely hacky, I think making the changes you're suggesting would be a good idea.

You must log in to answer this question.

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