# Product Hunt 评论 API (producthunt.comments)

- Canonical page: [https://everyinfra.com/producthunt-api/comments](https://everyinfra.com/producthunt-api/comments?utm_medium=ai_doc&utm_campaign=page_md)
- Endpoint: POST https://api.everyinfra.com/api/v1/social with {"platform": "producthunt", "action": "comments", "params": {...}}
- Price: $0.001389 per call ($1.39 per 1,000 requests); failed calls and empty results are not charged
- Returns: list, default 20, max 50 per call
- Mode: sync; add "mode": "async" for slow tasks

Product Hunt 评论按 `url` 读取一次发布下的讨论，每行是一条评论：正文 `text` 全文返回、不截断，另带投票数 `vote_count`、作者的显示名和 @ 用户名、一句话头衔 `author_headline`，以及所属产品的名称和链接。它回答「这次发布，社区在聊什么、哪些话得到的票最多」，适合做发布复盘，也适合整理用户的反馈。

`url` 填 /posts/发布短名 或 /products/产品短名 的完整 URL。`is_pinned` 和 `author_is_verified` 是评价那一页没有的两个字段，分别标出置顶的评论和认证的评论人。挑评论时先按投票数 `vote_count` 排序。

## Health

- Live health (24h percent, hourly and daily trends): https://api.everyinfra.com/api/v1/social/availability?platform=producthunt&action=comments

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| url | not declared | yes | not declared | Product Hunt 的 /posts/发布短名 或 /products/产品短名 完整 URL。profile 读取产品资料，comments 读取发布讨论，reviews 读取星级评价；讨论与产品评价不是同一类内容。 |
| limit | integer (1–50) | no | 20 | 这次调用最多返回的条数，整数，1–50；不传按默认值，实际返回可能少于这个数。超过上限会在扣费前返回 422。 |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| id | 该记录在原平台上的唯一标识。仅在同一平台内唯一，跨平台可能重复。 |
| text | 正文内容，已去除 HTML 标签，全文返回、不截断（个别平台的列表结果本身只有摘要，以该平台的字段说明为准）。 |
| vote_count | 获得的投票数（upvotes），PH 上的核心热度指标。 |
| is_pinned | 是否置顶。 |
| author_name | 作者昵称（显示名）。 |
| author_username | 作者用户名（@handle），通常可用于拼 URL。 |
| author_headline | 评价人的一句话头衔。 |
| author_is_verified | 评价人是否认证。 |
| product_name | 产品名称。 |
| product_url | 产品页链接。 |
| posted_at | 发布时间，ISO 8601 格式、UTC 时区（如 2026-08-07T12:34:56+00:00）。平台只给非标准字符串时原样透传，解析前建议做容错。null 表示平台未公开。 |
| platform | 数据来源平台标识，与请求里的 platform 一致（如 xiaohongshu、tiktok）。 |

## Example

```bash
curl -X POST 'https://api.everyinfra.com/api/v1/social' \
  -H "Authorization: Bearer $EVERYINFRA_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "platform": "producthunt",
  "action": "comments",
  "params": {
    "url": "https://www.producthunt.com/products/claude"
  }
}'
```

```python
import os
import requests

response = requests.post(
    "https://api.everyinfra.com/api/v1/social",
    headers={"Authorization": f"Bearer {os.environ['EVERYINFRA_API_KEY']}"},
    json={
        "platform": "producthunt",
        "action": "comments",
        "params": {
            "url": "https://www.producthunt.com/products/claude",
        },
    },
    timeout=120,
)
print(response.status_code)
print(response.json())
```

## Response example

Real response to the example request above, captured 2026-10-24T18:28:34Z. `results` and `count` are real with personal information (names, handles, avatars, profile links, contact details) removed; the list keeps the first 2 of 5. `id`, `billing` and `quota` differ on every call, so only their shape is shown.

```text
{
  "id": "req_…",
  "platform": "producthunt",
  "action": "comments",
  "results": [
    {
      "id": "5970336",
      "text": "Finally — now all the contenders have arrived! @••• by Meta , Instinct , @••• , Dots by ChatGPT , and @••• . Who will win??",
      "vote_count": 6,
      "is_pinned": false,
      "author_name": "•••",
      "author_username": "•••",
      "author_is_verified": true,
      "product_name": "Claude by Anthropic",
      "product_url": "https://www.producthunt.com/products/claude",
      "posted_at": "2026-10-21T12:56:15-07:00",
      "platform": "producthunt"
    },
    {
      "id": "5972916",
      "text": "@••• I think Duet is my favorite name for the personal assistant bots. Fits in so well with the rest of the Anthropic family",
      "vote_count": 5,
      "is_pinned": false,
      "author_name": "•••",
      "author_username": "•••",
      "author_is_verified": true,
      "product_name": "Claude by Anthropic",
      "product_url": "https://www.producthunt.com/products/claude",
      "posted_at": "2026-10-22T08:18:50-07:00",
      "platform": "producthunt"
    }
  ],
  "count": 5,
  "billing": {
    "charged": …,
    "charged_usd": …,
    "balance_after_usd": …,
    …
  },
  "quota": { … }
}
```

## FAQ

### 评论里能读到星级评分吗？

读不到。评分、易用性和性价比打分、优缺点这些列都在评价那一页，评论这一页没有。两页的 `url` 写法相同，读到的却是两类内容：这里是发布下的讨论，评价那一页是产品打分。两页都有 `vote_count`，这里计的是评论得到的票。

### 读到的评论是这次发布的全部评论吗？

不保证。Product Hunt 官方说明评论可能被审核、隐藏或删除，接口只返回读取到的讨论，所以不能保证所有评论都可见。另外一次调用最多取 50 条，讨论很长的发布，读到的只是其中一部分。

### 能用它自动发评论吗？

不能，这一页只读，没有发评论的能力。Product Hunt 官方规则也不支持批量或 AI 生成评论，官方的定位是评论用于和 Maker 对话。

## Also

- Capability catalog (no key): https://api.everyinfra.com/api/v1/social/catalog?platform=producthunt
- OpenAPI: https://everyinfra.com/openapi.json · Agents guide: https://everyinfra.com/agents.md
