User comment on a post or content item with author information, content, engagement metrics, and timestamps. Used for social media platforms, blogs, forums, and content discussion systems.
https://api.mockly.codes/comments?page=1&limit=10&count=10Configure your request and click Send Request to see the response here.
/commentsGet a collection of comments
/social/comments/comments/:idGet a single comment by ID
/social/comments/:id/comments/metaGet resource metadata and schema
/social/comments/metaThe search feature allows you to filter results by searching for text across all or specific fields. Choose between ?q= or ?search= parameter names.
Search across all text fields:
GET https://api.mockly.codes/comments?q=laptopGET https://api.mockly.codes/comments?q=laptop&search_fields=name,descriptionsearch_fields, all text fields are searched// Get 10 comments
fetch('https://api.mockly.codes/comments?count=10')
.then(res => res.json())
.then(data => console.log(data));import requests
response = requests.get(
'https://api.mockly.codes/comments?count=10'
)
data = response.json()curl "https://api.mockly.codes/comments?count=10"fetch('https://api.mockly.codes/comments?nocache=true')idintegerrequiredUnique identifier
random_intpost_idintegerrequiredForeign key reference to the post or content item this comment is on
random_intuser_idintegerrequiredForeign key reference to the user who wrote the comment
random_intbodystringrequiredText content of the comment
paragraphcreated_atstringTimestamp when the comment was created
past_datedate-timelikesintegerNumber of likes or positive reactions the comment has received
random_intcountintegerNumber of items to return (default: 10, max: 100)
seedintegerSeed for reproducible data generation
nocachebooleanBypass cache and generate fresh data on every request