Product Hunt Comments API
Comment threads on one post, ordered by score, each with up to 20 replies and the thread reply count.
GET /v1/product-hunt/posts/{slug}/comments1 credit Failed requests are free
About this endpoint
GET /v1/product-hunt/posts/{slug}/comments returns data.comments, data.postSlug, data.totalCount and data.page. Each comment has id, bodyText, createdAt, votesCount, repliesCount, repliesHasMore, user and replies. The user object carries username and name. Each reply has id, bodyText, createdAt, votesCount and user.
The route pages up to 20 comment threads at a time and orders them by score. replies holds up to 20 replies; repliesCount is the thread total and repliesHasMore says whether more exist. A slug with no public post is not_found; a found post with no comments is found with an empty comments list.
Product Hunt Comments API FAQ
Does replies contain every reply?
Each comment carries up to 20 replies in replies. repliesCount is the thread total and repliesHasMore is true when the thread has more replies than the 20 returned.
How do I read the next page of comments?
When data.page.hasMore is true, send data.page.nextCursor as the cursor query parameter. The cursor is tied to the post slug, so do not reuse it for another post.
What does totalCount count?
totalCount counts top-level comment threads, not replies and not the size of the current page. A post's commentsCount is a different figure: it includes replies.
How do I tell a missing post from a post with no comments?
Check data.lookupStatus. A slug with no public post is not_found. A found post with no comment threads is found with comments: [].
How much does it cost?
Pricing is documented on the operation in the API registry (shown on this page). Confirm on every response with meta.creditsCharged: that field is the billing source of truth. Each paginated page is a separate billed request.
Other Product Hunt endpoints
- PostsGET /v1/product-hunt/posts
- PostGET /v1/product-hunt/posts/{slug}
- ProductGET /v1/product-hunt/products/{slug}
- ReviewsGET /v1/product-hunt/products/{slug}/reviews
- UserGET /v1/product-hunt/users/{username}
- User postsGET /v1/product-hunt/users/{username}/posts
- SearchGET /v1/product-hunt/search
- LaunchesGET /v1/product-hunt/launches