producthunt
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseProductHunt Skill
ProductHunt Skill
Get posts, topics, users, and collections from Product Hunt via the official GraphQL API.
从Product Hunt通过官方GraphQL API获取帖子、话题、用户和合集。
Prerequisites
前提条件
Set access token in :
~/.zshrcbash
export PRODUCTHUNT_ACCESS_TOKEN="your_developer_token"Get your token from: https://www.producthunt.com/v2/oauth/applications
Quick Check:
bash
cd <skill_directory>
python3 scripts/get_posts.py --limit 3在中设置访问令牌:
~/.zshrcbash
export PRODUCTHUNT_ACCESS_TOKEN="your_developer_token"快速检查:
bash
cd <skill_directory>
python3 scripts/get_posts.py --limit 3Commands
命令
All commands run from the skill directory.
所有命令均在skill目录下运行。
Posts
帖子
bash
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 20bash
python3 scripts/get_post.py chatgpt # 通过slug获取帖子
python3 scripts/get_post.py 12345 # 通过ID获取帖子
python3 scripts/get_posts.py --limit 20 # 今日精选帖子
python3 scripts/get_posts.py --topic ai --limit 10 # 话题下的帖子
python3 scripts/get_posts.py --after 2026-01-01 # 指定日期之后的帖子
python3 scripts/get_post_comments.py POST_ID --limit 20Topics
话题
bash
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 topicsbash
python3 scripts/get_topic.py artificial-intelligence # 通过slug获取话题
python3 scripts/get_topics.py --query "AI" --limit 20 # 搜索话题
python3 scripts/get_topics.py --limit 50 # 热门话题Users
用户
bash
python3 scripts/get_user.py rrhoover # Get user by username
python3 scripts/get_user_posts.py rrhoover --limit 20 # User's postsbash
python3 scripts/get_user.py rrhoover # 通过用户名获取用户
python3 scripts/get_user_posts.py rrhoover --limit 20 # 用户发布的帖子Collections
合集
bash
python3 scripts/get_collection.py SLUG_OR_ID # Get collection
python3 scripts/get_collections.py --featured --limit 20bash
python3 scripts/get_collection.py SLUG_OR_ID # 获取合集
python3 scripts/get_collections.py --featured --limit 20API Info
API信息
- Endpoint: https://api.producthunt.com/v2/api/graphql
- Type: GraphQL
- Rate Limits: 6250 complexity points / 15 min
- Docs: https://api.producthunt.com/v2/docs
- 端点: https://api.producthunt.com/v2/api/graphql
- 类型: GraphQL
- 速率限制: 6250复杂度点数 / 15分钟
- 文档: https://api.producthunt.com/v2/docs