MockData.ir

Comments

LIVE

Comments on posts with name, email, and body. Filter by postId.

Endpoints

Query params

ParamDescriptionExample
searchName, email, or bodysearch=thanks
postIdFilter by post UUIDpostId=…
sortcreatedAt · namesort=name
pagePage number · default 1page=2
limitPage size · default 12 · max 50limit=12
orderasc · descorder=asc
langPass fa for Persian text · omit for English (default)lang=fa
delayArtificial wait in ms · max 5000delay=800
statusForce error HTTP status · 400–599status=500

Persian text: add lang=fa. See Docs · Language.

Request
1const { data } = await axios.get('/api/comments', { params: { limit: 12 } });
Response
1{2  "data": [3    {4      "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",5      "postId": "7c9e6679-7425-40de-944b-e07fc1f90ae7",6      "name": "Alex Rivera",7      "email": "alex@example.com",8      "body": "Nice post — thanks for sharing.",9      "createdAt": "2026-09-14T10:00:00.000Z",10      "updatedAt": "2026-09-14T10:00:00.000Z"11    }12  ],13  "pagination": {14    "page": 1,15    "limit": 12,16    "total": 24,17    "totalPages": 218  }19}