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.

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

bounty_amount
integer
may be absent

bounty_closes_date

close_vote_count 2.1
integer

closed_date

closed_reason
string
may be absent

comments
an array of comments
may be absent

community_owned_date

creation_date

delete_vote_count 2.1
integer

down_vote_count
integer

favorite_count
integer

is_answered
boolean

last_activity_date

last_edit_date

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

tags
an array of strings

title
string

up_vote_count
integer

view_count
integer

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

Examples

Typical Question

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

Answered Question

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

Question With Accepted Answer

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

Closed Question

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

Locked Question

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

Bountied Question

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

Community Owned Question

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

Question Migrated From Other Site

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

Question Migrated To Other Site

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

Methods That Return This Type