{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/insightsocial-app/json-schema/insightsocial-app-post-page-schema.json",
  "title": "PostPage",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/insightsocial-app-openapi.json#/components/schemas/PostPage",
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "post": {
            "$ref": "#/$defs/Post"
          }
        },
        "required": [
          "post"
        ],
        "additionalProperties": false
      }
    },
    "total": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        {
          "type": "null"
        }
      ],
      "description": "A count. null when the platform does not expose it; 0 only when it is really zero."
    },
    "truncated": {
      "type": [
        "boolean",
        "null"
      ]
    },
    "ext": {
      "anyOf": [
        {
          "type": "object",
          "propertyNames": {
            "type": "string",
            "pattern": "^[a-z0-9]+(?:_[a-z0-9]+)*$"
          },
          "additionalProperties": {
            "$ref": "#/$defs/JsonValue"
          }
        },
        {
          "type": "null"
        }
      ],
      "description": "Platform-specific fields, snake_case. The key list per platform is in the docs."
    }
  },
  "required": [
    "items",
    "total",
    "truncated"
  ],
  "additionalProperties": false,
  "$defs": {
    "Author": {
      "type": "object",
      "properties": {
        "id": {
          "anyOf": [
            {
              "type": "string",
              "minLength": 1,
              "description": "An identifier, always a string. Never parse it as a number: several platforms use ids above 2^53."
            },
            {
              "type": "null"
            }
          ]
        },
        "username": {
          "type": [
            "string",
            "null"
          ]
        },
        "display_name": {
          "type": [
            "string",
            "null"
          ]
        },
        "avatar_url": {
          "anyOf": [
            {
              "type": "string",
              "minLength": 1,
              "format": "uri"
            },
            {
              "type": "null"
            }
          ]
        },
        "verified": {
          "type": [
            "boolean",
            "null"
          ]
        }
      },
      "required": [
        "id",
        "username",
        "display_name",
        "avatar_url",
        "verified"
      ],
      "additionalProperties": false
    },
    "JsonValue": {
      "description": "Any JSON value."
    },
    "Post": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1,
          "description": "An identifier, always a string. Never parse it as a number: several platforms use ids above 2^53."
        },
        "url": {
          "anyOf": [
            {
              "type": "string",
              "minLength": 1,
              "format": "uri"
            },
            {
              "type": "null"
            }
          ]
        },
        "kind": {
          "anyOf": [
            {
              "type": "string",
              "minLength": 1,
              "description": "The format of the post. Format words only, never a platform name. short = short-form vertical video (a reel, a TikTok, a YouTube Short).",
              "x-extensible-enum": [
                "text",
                "image",
                "carousel",
                "video",
                "short",
                "live",
                "article",
                "link"
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "content": {
          "type": "object",
          "properties": {
            "text": {
              "type": [
                "string",
                "null"
              ]
            },
            "media_urls": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "format": "uri"
                  }
                },
                {
                  "type": "null"
                }
              ]
            },
            "thumbnail_url": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "format": "uri"
                },
                {
                  "type": "null"
                }
              ]
            },
            "duration_seconds": {
              "anyOf": [
                {
                  "type": "number",
                  "minimum": 0
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "text",
            "media_urls",
            "thumbnail_url",
            "duration_seconds"
          ],
          "additionalProperties": false
        },
        "author": {
          "$ref": "#/$defs/Author"
        },
        "engagement": {
          "type": "object",
          "properties": {
            "views": {
              "anyOf": [
                {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                {
                  "type": "null"
                }
              ],
              "description": "A count. null when the platform does not expose it; 0 only when it is really zero."
            },
            "likes": {
              "anyOf": [
                {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                {
                  "type": "null"
                }
              ],
              "description": "A count. null when the platform does not expose it; 0 only when it is really zero."
            },
            "comments": {
              "anyOf": [
                {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                {
                  "type": "null"
                }
              ],
              "description": "A count. null when the platform does not expose it; 0 only when it is really zero."
            },
            "shares": {
              "anyOf": [
                {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                {
                  "type": "null"
                }
              ],
              "description": "A count. null when the platform does not expose it; 0 only when it is really zero."
            },
            "saves": {
              "anyOf": [
                {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                {
                  "type": "null"
                }
              ],
              "description": "A count. null when the platform does not expose it; 0 only when it is really zero."
            }
          },
          "required": [
            "views",
            "likes",
            "comments",
            "shares",
            "saves"
          ],
          "additionalProperties": false
        },
        "flags": {
          "type": "object",
          "properties": {
            "nsfw": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "spoiler": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "pinned": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "deleted": {
              "type": "boolean"
            },
            "likes_hidden": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "comments_hidden": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "shares_hidden": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "views_hidden": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "saves_hidden": {
              "type": [
                "boolean",
                "null"
              ]
            }
          },
          "required": [
            "nsfw",
            "spoiler",
            "pinned",
            "deleted",
            "likes_hidden",
            "comments_hidden",
            "shares_hidden",
            "views_hidden",
            "saves_hidden"
          ],
          "additionalProperties": false
        },
        "published_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
              "description": "ISO-8601 timestamp in UTC, ending in Z."
            },
            {
              "type": "null"
            }
          ]
        },
        "language": {
          "anyOf": [
            {
              "type": "string",
              "minLength": 2,
              "description": "The content's language as the platform states it, e.g. en, pt-BR. Detected languages come later (§7.1)."
            },
            {
              "type": "null"
            }
          ]
        },
        "ext": {
          "anyOf": [
            {
              "type": "object",
              "propertyNames": {
                "type": "string",
                "pattern": "^[a-z0-9]+(?:_[a-z0-9]+)*$"
              },
              "additionalProperties": {
                "$ref": "#/$defs/JsonValue"
              }
            },
            {
              "type": "null"
            }
          ],
          "description": "Platform-specific fields, snake_case. The key list per platform is in the docs."
        }
      },
      "required": [
        "id",
        "url",
        "kind",
        "content",
        "author",
        "engagement",
        "flags",
        "published_at",
        "language",
        "ext"
      ],
      "additionalProperties": false
    }
  }
}