{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/reddit/json-schema/reddit-oembed-response-schema.json",
  "title": "OEmbedResponse",
  "description": "An oEmbed response containing embed HTML and metadata, conforming to the oEmbed specification.",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/reddit-o-embed-api-openapi.yml#/components/schemas/OEmbedResponse",
  "type": "object",
  "required": [
    "type",
    "version"
  ],
  "properties": {
    "type": {
      "type": "string",
      "description": "The oEmbed resource type. Reddit embeds are always of type rich, providing HTML for rendering.",
      "enum": [
        "rich"
      ]
    },
    "version": {
      "type": "string",
      "description": "The oEmbed version number.",
      "enum": [
        "1.0"
      ]
    },
    "title": {
      "type": "string",
      "description": "The title of the Reddit post or comment being embedded."
    },
    "author_name": {
      "type": "string",
      "description": "The Reddit username of the content author."
    },
    "author_url": {
      "type": "string",
      "format": "uri",
      "description": "The URL of the author's Reddit profile."
    },
    "provider_name": {
      "type": "string",
      "description": "The name of the content provider, always Reddit.",
      "enum": [
        "reddit"
      ]
    },
    "provider_url": {
      "type": "string",
      "format": "uri",
      "description": "The URL of the content provider.",
      "enum": [
        "https://www.reddit.com/"
      ]
    },
    "html": {
      "type": "string",
      "description": "The HTML code for the embed. Contains an iframe or script tag that renders the Reddit content."
    },
    "width": {
      "type": "integer",
      "description": "The width of the embed in pixels."
    },
    "height": {
      "type": "integer",
      "description": "The height of the embed in pixels."
    },
    "thumbnail_url": {
      "type": "string",
      "format": "uri",
      "description": "The URL of a thumbnail image for the content, if available."
    },
    "thumbnail_width": {
      "type": "integer",
      "description": "The width of the thumbnail image in pixels."
    },
    "thumbnail_height": {
      "type": "integer",
      "description": "The height of the thumbnail image in pixels."
    },
    "cache_age": {
      "type": "integer",
      "description": "The suggested cache lifetime for the embed data in seconds."
    }
  }
}