producthunt
Scannednpx machina-cli add skill ReScienceLab/opc-skills/producthunt --openclawProductHunt Skill
Get posts, topics, users, and collections from Product Hunt via the official GraphQL API.
Prerequisites
Set access token in ~/.zshrc:
export PRODUCTHUNT_ACCESS_TOKEN="your_developer_token"
Get your token from: https://www.producthunt.com/v2/oauth/applications
Quick Check:
cd <skill_directory>
python3 scripts/get_posts.py --limit 3
Commands
All commands run from the skill directory.
Posts
python3 scripts/get_post.py chatgpt # Get post by slug
python3 scripts/get_post.py 12345 # Get post by ID
python3 scripts/get_posts.py --limit 20 # Today's featured posts
python3 scripts/get_posts.py --topic ai --limit 10 # Posts in topic
python3 scripts/get_posts.py --after 2026-01-01 # Posts after date
python3 scripts/get_post_comments.py POST_ID --limit 20
Topics
python3 scripts/get_topic.py artificial-intelligence # Get topic by slug
python3 scripts/get_topics.py --query "AI" --limit 20 # Search topics
python3 scripts/get_topics.py --limit 50 # Popular topics
Users
python3 scripts/get_user.py rrhoover # Get user by username
python3 scripts/get_user_posts.py rrhoover --limit 20 # User's posts
Collections
python3 scripts/get_collection.py SLUG_OR_ID # Get collection
python3 scripts/get_collections.py --featured --limit 20
API Info
- Endpoint: https://api.producthunt.com/v2/api/graphql
- Type: GraphQL
- Rate Limits: 6250 complexity points / 15 min
- Docs: https://api.producthunt.com/v2/docs
Source
git clone https://github.com/ReScienceLab/opc-skills/blob/main/skills/producthunt/SKILL.mdView on GitHub Overview
Product Hunt Skill lets you search and retrieve content from Product Hunt, including posts, topics, users, and collections, via the official GraphQL API. This capability enables quick access to launches and community-curated content for analysis and integration.
How This Skill Works
The skill authenticates with a developer token stored in ~/.zshrc and uses the GraphQL endpoint at https://api.producthunt.com/v2/api/graphql to fetch posts, topics, users, and collections through the provided scripts. It supports retrieving by slug or ID and can filter results by topic, limit, or date.
When to Use It
- When you want the latest Product Hunt posts or product launches by topic.
- When you need a specific post by slug or by numeric ID.
- When surveying topics, collections, or user activity for research or competitive analysis.
- When filtering posts by topic, slug, or date range for targeted insights.
- When integrating PH data into dashboards or workflows via the command-line scripts.
Quick Start
- Step 1: Set your access token in ~/.zshrc: export PRODUCTHUNT_ACCESS_TOKEN="your_developer_token"
- Step 2: Source your shell or restart the terminal to apply changes
- Step 3: Run a sample command, e.g., python3 scripts/get_posts.py --limit 3
Best Practices
- Set and verify your Product Hunt access token in ~/.zshrc (export PRODUCTHUNT_ACCESS_TOKEN="your_developer_token").
- Prefer using slug or ID when targeting a specific post to ensure accuracy.
- Use --limit to paginate results and avoid large, heavy responses.
- Mind the rate limits (6250 complexity points / 15 minutes) and implement basic caching for repeated queries.
- Consult the official API docs (https://api.producthunt.com/v2/docs) for GraphQL schema details.
Example Use Cases
- python3 scripts/get_post.py chatgpt
- python3 scripts/get_post.py 12345
- python3 scripts/get_posts.py --topic ai --limit 10
- python3 scripts/get_user.py rrhoover
- python3 scripts/get_collection.py SLUG_OR_ID