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

typestringrequiredPost format: post, reply, repost, story, poll.
content.textstringrequiredPlain text body. Store separately from HTML render β€” convert to HTML on the client for display.
content.mentionsarray<string>optionalUsernames mentioned with @. Store as array for efficient notification fan-out.
content.hashtagsarray<string>optionalHashtags extracted from the text. Used for search indexing and trending topics.
engagement.viewsintegeroptionalImpression count. Update asynchronously β€” do not block post creation on view tracking.
visibilitystringrequiredWho 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

Paste the example above into JSONKit's tools to validate, minify, or explore the structure interactively.

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