MockData.ir

Posts

LIVE

Blog-style mock posts with author userId, tags, and a published flag.

Endpoints

Query params

ParamDescriptionExample
pagePage number · default 1page=2
limitPage size · default 12 · max 50limit=12
searchTitle or bodysearch=api
userIdFilter by author UUIDuserId=…
publishedtrue · falsepublished=true
sortcreatedAt · titlesort=title
orderasc · descorder=asc
langPass fa for Persian text · omit for Englishlang=fa
delayArtificial wait in ms · max 5000delay=800
statusForce error HTTP status · 400–599status=500
Request
1import axios from 'axios';2 3const { data } = await axios.get('/api/posts', {4  params: { limit: 12 },5});6console.log(data.data, data.pagination);
Response
1{2  "data": [3    {4      "id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",5      "userId": "550e8400-e29b-41d4-a716-446655440000",6      "title": "Why fake APIs speed up frontend work",7      "body": "Mock endpoints let UI teams ship screens before the backend is ready.",8      "tags": ["dx", "frontend", "mock"],9      "published": true10    }11  ],12  "pagination": {13    "page": 1,14    "limit": 12,15    "total": 24,16    "totalPages": 217  }18}