1

I am using this call to get the body of an answer :

http://api.stackexchange.com/2.2/questions/5877753/answers?order=desc&sort=activity&site=stackoverflow

But this only gives the author of the answer and not the answer body itself. How do I get both ?

The API response for the above is :

{  
   "items":[  
      {  
         "owner":{  
            "reputation":462840,
            "user_id":115145,
            "user_type":"registered",
            "accept_rate":89,
            "profile_image":"https://www.gravatar.com/avatar/5ff53c2b4f6cc66ee989bb9d9effe119?s=128&d=identicon&r=PG",
            "display_name":"CommonsWare",
            "link":"http://stackoverflow.com/users/115145/commonsware"
         },
         "is_accepted":true,
         "score":20,
         "last_activity_date":1350612613,
         "last_edit_date":1350612613,
         "creation_date":1304491442,
         "answer_id":5879563,
         "question_id":5877753
      }
   ],
   "has_more":false,
   "quota_max":300,
   "quota_remaining":255
}
1

Okay I figured out that a filter(withbody) needs to be applied here. So the URL would be something like :

http://api.stackexchange.com/2.2/questions/5877753/answers?order=desc&sort=activity&filter=withbody&site=stackoverflow

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