Tutorial
How to Scrape Product Hunt Launches
Learn how to scrape Product Hunt product launches, upvotes, and maker data using Python and the Product Hunt API.
Product Hunt is the go-to source for tracking new product launches, startup trends, and technology adoption. Here is how to extract its data.
Method 1: Product Hunt GraphQL API
Product Hunt offers a GraphQL API. Get an API token at https://api.producthunt.com/v2/docs.
import requests
API_TOKEN = "YOUR_PRODUCTHUNT_TOKEN"
ENDPOINT = "https://api.producthunt.com/v2/api/graphql"
headers = {
"Authorization": f"Bearer {API_TOKEN}",
"Content-Type": "application/json"
}
def get_daily_posts(date="2026-04-20", limit=20):
query = """
query {
posts(order: VOTES, postedAfter: "%s", first: %d) {
edges {
node {
name
tagline
votesCount
commentsCount
url
website
topics {
edges {
node {
name
}
}
}
}
}
}
}
""" % (f"{date}T00:00:00Z", limit)
response = requests.post(ENDPOINT, json={"query": query}, headers=headers)
data = response.json()
posts = []
for edge in data["data"]["posts"]["edges"]:
node = edge["node"]
posts.append({
"name": node["name"],
"tagline": node["tagline"],
"votes": node["votesCount"],
"comments": node["commentsCount"],
"url": node["url"],
"website": node["website"],
"topics": [t["node"]["name"] for t in node["topics"]["edges"]]
})
return posts
posts = get_daily_posts()
for p in posts[:10]:
print(f"{p['name']} ({p['votes']} votes): {p['tagline']}")
Method 2: Web Scraping with ScraperAPI
For data not available through the API, scrape the website directly.
import requests
from bs4 import BeautifulSoup
import json
API_KEY = "YOUR_SCRAPERAPI_KEY"
response = requests.get(
"http://api.scraperapi.com",
params={
"api_key": API_KEY,
"url": "https://www.producthunt.com",
"render": "true"
}
)
soup = BeautifulSoup(response.text, "html.parser")
# Product Hunt uses Next.js - check for embedded data
next_data = soup.find("script", id="__NEXT_DATA__")
if next_data:
data = json.loads(next_data.string)
print(json.dumps(data, indent=2)[:1000])
Tracking Trending Topics
def get_trending_topics():
query = """
query {
topics(order: NEWEST, first: 20) {
edges {
node {
name
description
postsCount
followersCount
}
}
}
}
"""
response = requests.post(ENDPOINT, json={"query": query}, headers=headers)
data = response.json()
topics = []
for edge in data["data"]["topics"]["edges"]:
node = edge["node"]
topics.append({
"name": node["name"],
"posts": node["postsCount"],
"followers": node["followersCount"]
})
return topics
Building a Launch Tracker
import time
import json
def track_launches(interval_hours=24):
"""Check for new launches periodically."""
all_launches = []
posts = get_daily_posts(limit=50)
all_launches.extend(posts)
# Save to file
with open("product_hunt_launches.json", "w") as f:
json.dump(all_launches, f, indent=2)
print(f"Tracked {len(all_launches)} launches")
# Analyze trends
topic_counts = {}
for post in all_launches:
for topic in post.get("topics", []):
topic_counts[topic] = topic_counts.get(topic, 0) + 1
print("\nTop topics:")
for topic, count in sorted(topic_counts.items(), key=lambda x: -x[1])[:10]:
print(f" {topic}: {count} launches")
Key Notes
- The API has rate limits of 450 requests per 15 minutes
- Historical data beyond 2 years may require web scraping
- Product Hunt data is excellent for identifying emerging SaaS trends and startup opportunities