Stack Exchange · Schema

Question

A question on a Stack Exchange site.

Q And ADeveloper CommunityKnowledge GraphStack OverflowStack ExchangeReputationTagsCommunityMCPAI Grounding

Properties

Name Type Description
question_id integer
title string
body string HTML body of the question (only included via filter).
body_markdown string Markdown body of the question (only included via filter).
link string
score integer
view_count integer
answer_count integer
comment_count integer
favorite_count integer
is_answered boolean
accepted_answer_id integer
creation_date integer
last_activity_date integer
last_edit_date integer
owner object Lightweight user reference embedded in posts and comments.
tags array
content_license string
protected_date integer
locked_date integer
closed_date integer
closed_reason string
bounty_amount integer
bounty_closes_date integer
View JSON Schema on GitHub

JSON Schema

stackexchange-api-v2-3-question-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Question",
  "description": "A question on a Stack Exchange site.",
  "$id": "https://raw.githubusercontent.com/api-evangelist/stackexchange/refs/heads/main/json-schema/stackexchange-api-v2-3-question-schema.json",
  "type": "object",
  "properties": {
    "question_id": {
      "type": "integer",
      "example": 11227809
    },
    "title": {
      "type": "string",
      "example": "Why is processing a sorted array faster than processing an unsorted array?"
    },
    "body": {
      "type": "string",
      "description": "HTML body of the question (only included via filter)."
    },
    "body_markdown": {
      "type": "string",
      "description": "Markdown body of the question (only included via filter)."
    },
    "link": {
      "type": "string",
      "format": "uri",
      "example": "https://stackoverflow.com/questions/11227809"
    },
    "score": {
      "type": "integer",
      "example": 27000
    },
    "view_count": {
      "type": "integer",
      "example": 1900000
    },
    "answer_count": {
      "type": "integer",
      "example": 25
    },
    "comment_count": {
      "type": "integer",
      "example": 12
    },
    "favorite_count": {
      "type": "integer",
      "example": 4000
    },
    "is_answered": {
      "type": "boolean",
      "example": true
    },
    "accepted_answer_id": {
      "type": "integer",
      "example": 11227902
    },
    "creation_date": {
      "type": "integer",
      "format": "int64",
      "example": 1338717687
    },
    "last_activity_date": {
      "type": "integer",
      "format": "int64",
      "example": 1700000000
    },
    "last_edit_date": {
      "type": "integer",
      "format": "int64",
      "example": 1690000000
    },
    "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
        }
      }
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "example": [
        "java",
        "c++",
        "performance",
        "cpu-architecture",
        "branch-prediction"
      ]
    },
    "content_license": {
      "type": "string",
      "example": "CC BY-SA 4.0"
    },
    "protected_date": {
      "type": "integer",
      "format": "int64"
    },
    "locked_date": {
      "type": "integer",
      "format": "int64"
    },
    "closed_date": {
      "type": "integer",
      "format": "int64"
    },
    "closed_reason": {
      "type": "string"
    },
    "bounty_amount": {
      "type": "integer"
    },
    "bounty_closes_date": {
      "type": "integer",
      "format": "int64"
    }
  }
}