Movatterモバイル変換


[0]ホーム

URL:


Type answer

Discussion

This type represents an answer to a question on one of the Stack Exchange sites, such as this famousanswer ofbobince's.

As on the question page, it is possible to fetch the comments on an answer as part of a call; though this is not done by default.

The upvoted, downvoted, and accepted fields can only be queried for with anaccess_token with the private_info scope.

Fields

accepted2.2
booleanprivate_info

answer_id
integer, refers to ananswer

awarded_bounty_amount2.2

awarded_bounty_users2.2

body
string
unchanged inunsafe filters

body_markdown2.2
string

can_comment2.3
boolean

can_edit2.3
boolean

can_flag2.2
boolean
unchanged inunsafe filters

can_suggest_edit2.3
boolean

collectives2.3
an array ofcollectives

comment_count2.2
integer

comments

community_owned_date

content_license2.2
string

creation_date

down_vote_count
integer

downvoted2.2
booleanprivate_info

is_accepted
boolean

last_activity_date

last_edit_date

last_editor2.2

link
string
unchanged inunsafe filters

locked_date

owner

posted_by_collectives2.3
an array ofcollectives

question_id
integer, refers to aquestion

recommendations2.3

score
integer

share_link2.2
string
unchanged inunsafe filters

tags2.1
an array of strings

title
string

up_vote_count
integer

upvoted2.2
booleanprivate_info

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

Examples

Normal Answer

{"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"},"down_vote_count":2,"up_vote_count":3,"is_accepted":false,"score":1,"last_activity_date":1764375431,"last_edit_date":1764400631,"creation_date":1764332231,"answer_id":5678,"question_id":1234,"link":"http://example.stackexchange.com/questions/1234/an-example-post-title/5678#5678","title":"An example post title","body":"An example post body"}

Locked Answer

{"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"},"down_vote_count":2,"up_vote_count":3,"is_accepted":false,"score":1,"last_activity_date":1764375431,"creation_date":1764332231,"locked_date":1764397031,"answer_id":5678,"question_id":1234,"link":"http://example.stackexchange.com/questions/1234/an-example-post-title/5678#5678","title":"An example post title","body":"An example post body"}

Community Owned Answer

{"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"},"down_vote_count":2,"up_vote_count":3,"is_accepted":false,"score":1,"last_activity_date":1764375431,"creation_date":1764332231,"answer_id":5678,"question_id":1234,"link":"http://example.stackexchange.com/questions/1234/an-example-post-title/5678#5678","title":"An example post title","body":"An example post body"}

Methods That Return This Type

answers
answers/{ids}
questions/{id}/answers/render2.2
answers/{id}/flags/add2.2
answers/{id}/accept/undo2.2
answers/{id}/recommend2.3
answers/{id}/recommend/undo2.3
answers/{id}/accept2.2
answers/{id}/downvote/undo2.2
answers/{id}/downvote2.2
answers/{id}/upvote/undo2.2
answers/{id}/upvote2.2
answers/{id}/delete2.2
answers/{id}/edit2.2
questions/{id}/answers/add2.2
collectives/{slugs}/answers2.3
questions/{ids}/answers
users/{ids}/answers
users/{id}/tags/{tags}/top-answers
me/answers
me/tags/{tags}/top-answers
Navigation

aboutblogterms of usecontact usfeedback always welcome

site design / logo © 2025 Stack Exchange, Inc; user contributions licensed underCC BY-SA



[8]ページ先頭

©2009-2025 Movatter.jp