# Reddit 搜索联想词 API (reddit.search_suggest)

- Canonical page: [https://everyinfra.com/reddit-api/search_suggest](https://everyinfra.com/reddit-api/search_suggest?utm_medium=ai_doc&utm_campaign=page_md)
- Endpoint: POST https://api.everyinfra.com/api/v1/social with {"platform": "reddit", "action": "search_suggest", "params": {...}}
- Price: $0.000792 per call ($0.79 per 1,000 requests); failed calls and empty results are not charged
- Returns: list
- 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=reddit&action=search_suggest

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| keyword | not declared | yes | not declared | 搜索框里输入的词（可以只输前几个字母），返回 Reddit 搜索框下拉里的补全词和社区。 |
| limit | integer (1–) | no | not declared | 这次调用最多返回的条数，整数，至少为 1；不传按默认值，实际返回可能少于这个数。 |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| row_type | 行类型。painpoint：summary 汇总行（每次一行）、post 热门帖、pain_comment 痛点评论（点赞最多的几条负面评论原文）；search_suggest：keyword 补全词、community 社区；explore：topic 分类、community 推荐社区。 |
| keyword | 搜索词：search_suggest 的补全词、trending_searches 的热搜词。 |
| rank | 这一行在榜单或结果里的名次，从 1 开始；榜单口径（按什么排、统计多久）以能力说明为准。 |
| community | 所属 subreddit 名称（不含 r/ 前缀）。 |
| community_id | 社区的 ID（t5_ 开头）。 |
| url | 该记录在原平台上的可访问链接。 |
| icon_url | 社区图标或成就图标的图片地址。 |
| weekly_visitor_count | 社区的每周访客数（Reddit 社区页上显示的数；search_suggest 里是下拉显示的约数）。 |
| is_nsfw | 是否标记为成人内容（NSFW）。 |
| 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": "reddit",
  "action": "search_suggest",
  "params": {
    "keyword": "coffee"
  }
}'
```

```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": "reddit",
        "action": "search_suggest",
        "params": {
            "keyword": "coffee",
        },
    },
    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": "reddit",
  "action": "search_suggest",
  "results": [
    {
      "row_type": …,
      "keyword": …,
      "rank": …,
      "community": …,
      "community_id": …,
      "url": …,
      "icon_url": …,
      "weekly_visitor_count": …,
      "is_nsfw": …,
      "platform": …
    }
  ],
  "count": …,
  "billing": {
    "charged": …,
    "charged_usd": …,
    "balance_after_usd": …,
    …
  },
  "quota": { … }
}
```

## Also

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