Social

Social Media Post JSON Example

A JSON example for a social media post — includes author, content, media attachments, engagement metrics, and hashtags. Copy-ready for social platform APIs and content feeds.

{
  "id": "post_8vKqNmTr5j",
  "author": {
    "id": "usr_9k2mXpQr4t",
    "username": "ravi.mehta",
    "displayName": "Ravi Mehta",
    "avatarUrl": "https://cdn.example.com/avatars/usr_9k2mXpQr4t.jpg",
    "isVerified": false,
    "followerCount": 1243
  },
  "content": {
    "text": "Just deployed our new JSON API — response times dropped by 40% after switching to fast-json-stringify! #webdev #nodejs #api",
    "lang": "en",
    "truncated": false
  },
  "media": [
    {
      "id": "media_001",
      "type": "image",
      "url": "https://cdn.example.com/posts/post_8vKqNmTr5j_img1.jpg",
      "width": 1200,
      "height": 630,
      "altText": "API performance dashboard showing improved response times"
    }
  ],
  "hashtags": [
    "webdev",
    "nodejs",
    "api"
  ],
  "mentions": [],
  "engagement": {
    "likes": 142,
    "comments": 18,
    "reposts": 34,
    "bookmarks": 27,
    "views": 4820
  },
  "visibility": "public",
  "isEdited": false,
  "createdAt": "2025-06-01T10:30:00Z",
  "updatedAt": "2025-06-01T10:30:00Z"
}

Field Reference

idrequiredstringUnique post identifier with post_ prefix
authorrequiredobjectEmbedded author snapshot at time of post — use ID + separate lookup for live profile data
content.textrequiredstringPost text content, up to platform character limit
mediaoptionalarrayAttached images, videos, or GIFs
hashtagsoptionalarrayExtracted hashtags from text content for indexing
engagementoptionalobjectCounters for likes, comments, reposts — these change frequently; cache separately
visibilityrequiredstringAccess control: public, followers-only, or private

Variants

Video PostPost with a video attachment and transcript.
{
  "id": "post_Vx9qRmLn2k",
  "author": {
    "id": "usr_9k2mXpQr4t",
    "username": "ravi.mehta",
    "displayName": "Ravi Mehta"
  },
  "content": {
    "text": "Quick tutorial: How to stream large JSON files in Node.js",
    "lang": "en"
  },
  "media": [
    {
      "id": "media_002",
      "type": "video",
      "url": "https://cdn.example.com/videos/stream-json.mp4",
      "thumbnailUrl": "https://cdn.example.com/thumbnails/stream-json.jpg",
      "durationSeconds": 187,
      "width": 1920,
      "height": 1080
    }
  ],
  "hashtags": [
    "nodejs",
    "tutorial"
  ],
  "engagement": {
    "likes": 89,
    "comments": 12,
    "reposts": 22,
    "views": 2100
  },
  "visibility": "public",
  "createdAt": "2025-06-02T14:00:00Z"
}

Common Use Cases

  • Building a social feed with infinite scroll pagination
  • Storing posts in a document database like MongoDB or DynamoDB
  • Indexing post content in Elasticsearch for full-text search
socialpostfeedengagementcontent

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

For low-traffic apps, embedding is simpler. For high-traffic feeds, store engagement counters in a separate cache (Redis) and merge them on the way out. Engagement changes much more frequently than post content, so mixing them breaks your cache hit rate.

Add an 'isEdited' boolean and an 'editedAt' timestamp. For full edit history, maintain a separate 'revisions' collection with each saved version. Most platforms show only the current version with an 'edited' badge.

Related JSON Examples