# Pinterest 评论 API (pinterest.comments)

- Canonical page: [https://everyinfra.com/pinterest-api/comments](https://everyinfra.com/pinterest-api/comments?utm_medium=ai_doc&utm_campaign=page_md)
- Endpoint: POST https://api.everyinfra.com/api/v1/social with {"platform": "pinterest", "action": "comments", "params": {...}}
- Price: $0.016 per call ($16 per 1,000 requests); failed calls and empty results are not charged
- Returns: list, one page of up to 20 per call; the number of rows varies from page to page and a short page is not the end (limit is ignored; pass the top-level next_page_token from the response as page_token for the next page; no next_page_token means the end)
- Pagination: pass next_page_token back as page_token for the next page, other params unchanged; one call per page, tokens last 24 hours
- Mode: sync; add "mode": "async" for slow tasks

## Health

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

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| page_token | not declared | no | not declared | 翻页令牌：第一页不传；把上一页回包里的 next_page_token 原样传回拿下一页，其余参数和第一页一样。每页算一次调用。 |
| thread_id | not declared | no | not declared | 图钉行带的 thread_id（e1_ 编号的行也带）。和 url 二选一，传它少查一次、更快。 |
| url | not declared | no | not declared | 图钉：带数字编号的图钉链接（/pin/<数字>/）或数字编号。和 thread_id 二选一；e1_ 编号的行请传它的 thread_id。 |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| id | 该记录在原平台上的唯一标识。仅在同一平台内唯一，跨平台可能重复。 |
| pin_id | 数字的图钉编号：resolve_pin 里是加密编号换出的编号，能拿去给 pin、comments；comments 里是评论所在的图钉，只在请求传了 url 时有。 |
| row_type | 这一行是什么：search_suggest 里是 query（联想词）或 user（推荐的账号）；comments、comment_replies 里是 comment（普通评论）或 tried_it（「试过了」的晒图帖）。 |
| text | 正文内容，已去除 HTML 标签，全文返回、不截断（个别平台的列表结果本身只有摘要，以该平台的字段说明为准）。 |
| posted_at | 发布时间，ISO 8601 格式、UTC 时区（如 2026-08-07T12:34:56+00:00）。平台只给非标准字符串时原样透传，解析前建议做容错。null 表示平台未公开。 |
| like_count | 点赞数。null 表示该平台或该接口不公开此数据，不等于 0。 |
| reply_count | 回复数，通常用于评论的子回复。null 表示不公开。 |
| is_hearted | 这条评论是否被点了爱心。 |
| is_edited | 这条评论是否改过。 |
| helpful_count | 觉得这条评论有帮助的人数。 |
| reactions | 按表情类型分开的回应数，键是 Pinterest 的表情类型编号；合计就是 reaction_count。 |
| image_urls | 图片链接数组，按平台展示顺序；没有图片时不出现这个字段。 |
| tagged_users | 评论里@到的用户名。 |
| author_id | 作者在原平台的唯一 ID。 |
| author_username | 作者用户名（@handle），通常可用于拼 URL。 |
| author_name | 作者昵称（显示名）。 |
| author_avatar_url | 作者头像图片链接（多数平台带签名、会过期）。 |
| author_url | 作者在原平台的主页链接。 |
| rank | 这一行在榜单或结果里的名次，从 1 开始；榜单口径（按什么排、统计多久）以能力说明为准。 |
| collected_at | 这条数据的抓取时刻（ISO 8601，UTC）。 |
| 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": "pinterest",
  "action": "comments",
  "params": {
    "thread_id": "3270831804748028928"
  }
}'
```

```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": "pinterest",
        "action": "comments",
        "params": {
            "thread_id": "3270831804748028928",
        },
    },
    timeout=120,
)
print(response.status_code)
print(response.json())
```

## Response example

No real sample for these example parameters yet: structure only, every value is a placeholder (…).

```text
{
  "id": "req_…",
  "platform": "pinterest",
  "action": "comments",
  "results": [
    {
      "id": …,
      "pin_id": …,
      "row_type": …,
      "text": …,
      "posted_at": …,
      "like_count": …,
      "reply_count": …,
      "is_hearted": …,
      "is_edited": …,
      "helpful_count": …,
      "reactions": …,
      "image_urls": …,
      "tagged_users": …,
      "author_id": …,
      "author_username": …,
      "author_name": …,
      "author_avatar_url": …,
      "author_url": …,
      "rank": …,
      "collected_at": …,
      "platform": …
    }
  ],
  "next_page_token": …,
  "pagination": { … },
  "count": …,
  "billing": {
    "charged": …,
    "charged_usd": …,
    "balance_after_usd": …,
    …
  },
  "quota": { … }
}
```

## Also

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