Product Hunt hub

Product Hunt Topic Posts API

The posts of one topic, ordered and cursor-paged.

GET /v1/product-hunt/topics/{slug}/posts

1 credit Failed requests are free

About this endpoint

GET /v1/product-hunt/topics/{slug}/posts returns data.posts, data.topic, data.order, data.totalCount and data.page. Each post is the lean post record, with id, slug, name, tagline, votes, ranks, comment count, up to 10 topics and the product when it has one.

The order parameter accepts VOTES (the default), SCORE, DAILY_RANK, WEEKLY_RANK, MONTHLY_RANK and YEARLY_RANK. Pages hold up to 20 posts. A topic alias such as iphone is resolved to its canonical slug (ios) and data.topic reports it. When the post list is empty, the route checks the topic itself: a missing topic is lookupStatus: not_found, while a real topic with no posts is found with an empty list. Posts-based lists stop at the first 5,000 rows and set page.truncated: true, so totalCount can be larger than the reachable rows.

Product Hunt Topic Posts API FAQ

Which order should I use?

VOTES is the default. SCORE and the four rank orders are also accepted. The response echoes the order it used in data.order.

How do I page the topic's posts?

When data.page.hasMore is true, send data.page.nextCursor as cursor with the same topic and order. A cursor is tied to both. If page.truncated is true, more rows exist but none are available past offset 5,000, so there is no next cursor.

How do I tell a missing topic from an empty one?

Check data.lookupStatus. The route checks the topic when the post list is empty, so a missing topic returns not_found and a real topic with no posts returns found with posts: [].

Does totalCount count all posts or this page?

totalCount is how many posts the topic has, not how many are on the current page. It can exceed the 5,000 rows that are reachable; page.truncated marks that cut.

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.