Content

Social Media Post JSON Example

Social media post JSON example with author, content, media, reactions, and comments. Covers tweet, feed post, and poll formats used by social platforms.

{
  "id": "post_7Kx9mP2nQ4",
  "type": "post",
  "author": {
    "id": "usr_4Mn8pL2qZ6",
    "username": "ravimehta",
    "displayName": "Ravi Mehta",
    "avatar": "https://cdn.example.com/avatars/ravi.jpg",
    "verified": false
  },
  "content": {
    "text": "Just published a deep-dive on JSON API design patterns. Thread below 👇",
    "language": "en",
    "mentions": [
      "@priyashah"
    ],
    "hashtags": [
      "#api",
      "#json",
      "#webdev"
    ],
    "links": [
      {
        "url": "https://jsonkit.in/blog/api-design",
        "title": "JSON API Design Patterns"
      }
    ]
  },
  "media": [
    {
      "type": "image",
      "url": "https://cdn.example.com/posts/api-design.jpg",
      "alt": "API design diagram",
      "width": 1200,
      "height": 630
    }
  ],
  "engagement": {
    "likes": 248,
    "reposts": 34,
    "replies": 12,
    "views": 5820,
    "bookmarks": 87
  },
  "visibility": "public",
  "createdAt": "2025-05-24T08:00:00Z",
  "editedAt": null
}

Field Reference

typerequiredstringPost format: post, reply, repost, story, poll.
content.textrequiredstringPlain text body. Store separately from HTML render — convert to HTML on the client for display.
content.mentionsoptionalarray<string>Usernames mentioned with @. Store as array for efficient notification fan-out.
content.hashtagsoptionalarray<string>Hashtags extracted from the text. Used for search indexing and trending topics.
engagement.viewsoptionalintegerImpression count. Update asynchronously — do not block post creation on view tracking.
visibilityrequiredstringWho can see the post: public, followers, private.

Variants

ReplyReply to another post in a thread.
{
  "id": "post_3Lp2sN8mK1",
  "type": "reply",
  "replyTo": {
    "id": "post_7Kx9mP2nQ4",
    "author": "ravimehta"
  },
  "author": {
    "username": "priyashah",
    "displayName": "Priya Shah"
  },
  "content": {
    "text": "Great thread! The error handling section is especially useful."
  },
  "engagement": {
    "likes": 12,
    "replies": 2
  },
  "createdAt": "2025-05-24T08:15:00Z"
}
PollPost with a multiple-choice poll.
{
  "id": "post_poll_001",
  "type": "poll",
  "author": {
    "username": "ravimehta"
  },
  "content": {
    "text": "Which JSON library do you use most?"
  },
  "poll": {
    "options": [
      {
        "id": 1,
        "text": "JSON.parse / JSON.stringify",
        "votes": 1240
      },
      {
        "id": 2,
        "text": "zod",
        "votes": 892
      },
      {
        "id": 3,
        "text": "ajv",
        "votes": 347
      }
    ],
    "totalVotes": 2479,
    "endsAt": "2025-05-27T08:00:00Z",
    "userVoted": null
  },
  "createdAt": "2025-05-24T10:00:00Z"
}

Common Use Cases

  • Social feed API response for timeline or explore pages
  • Activity stream for in-app notification systems
  • Content moderation queue item data model
socialfeedpostmediaengagement

Validate or format this JSON

One click loads this exact example into the tool — no copy-paste needed. Format it, validate it, explore the tree, or generate TypeScript types instantly.

Frequently Asked Questions

Add an editedAt timestamp. The content field always holds the current version. Store edit history separately if audit trails are needed. Never silently overwrite the original — users and moderators need to see what changed.

Store counts as integers directly on the post for fast reads. Update them asynchronously via a counter table or cache — do not COUNT rows on every read. Accept that counts may be a few seconds behind the truth.

Set a deleted: true flag and replace content.text with a placeholder like '[deleted]'. Do not remove the document — doing so breaks reply threads and all references by ID.

Related JSON Examples