CARVIEW |
Select Language
HTTP/2 200
date: Fri, 25 Jul 2025 17:53:04 GMT
content-type: text/html; charset=utf-8
cache-control: private
set-cookie: prov=937ce27f-d992-4c58-8ea4-686bccd90af4; expires=Sat, 25 Jul 2026 17:53:04 GMT; domain=.stackexchange.com; path=/; secure; httponly
x-clacks-overhead: GNU Terry Pratchett
strict-transport-security: max-age=31536000; includeSubDomains
x-request-guid: 179d38ac-7203-42f2-a858-baf212171917
x-providence-cookie: 937ce27f-d992-4c58-8ea4-686bccd90af4
content-security-policy: upgrade-insecure-requests; frame-ancestors 'self' https://stackexchange.com
cf-cache-status: DYNAMIC
set-cookie: __cf_bm=6CgZbBVQkuZgIWsv8EgLHuvg5XXqmCibJMeslS8bENY-1753465984-1.0.1.1-0U_.xVQzTqZ5DEpNrVI26jQKR5Y59tx_6WyqoCsRuTrhTRV7.shRE2rw8En6DO3eZUNmn8beK6smjIwQkWzGRcya9gLsn3jk6udpDuw8c7Q; path=/; expires=Fri, 25-Jul-25 18:23:04 GMT; domain=.api.stackexchange.com; HttpOnly; Secure; SameSite=None
set-cookie: __cflb=02DiuEqtkS4jGaTk6jRLVowZ76Z4qeo49suEnii6uBNsE; SameSite=None; Secure; path=/; expires=Sat, 26-Jul-25 16:53:04 GMT; HttpOnly
set-cookie: _cfuvid=Sj.TPuac5DDPzd1srcyXrJsT3SXLSwObf_B9gie.JMo-1753465984601-0.0.1.1-604800000; path=/; domain=.api.stackexchange.com; HttpOnly; Secure; SameSite=None
server: cloudflare
cf-ray: 964d83c15ec58a2a-BLR
content-encoding: gzip
comment -
Stack Exchange API
Type comment
Discussion
All Questions and Answers on a Stack Exchange site can be commented on, and this type represents those comments.
Comments can also be optionally directed at users, when this is the case the reply_to_user property is set (if it is requested in the current filter).
The upvoted field can only be queried for with an access_token with the private_info scope.
Fields
body_markdown 2.1
string
can_flag 2.2
boolean
content_license 2.2
string
edited
boolean
post_type
one of
question
, answer
, or article
score
integer
upvoted 2.2
boolean
private_info
Fields marked with are included in the default filter, those marked with are excluded in the default filter.
Examples
► Normal Comment
{"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":"https://example.stackexchange.com/users/1/example-user"},"edited":false,"creation_date":1753379584,"post_id":5678,"comment_id":12345,"link":"https://example.stackexchange.com/questions/5678/example-title#comment12345_5678","body":"Example comment body"}
► Unowned Comment
{"owner":{"user_type":"does_not_exist","display_name":"Non-extant User"},"edited":false,"creation_date":1753379584,"post_id":5678,"comment_id":12345,"link":"https://example.stackexchange.com/questions/5678/example-title#comment12345_5678","body":"Example comment body"}
► Reply Comment
{"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":"https://example.stackexchange.com/users/1/example-user"},"reply_to_user":{"reputation":18002,"user_id":2,"user_type":"registered","accept_rate":100,"profile_image":"https://www.gravatar.com/avatar/a007be5a61f6aa8f3e85ae2fc18dd66e?d=identicon&r=PG","display_name":"Other User","link":"https://example.stackexchange.com/users/2/other-user"},"edited":false,"creation_date":1753379584,"post_id":5678,"comment_id":12345,"link":"https://example.stackexchange.com/questions/5678/example-title#comment12345_5678","body":"@OtherUser Example comment body"}
Methods That Return This Type
answers/{ids}/comments
articles/{ids}/comments
comments
comments/{ids}
posts/{ids}/comments
posts/{id}/comments/render 2.2
comments/{id}/flags/add 2.2
comments/{id}/upvote/undo 2.2
comments/{id}/upvote 2.2
comments/{id}/delete 2.1
comments/{id}/edit 2.1
posts/{id}/comments/add 2.1
questions/{ids}/comments
users/{ids}/comments
users/{ids}/comments/{toid}
users/{ids}/mentioned
me/comments
me/comments/{toid}
me/mentioned
articles/{ids}/comments
comments
comments/{ids}
posts/{ids}/comments
posts/{id}/comments/render 2.2
comments/{id}/flags/add 2.2
comments/{id}/upvote/undo 2.2
comments/{id}/upvote 2.2
comments/{id}/delete 2.1
comments/{id}/edit 2.1
posts/{id}/comments/add 2.1
questions/{ids}/comments
users/{ids}/comments
users/{ids}/comments/{toid}
users/{ids}/mentioned
me/comments
me/comments/{toid}
me/mentioned
about blog terms of use contact us feedback always welcome
site design / logo © 2025 Stack Exchange, Inc; user contributions licensed under CC BY-SA