producthunt

producthunt

熱門

搜尋並擷取 Product Hunt 的內容。透過 GraphQL API 取得貼文、主題、使用者和收藏集。當使用者提到 Product Hunt、PH 或產品發表時使用。

1181星標
115分支
更新於 2026/7/29
SKILL.md
唯讀
名稱
producthunt
描述

搜尋並擷取 Product Hunt 的內容。透過 GraphQL API 取得貼文、主題、使用者和收藏集。當使用者提到 Product Hunt、PH 或產品發表時使用。

ProductHunt 技能

透過官方 GraphQL API 從 Product Hunt 取得貼文、主題、使用者和收藏集。

前置需求

~/.zshrc 中設定存取權杖:

export PRODUCTHUNT_ACCESS_TOKEN="your_developer_token"

從以下網址取得您的權杖:https://www.producthunt.com/v2/oauth/applications

快速檢查

cd <技能目錄>
python3 scripts/get_posts.py --limit 3

指令

所有指令皆從技能目錄執行。

貼文

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 20

主題

python3 scripts/get_topic.py artificial-intelligence  # 依 slug 取得主題
python3 scripts/get_topics.py --query "AI" --limit 20 # 搜尋主題
python3 scripts/get_topics.py --limit 50              # 熱門主題

使用者

python3 scripts/get_user.py rrhoover                  # 依使用者名稱取得使用者
python3 scripts/get_user_posts.py rrhoover --limit 20 # 使用者的貼文

收藏集

python3 scripts/get_collection.py SLUG_OR_ID          # 取得收藏集
python3 scripts/get_collections.py --featured --limit 20

API 資訊