Product Hunt API

📋 Go to the Product Hunt API documentation →

Retrieving the data

First of all, we want to retrieve the top posts by requesting the Product Hunt API: only GET requests will be made to the API, which implies that a read access is more than enough. To get this access, you have to claim a Client Token by creating an account on the site and making the claim.

Once the Token Client is retrieved, it is now possible to request the API which is based on GraphQL. To retrieve the data we are interested in, the request must look like this:

query { 
  posts(order: VOTES, first: 20) {
    edges {
      node {
        name,
        createdAt,
        votesCount,
        reviewsRating,
        tagline,
        description,
        url
      }
    }
  }
}

Limitations

It is possible for each GET request to retrieve information from up to 20 posts. There is no other choice but to make several GET requests using a Cursor to retrieve a larger number of posts.

Another limitation is that the API contains a Rate Limit, which blocks requests for 15 minutes when a significant amount of data has been retrieved.

It is therefore possible from the data that we retrieve to have a little more than 500 posts every 15 minutes. A single wave of requests to retrieve 500 posts will be more than enough to set up the project.