2

How do I actually get the body (i.e. the textual content) of any say question or answer.

For example, for question (id= 7406104), I call:

http://api.stackoverflow.com/1.1/questions/7406104

But in the response, I can only see the title. How can I get the actual question details:

{
 "total": 1,
 "page": 1,
 "pagesize": 30,
 "questions": [
  {
   "tags": [
    "java"
   ],
   "answer_count": 5,
   "accepted_answer_id": 7406124,
   "favorite_count": 1,
   "question_timeline_url": "/questions/7406104/timeline",
   "question_comments_url": "/questions/7406104/comments",
   "question_answers_url": "/questions/7406104/answers",
   "question_id": 7406104,
   "owner": {
    "user_id": 587196,
    "user_type": "registered",
    "display_name": "Larry",
    "reputation": 197,
    "email_hash": "4758e22c1321eeaa3c712b516669a629"
   },
   "creation_date": 1315935668,
   "last_activity_date": 1315936683,
   "up_vote_count": 0,
   "down_vote_count": 0,
   "view_count": 46,
   "score": 0,
   "community_owned": false,
   "title": "How do I write my own comparison operator in Java?"
  }
 ]
}

1 Answer 1

4

As mentioned in the API documentation, you simply need to pass in the body=true parameter to get the body of the question.

In the upcoming version of the API, you'll be able to use filters to specify what you want returned in advance.

You must log in to answer this question.

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