Type question

Discussion

This type represents a question on one of the Stack Exchange sites, such as this famous RegEx question.

This type is heavily inspired by the question page itself, and can optionally return comments and answers accordingly.

The upvoted, downvoted, and favorited fields can only be queried for with an access_token with the private_info scope.

Fields

accepted_answer_id
integer
may be absent

answer_count
integer

answers
an array of answers
may be absent

body
string
unchanged in unsafe filters

body_markdown 2.2
string

bounty_amount
integer
may be absent

bounty_closes_date

bounty_user 2.2

can_close 2.2
boolean

can_flag 2.2
boolean

close_vote_count 2.1
integer

closed_date

closed_details 2.2

closed_reason
string
may be absent

comment_count 2.2
integer

comments
an array of comments
may be absent

community_owned_date

creation_date

delete_vote_count 2.1
integer

down_vote_count
integer

downvoted 2.2
boolean private_info

favorite_count
integer

favorited 2.2
boolean private_info

is_answered
boolean

last_activity_date

last_edit_date

last_editor 2.2

link
string
unchanged in unsafe filters

locked_date

notice 2.1

protected_date

question_id
integer, refers to a question

reopen_vote_count 2.1
integer

score
integer

share_link 2.2
string
unchanged in unsafe filters

tags
an array of strings

title
string

up_vote_count
integer

upvoted 2.2
boolean private_info

view_count
integer

Fields marked with are included in the default filter, those marked with are excluded in the default filter.

Examples

Typical Question

{"tags":["windows","c#",".net"],"owner":{"reputation":9001,"user_id":1,"user_type":"registered","accept_rate":55,"profile_image":"https://www.gravatar.com/avatar/a007be5a61f6aa8f3e85ae2fc18dd66e?d=identicon&r=PG","display_name":"Example User","link":"http://example.stackexchange.com/users/1/example-user"},"is_answered":false,"view_count":31415,"favorite_count":1,"down_vote_count":2,"up_vote_count":3,"answer_count":0,"score":1,"last_activity_date":1414036019,"creation_date":1413992819,"last_edit_date":1414061219,"question_id":1234,"link":"http://example.stackexchange.com/questions/1234/an-example-post-title","title":"An example post title","body":"An example post body"}

Answered Question

{"tags":["windows","c#",".net"],"owner":{"reputation":9001,"user_id":1,"user_type":"registered","accept_rate":55,"profile_image":"https://www.gravatar.com/avatar/a007be5a61f6aa8f3e85ae2fc18dd66e?d=identicon&r=PG","display_name":"Example User","link":"http://example.stackexchange.com/users/1/example-user"},"is_answered":true,"view_count":31415,"favorite_count":1,"down_vote_count":2,"up_vote_count":3,"answer_count":1,"score":1,"last_activity_date":1414036019,"creation_date":1413992819,"last_edit_date":1414061219,"question_id":1234,"link":"http://example.stackexchange.com/questions/1234/an-example-post-title","title":"An example post title","body":"An example post body"}

Question With Accepted Answer

{"tags":["windows","c#",".net"],"owner":{"reputation":9001,"user_id":1,"user_type":"registered","accept_rate":55,"profile_image":"https://www.gravatar.com/avatar/a007be5a61f6aa8f3e85ae2fc18dd66e?d=identicon&r=PG","display_name":"Example User","link":"http://example.stackexchange.com/users/1/example-user"},"is_answered":true,"view_count":31415,"favorite_count":1,"down_vote_count":2,"up_vote_count":3,"accepted_answer_id":2,"answer_count":1,"score":1,"last_activity_date":1414036019,"creation_date":1413992819,"last_edit_date":1414061219,"question_id":1234,"link":"http://example.stackexchange.com/questions/1234/an-example-post-title","title":"An example post title","body":"An example post body"}

Closed Question

{"tags":["windows","c#",".net"],"owner":{"reputation":9001,"user_id":1,"user_type":"registered","accept_rate":55,"profile_image":"https://www.gravatar.com/avatar/a007be5a61f6aa8f3e85ae2fc18dd66e?d=identicon&r=PG","display_name":"Example User","link":"http://example.stackexchange.com/users/1/example-user"},"is_answered":false,"view_count":31415,"favorite_count":1,"down_vote_count":2,"up_vote_count":3,"closed_date":1414064819,"answer_count":0,"score":1,"last_activity_date":1414036019,"creation_date":1413992819,"last_edit_date":1414061219,"question_id":1234,"link":"http://example.stackexchange.com/questions/1234/an-example-post-title","closed_reason":"not a real question","title":"An example post title","body":"An example post body"}

Locked Question

{"tags":["windows","c#",".net"],"owner":{"reputation":9001,"user_id":1,"user_type":"registered","accept_rate":55,"profile_image":"https://www.gravatar.com/avatar/a007be5a61f6aa8f3e85ae2fc18dd66e?d=identicon&r=PG","display_name":"Example User","link":"http://example.stackexchange.com/users/1/example-user"},"is_answered":false,"view_count":31415,"favorite_count":1,"down_vote_count":2,"up_vote_count":3,"answer_count":0,"score":1,"locked_date":1414068419,"last_activity_date":1414036019,"creation_date":1413992819,"last_edit_date":1414061219,"question_id":1234,"link":"http://example.stackexchange.com/questions/1234/an-example-post-title","title":"An example post title","body":"An example post body"}

Bountied Question

{"tags":["windows","c#",".net"],"owner":{"reputation":9001,"user_id":1,"user_type":"registered","accept_rate":55,"profile_image":"https://www.gravatar.com/avatar/a007be5a61f6aa8f3e85ae2fc18dd66e?d=identicon&r=PG","display_name":"Example User","link":"http://example.stackexchange.com/users/1/example-user"},"is_answered":false,"view_count":31415,"favorite_count":1,"down_vote_count":2,"up_vote_count":3,"bounty_amount":500,"bounty_closes_date":1414424819,"answer_count":0,"score":1,"last_activity_date":1414036019,"creation_date":1413992819,"last_edit_date":1414061219,"question_id":1234,"link":"http://example.stackexchange.com/questions/1234/an-example-post-title","title":"An example post title","body":"An example post body"}

Community Owned Question

{"tags":["windows","c#",".net"],"owner":{"reputation":9001,"user_id":1,"user_type":"registered","accept_rate":55,"profile_image":"https://www.gravatar.com/avatar/a007be5a61f6aa8f3e85ae2fc18dd66e?d=identicon&r=PG","display_name":"Example User","link":"http://example.stackexchange.com/users/1/example-user"},"is_answered":false,"view_count":31415,"favorite_count":1,"down_vote_count":2,"up_vote_count":3,"answer_count":0,"community_owned_date":1414075619,"score":1,"last_activity_date":1414036019,"creation_date":1413992819,"last_edit_date":1414061219,"question_id":1234,"link":"http://example.stackexchange.com/questions/1234/an-example-post-title","title":"An example post title","body":"An example post body"}

Question Migrated From Other Site

{"migrated_from":{"other_site":{"launch_date":1414079219,"open_beta_date":1413992819,"closed_beta_date":1413906419,"site_state":"normal","icon_url":"http://sstatic.net/stackexchange/img/apple-touch-icon.png","audience":"example lovers","site_url":"http://example.stackexchange.com","api_site_parameter":"example","logo_url":"http://sstatic.net/stackexchange/img/logo.png","name":"Example Site","site_type":"main_site"},"on_date":1413996419,"question_id":4321},"tags":["windows","c#",".net"],"owner":{"reputation":9001,"user_id":1,"user_type":"registered","accept_rate":55,"profile_image":"https://www.gravatar.com/avatar/a007be5a61f6aa8f3e85ae2fc18dd66e?d=identicon&r=PG","display_name":"Example User","link":"http://example.stackexchange.com/users/1/example-user"},"is_answered":false,"view_count":31415,"favorite_count":1,"down_vote_count":2,"up_vote_count":3,"answer_count":0,"score":1,"last_activity_date":1414036019,"creation_date":1413992819,"last_edit_date":1414061219,"question_id":1234,"link":"http://example.stackexchange.com/questions/1234/an-example-post-title","title":"An example post title","body":"An example post body"}

Question Migrated To Other Site

{"migrated_to":{"other_site":{"launch_date":1414079219,"open_beta_date":1413992819,"closed_beta_date":1413906419,"site_state":"normal","icon_url":"http://sstatic.net/stackexchange/img/apple-touch-icon.png","audience":"example lovers","site_url":"http://example.stackexchange.com","api_site_parameter":"example","logo_url":"http://sstatic.net/stackexchange/img/logo.png","name":"Example Site","site_type":"main_site"},"on_date":1414064819,"question_id":4321},"tags":["windows","c#",".net"],"owner":{"reputation":9001,"user_id":1,"user_type":"registered","accept_rate":55,"profile_image":"https://www.gravatar.com/avatar/a007be5a61f6aa8f3e85ae2fc18dd66e?d=identicon&r=PG","display_name":"Example User","link":"http://example.stackexchange.com/users/1/example-user"},"is_answered":false,"view_count":31415,"favorite_count":1,"down_vote_count":2,"up_vote_count":3,"closed_date":1414064819,"answer_count":0,"score":1,"locked_date":1414064819,"last_activity_date":1414036019,"creation_date":1413992819,"last_edit_date":1414061219,"question_id":1234,"link":"http://example.stackexchange.com/questions/1234/an-example-post-title","closed_reason":"off topic","title":"An example post title","body":"An example post body"}

Methods That Return This Type