Hot answers tagged answers
2
This is [by-design].
/search is already pretty resource intensive, and not returning answers is a conscious effort to reduce its runtime.
The answers parameter does not appear in the documentation for /search accordingly.
2
Confirming weirdness with the /users/{id}/answers route. For example, these two queries yield completely different results, although the second one only has a pagesize and page parameters:
http://api.stackoverflow.com/1.0/users/180784/answers
http://api.stackoverflow.com/1.0/users/180784/answers?pagesize=10&page=1
I would have expected the first 10 ...
2
The API filters are kept pretty simple, and there is no way to restrict these answers to just accepted answers. Your app would loop through the items array and return/handle only those where is_accepted is true.
Since you appear to be using PHP, the Stack.PHP library may save you time and effort, overall.
1
Its because post id 74 is an answer, not a question.
This was an undiscovered bug in the API back when we froze it, but enough [app]s depend on it that we haven't "fixed" it.
Naturally, answers have no titles or tags.
1
These are two simple methods in meta-language:
1.
Pulls a pagesize number of answers, page after page, checking the presence of the given accepted_answer_id
def get_accepted_answer_page(question_id, answer_id, sort, pagesize):
page = 1
while(True):
answers_page_ids = get_answers_ids_with_API_method(question_id, sort, page, pagesize)
...
1
I believe the sort=votes parameter is for when you are retrieving multiple questions in one API call, such as with this URL - the questions in the response are ordered by vote.
http://api.stackoverflow.com/0.8/questions/1429951;2383701;619895?sort=votes&type=jsontext
In terms of how you could sort the responses - you do have the up + the down vote ...
Only top voted, non community-wiki answers of a minimum length are eligible