
Scraping Product Hunt: Finding New Tools Before They Go Viral
Product Hunt is the ultimate launchpad for tech products. Scraping it lets you identify trending tools early, analyze launch patterns, and build competitive intelligence. Using Product Hunt's GraphQL API import requests from datetime import datetime class PHScraper : def __init__ ( self , token ): self . url = ' https://api.producthunt.com/v2/api/graphql ' self . headers = { ' Authorization ' : f ' Bearer { token } ' , ' Content-Type ' : ' application/json ' } def get_posts ( self , date = None ): if not date : date = datetime . now (). strftime ( ' %Y-%m-%d ' ) query = ''' query { posts(postedAfter: " START " , postedBefore: " END " , first: 50) { edges { node { id name tagline votesCount commentsCount website url topics { edges { node { name } } } makers { name username } } } } } ''' . replace ( ' START ' , f ' { date } T00:00:00Z ' ). replace ( ' END ' , f ' { date } T23:59:59Z ' ) resp = requests . post ( self . url , headers = self . headers , json = { ' query ' : query }) data =
Continue reading on Dev.to Tutorial
Opens in a new tab


![[MM’s] Boot Notes — The Day Zero Blueprint — Test Smarter on Day One](/_next/image?url=https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F1368%2F1*AvVpFzkFJBm-xns4niPLAA.png&w=1200&q=75)

