Skip to main content
GET
/
:projectId
/
api
/
v7
/
entities
/
:entityId
/
top-comment
Fetch Top Comment
curl --request GET \
  --url https://api.replyke.com/api/v6/:projectId/api/v7/entities/:entityId/top-comment

Documentation Index

Fetch the complete documentation index at: https://docs.replyke.com/llms.txt

Use this file to discover all available pages before exploring further.

Returns the single comment with the most upvotes for the given entity. Useful for previewing the best comment alongside an entity in a feed. When multiple comments are tied, the oldest is returned. Returns null if the entity has no comments.

Path Parameters

entityId
string
required
The UUID of the entity.

Response

Returns a Comment object, or null if there are no comments.
null
or
{
  "id": "uuid",
  "content": "Great post!",
  "upvotes": ["userId1", "userId2"],
  ...
}