Free Comments & Reviews API — Mock REST API for Testing & Development
Simulates blog and product comments, threaded replies, moderation flags, and rating submissions with full CRUD capabilities.
Interactive Live API Explorer
/api/comments
Create new comment or review with rating.
/api/comments/{resourceId}
Get comments for resource with threading and pagination. Replace {resourceId} with an actual ID.
Replace placeholders (e.g., {userId}) with actual values in the path above. You can also add/edit query parameters (e.g., ?key=value).
/api/comments/{commentId}/moderate
Moderate comment - approve, reject, or flag. Replace {commentId} with an actual ID.
Replace placeholders (e.g., {userId}) with actual values in the path above.
Code Integration Examples
// Free Comments & Reviews API - JavaScript Fetch Example
async function fetchCommentsReviewsAPI() {
try {
const response = await fetch('https://gen-endpoint.com/api/comments', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
"resourceType": "post",
"resourceId": "post_123",
"content": "Great article! Very helpful.",
"rating": 5,
"parentId": null
}),
});
if (!response.ok) {
throw new Error(`HTTP error! status: ${response.status}`);
}
const data = await response.json();
console.log('Success:', data);
return data;
} catch (error) {
console.error('Fetch error:', error);
}
}
fetchCommentsReviewsAPI();Sample JSON Response
{
"id": "comment_456",
"content": "Great article! Very helpful.",
"author": {"id": "usr_2", "name": "Bob Builder"},
"rating": 5,
"status": "pending_moderation",
"createdAt": "2024-08-16T12:00:00Z"
}Common Developer Use Cases
Testing comment feed components and reply nesting.
Prototyping star rating submission forms.
Related Free REST APIs
Blog & CMS API
Manage blog posts, categories, tags, content publishing, and SEO metadata.
User Management API
A comprehensive API for managing user accounts, including CRUD operations.
Notification System API
Send emails, SMS, and push notifications with template support and delivery tracking.
Frequently Asked Questions
Can I test nested replies?
Yes, comment objects include parentId references to simulate threaded conversations.