Stack Exchange · Schema

Comment

A comment attached to a question or answer.

Q And ADeveloper CommunityKnowledge GraphStack OverflowStack ExchangeReputationTagsCommunityMCPAI Grounding

Properties

Name Type Description
comment_id integer
post_id integer
post_type string
score integer
body string
body_markdown string
creation_date integer
edited boolean
link string
owner object Lightweight user reference embedded in posts and comments.
reply_to_user object Lightweight user reference embedded in posts and comments.
content_license string
View JSON Schema on GitHub

JSON Schema

stackexchange-api-v2-3-comment-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Comment",
  "description": "A comment attached to a question or answer.",
  "$id": "https://raw.githubusercontent.com/api-evangelist/stackexchange/refs/heads/main/json-schema/stackexchange-api-v2-3-comment-schema.json",
  "type": "object",
  "properties": {
    "comment_id": {
      "type": "integer",
      "example": 14587302
    },
    "post_id": {
      "type": "integer",
      "example": 11227809
    },
    "post_type": {
      "type": "string",
      "enum": [
        "question",
        "answer"
      ],
      "example": "question"
    },
    "score": {
      "type": "integer",
      "example": 12
    },
    "body": {
      "type": "string",
      "example": "Great explanation, thank you."
    },
    "body_markdown": {
      "type": "string"
    },
    "creation_date": {
      "type": "integer",
      "format": "int64",
      "example": 1338800000
    },
    "edited": {
      "type": "boolean",
      "example": false
    },
    "link": {
      "type": "string",
      "format": "uri",
      "example": "https://stackoverflow.com/questions/11227809#comment14587302_11227809"
    },
    "owner": {
      "type": "object",
      "description": "Lightweight user reference embedded in posts and comments.",
      "properties": {
        "user_id": {
          "type": "integer",
          "format": "int64",
          "example": 22656
        },
        "user_type": {
          "type": "string",
          "enum": [
            "unregistered",
            "registered",
            "moderator",
            "team_admin",
            "does_not_exist"
          ],
          "example": "registered"
        },
        "display_name": {
          "type": "string",
          "example": "Jon Skeet"
        },
        "reputation": {
          "type": "integer",
          "example": 1500000
        },
        "profile_image": {
          "type": "string",
          "format": "uri",
          "example": "https://i.sstatic.net/lLZAr.jpg?s=128"
        },
        "link": {
          "type": "string",
          "format": "uri",
          "example": "https://stackoverflow.com/users/22656/jon-skeet"
        },
        "accept_rate": {
          "type": "integer",
          "example": 92
        }
      }
    },
    "reply_to_user": {
      "type": "object",
      "description": "Lightweight user reference embedded in posts and comments.",
      "properties": {
        "user_id": {
          "type": "integer",
          "format": "int64",
          "example": 22656
        },
        "user_type": {
          "type": "string",
          "enum": [
            "unregistered",
            "registered",
            "moderator",
            "team_admin",
            "does_not_exist"
          ],
          "example": "registered"
        },
        "display_name": {
          "type": "string",
          "example": "Jon Skeet"
        },
        "reputation": {
          "type": "integer",
          "example": 1500000
        },
        "profile_image": {
          "type": "string",
          "format": "uri",
          "example": "https://i.sstatic.net/lLZAr.jpg?s=128"
        },
        "link": {
          "type": "string",
          "format": "uri",
          "example": "https://stackoverflow.com/users/22656/jon-skeet"
        },
        "accept_rate": {
          "type": "integer",
          "example": 92
        }
      }
    },
    "content_license": {
      "type": "string",
      "example": "CC BY-SA 4.0"
    }
  }
}