producthunt

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Product Hunt Search & Monitoring

Product Hunt搜索与监控

Search for products, track launches, and monitor Product Hunt activity via the GraphQL V2 API.
通过GraphQL V2 API搜索产品、追踪新品发布并监控Product Hunt平台动态。

When to Use

使用场景

  • User asks about a product's Product Hunt launch or performance
  • User wants to find trending products in a category
  • User wants to monitor Product Hunt for competitors or similar products
  • User asks "what launched on Product Hunt today/this week"
  • User wants to research a product's reception on PH
  • 用户询问某款产品在Product Hunt的发布情况或表现
  • 用户想要查找某一分类下的热门产品
  • 用户想要监控竞品或同类产品在Product Hunt的动态
  • 用户提问“今天/本周Product Hunt上有哪些新品发布”
  • 用户想要调研某款产品在PH上的用户反响

Requirements

必要条件

API Token Required. The Product Hunt API requires authentication — but it's free and takes ~2 minutes to set up.
需要API令牌。Product Hunt API需要身份验证,但免费且设置仅需约2分钟

Getting a Token

获取令牌

  1. Go to API Dashboard
  2. Create an application (any name/URL works)
  3. Use the Developer Token at the bottom of your app's page (no OAuth flow needed for read-only access)
  4. Store the token in an environment variable:
    PH_API_TOKEN
If no token is available, fall back to using
web_search
with
site:producthunt.com
queries.
  1. 访问API控制台
  2. 创建一个应用(名称和网址可任意填写)
  3. 使用应用页面底部的开发者令牌(只读访问无需OAuth流程)
  4. 将令牌存储到环境变量:
    PH_API_TOKEN
如果没有可用令牌,退而使用
web_search
并搭配
site:producthunt.com
查询。

Key Limitation: No Text Search

主要限制:无文本搜索功能

The Product Hunt API does not support free-text search on posts. You can browse by topic, date, or get a specific post by slug — but you cannot search "AI writing tool" and get matching products.
To find a product by name, use
web_search
first:
web_search: site:producthunt.com/posts "product name"
Then use the slug from the result to query the API for full details (votes, comments, makers, etc.).
Product Hunt API不支持对帖子的自由文本搜索。你可以按主题、日期浏览,或通过slug获取特定帖子,但无法搜索“AI写作工具”来找到匹配的产品。
要按名称查找产品,请先使用
web_search
web_search: site:producthunt.com/posts "product name"
然后使用结果中的slug通过API查询完整详情(点赞数、评论数、创作者信息等)。

API Overview

API概述

  • Endpoint:
    https://api.producthunt.com/v2/api/graphql
  • Method: POST
  • Auth:
    Authorization: Bearer {token}
  • Format: GraphQL
  • Rate Limit: ~900 requests per 15 minutes, complexity limit of 1000 per query
  • 接口地址
    https://api.producthunt.com/v2/api/graphql
  • 请求方法:POST
  • 身份验证
    Authorization: Bearer {token}
  • 格式:GraphQL
  • 调用限制:每15分钟约900次请求,每个查询的复杂度上限为1000

How to Query

查询方法

Use
exec
with
curl
to make GraphQL requests:
bash
curl -s -X POST https://api.producthunt.com/v2/api/graphql \
  -H "Authorization: Bearer $PH_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"query": "YOUR_GRAPHQL_QUERY"}'
使用
exec
搭配
curl
发送GraphQL请求:
bash
curl -s -X POST https://api.producthunt.com/v2/api/graphql \
  -H "Authorization: Bearer $PH_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"query": "YOUR_GRAPHQL_QUERY"}'

Common Queries

常用查询示例

Today's Top Posts

今日热门帖子

graphql
query {
  posts(order: VOTES, first: 10) {
    edges {
      node {
        id
        name
        tagline
        votesCount
        commentsCount
        url
        website
        createdAt
        makers {
          name
          username
        }
        topics {
          edges {
            node {
              name
            }
          }
        }
      }
    }
  }
}
graphql
query {
  posts(order: VOTES, first: 10) {
    edges {
      node {
        id
        name
        tagline
        votesCount
        commentsCount
        url
        website
        createdAt
        makers {
          name
          username
        }
        topics {
          edges {
            node {
              name
            }
          }
        }
      }
    }
  }
}

Browse Posts by Topic

按主题浏览帖子

graphql
query {
  posts(order: VOTES, first: 10, topic: "developer-tools") {
    edges {
      node {
        id
        name
        tagline
        votesCount
        url
        website
      }
    }
  }
}
Remember: This browses a topic — it's not a text search. To find a specific product by name, use
web_search
with
site:producthunt.com/posts "product name"
, then look up the post by slug via the API.
graphql
query {
  posts(order: VOTES, first: 10, topic: "developer-tools") {
    edges {
      node {
        id
        name
        tagline
        votesCount
        url
        website
      }
    }
  }
}
注意:这是按主题浏览,并非文本搜索。要按名称查找特定产品,请先使用
web_search
搭配
site:producthunt.com/posts "product name"
,再通过API根据slug查询该帖子。

Get a Specific Post

获取特定帖子

graphql
query {
  post(slug: "chatgpt") {
    id
    name
    tagline
    description
    votesCount
    commentsCount
    reviewsCount
    reviewsRating
    url
    website
    createdAt
    featuredAt
    makers {
      name
      username
      headline
    }
    topics {
      edges {
        node {
          name
          slug
        }
      }
    }
    comments(first: 5) {
      edges {
        node {
          body
          votesCount
          createdAt
          user {
            name
            username
          }
        }
      }
    }
  }
}
graphql
query {
  post(slug:"chatgpt") {
    id
    name
    tagline
    description
    votesCount
    commentsCount
    reviewsCount
    reviewsRating
    url
    website
    createdAt
    featuredAt
    makers {
      name
      username
      headline
    }
    topics {
      edges {
        node {
          name
          slug
        }
      }
    }
    comments(first:5) {
      edges {
        node {
          body
          votesCount
          createdAt
          user {
            name
            username
          }
        }
      }
    }
  }
}

Get Posts by Topic

按主题获取帖子

graphql
query {
  topic(slug: "artificial-intelligence") {
    name
    postsCount
    posts(first: 10, order: VOTES) {
      edges {
        node {
          name
          tagline
          votesCount
          url
          createdAt
        }
      }
    }
  }
}
graphql
query {
  topic(slug:"artificial-intelligence") {
    name
    postsCount
    posts(first:10, order:VOTES) {
      edges {
        node {
          name
          tagline
          votesCount
          url
          createdAt
        }
      }
    }
  }
}

Get Posts for a Specific Date

获取指定日期的帖子

graphql
query {
  posts(postedAfter: "2024-01-15T00:00:00Z", postedBefore: "2024-01-16T00:00:00Z", order: VOTES, first: 10) {
    edges {
      node {
        name
        tagline
        votesCount
        url
      }
    }
  }
}
graphql
query {
  posts(postedAfter:"2024-01-15T00:00:00Z", postedBefore:"2024-01-16T00:00:00Z", order:VOTES, first:10) {
    edges {
      node {
        name
        tagline
        votesCount
        url
      }
    }
  }
}

Look Up a User

查询用户信息

graphql
query {
  user(username: "rrhoover") {
    name
    username
    headline
    followersCount
    followingCount
    madePosts(first: 5) {
      edges {
        node {
          name
          tagline
          votesCount
          url
        }
      }
    }
  }
}
graphql
query {
  user(username:"rrhoover") {
    name
    username
    headline
    followersCount
    followingCount
    madePosts(first:5) {
      edges {
        node {
          name
          tagline
          votesCount
          url
        }
      }
    }
  }
}

Available Topics (Common Slugs)

常用主题(Slug)

  • artificial-intelligence
    ,
    developer-tools
    ,
    design-tools
  • productivity
    ,
    marketing
    ,
    saas
    ,
    fintech
  • no-code
    ,
    open-source
    ,
    social-media
  • web-app
    ,
    iphone
    ,
    android
    ,
    mac
    ,
    chrome-extensions
For a full list, query:
graphql
query { topics(first: 50, order: FOLLOWERS_COUNT) { edges { node { name slug followersCount } } } }
  • artificial-intelligence
    ,
    developer-tools
    ,
    design-tools
  • productivity
    ,
    marketing
    ,
    saas
    ,
    fintech
  • no-code
    ,
    open-source
    ,
    social-media
  • web-app
    ,
    iphone
    ,
    android
    ,
    mac
    ,
    chrome-extensions
如需完整列表,请执行以下查询:
graphql
query { topics(first:50, order:FOLLOWERS_COUNT) { edges { node { name slug followersCount } } } }

Constructing Product Hunt Links

构建Product Hunt链接

  • Product page:
    https://www.producthunt.com/posts/{slug}
  • User profile:
    https://www.producthunt.com/@{username}
  • Topic page:
    https://www.producthunt.com/topics/{slug}
  • 产品页面
    https://www.producthunt.com/posts/{slug}
  • 用户主页
    https://www.producthunt.com/@{username}
  • 主题页面
    https://www.producthunt.com/topics/{slug}

Fallback: No API Token

备用方案:无API令牌

If no
PH_API_TOKEN
is available:
  1. Use
    web_search
    with queries like:
    • site:producthunt.com/posts "product name"
    • site:producthunt.com "topic" launched
  2. Use
    web_fetch
    on specific Product Hunt URLs to get basic info
  3. Inform the user that richer data (vote counts, comments, maker info) requires an API token
如果没有可用的
PH_API_TOKEN
  1. 使用
    web_search
    执行以下类似查询:
    • site:producthunt.com/posts "product name"
    • site:producthunt.com "topic" launched
  2. 使用
    web_fetch
    访问特定Product Hunt URL获取基础信息
  3. 告知用户更丰富的数据(点赞数、评论、创作者信息)需要API令牌

Output Format

输出格式

undefined
undefined

Product Hunt Results

Product Hunt搜索结果

  1. Product Name — Tagline 🔼 votes · 💬 comments · ⭐ rating By @maker_username Topics: AI, Developer Tools 🔗 product_url 🏠 website_url 📅 launched_date
  2. ...
undefined
  1. 产品名称 — 标语 🔼 点赞数 · 💬 评论数 · ⭐ 评分 作者:@maker_username 主题:AI、开发者工具 🔗 产品链接 🏠 官网链接 📅 发布日期
  2. ...
undefined

Error Handling

错误处理

  • 401 Unauthorized: Token is invalid or expired. Check
    PH_API_TOKEN
    .
  • 429 Rate Limited: Wait 15 minutes for rate limit reset.
  • Complexity limit exceeded: Reduce the number of fields or nested queries. Remove
    comments
    ,
    topics
    , or
    makers
    sub-queries.
  • Post not found: The slug may be wrong. Try searching with
    web_search
    first to confirm the exact slug.
  • No results for topic: Check the topic slug — use the topics query to find valid slugs.
  • 401 Unauthorized:令牌无效或已过期。检查
    PH_API_TOKEN
  • 429 Rate Limited:等待15分钟后调用限制会重置。
  • Complexity limit exceeded:减少字段数量或嵌套查询。移除
    comments
    topics
    makers
    子查询。
  • Post not found:slug可能错误。先尝试使用
    web_search
    确认正确的slug。
  • No results for topic:检查主题slug — 使用主题查询获取有效的slug。

Examples

使用示例

Example 1: "What launched on Product Hunt today?"

示例1:“今天Product Hunt上有哪些新品发布?”

Query today's posts sorted by votes, present top 10.
查询今日发布的帖子并按点赞数排序,展示前10个结果。

Example 2: "How did Linear do on Product Hunt?"

示例2:“Linear在Product Hunt上表现如何?”

  1. Search:
    web_search "site:producthunt.com/posts linear"
  2. Get the slug from results
  3. Query:
    post(slug: "linear-5")
    with full details
  1. 搜索:
    web_search "site:producthunt.com/posts linear"
  2. 从结果中获取slug
  3. 查询:
    post(slug:"linear-5")
    获取完整详情

Example 3: "Show me top AI tools on Product Hunt this month"

示例3:“展示本月Product Hunt上的顶级AI工具”

  1. Query posts by topic
    artificial-intelligence
    with date filters
  2. Sort by votes, present top results
  1. 按主题
    artificial-intelligence
    结合日期筛选查询帖子
  2. 按点赞数排序,展示热门结果

Data Source

数据来源

Product Hunt API V2 — GraphQL API, requires free developer token.
Product Hunt API V2 — GraphQL API,需要免费开发者令牌。