๐Posts โ Docs
The posts endpoint offers 200 blog posts with titles, body text, tags, views, and reaction counts โ useful for prototyping social or blog-style UIs.
Base URL: https://dummyapi-backend.onrender.com/api
GET https://dummyapi-backend.onrender.com/api/posts
?limit?skip
fetch('https://dummyapi-backend.onrender.com/api/posts').then(res => res.json()).then(console.log);
GET https://dummyapi-backend.onrender.com/api/posts/:id
fetch('https://dummyapi-backend.onrender.com/api/posts/:id').then(res => res.json()).then(console.log);
GET https://dummyapi-backend.onrender.com/api/posts/search?q=
fetch('https://dummyapi-backend.onrender.com/api/posts/search?q=').then(res => res.json()).then(console.log);
GET https://dummyapi-backend.onrender.com/api/posts/user/:id
fetch('https://dummyapi-backend.onrender.com/api/posts/user/:id').then(res => res.json()).then(console.log);
GET https://dummyapi-backend.onrender.com/api/posts/:id/comments
fetch('https://dummyapi-backend.onrender.com/api/posts/:id/comments').then(res => res.json()).then(console.log);
GET https://dummyapi-backend.onrender.com/api/posts
fetch('https://dummyapi-backend.onrender.com/api/posts', {method: 'POST',headers: { 'Content-Type': 'application/json' },body: JSON.stringify({})}).then(res => res.json()).then(console.log);
GET https://dummyapi-backend.onrender.com/api/posts/:id
fetch('https://dummyapi-backend.onrender.com/api/posts/:id', {method: 'PUT',headers: { 'Content-Type': 'application/json' },body: JSON.stringify({})}).then(res => res.json()).then(console.log);
GET https://dummyapi-backend.onrender.com/api/posts/:id
fetch('https://dummyapi-backend.onrender.com/api/posts/:id', {method: 'DELETE',headers: { 'Content-Type': 'application/json' },body: JSON.stringify({})}).then(res => res.json()).then(console.log);