# Reddit 用户成就 API (reddit.user_trophies)

- Canonical page: [https://everyinfra.com/reddit-api/user_trophies](https://everyinfra.com/reddit-api/user_trophies?utm_medium=ai_doc&utm_campaign=page_md)
- Endpoint: POST https://api.everyinfra.com/api/v1/social with {"platform": "reddit", "action": "user_trophies", "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=user_trophies

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| username | not declared | yes | not declared | Reddit 用户名，spez、u/spez 或个人主页链接都可以；返回这个用户个人页 Achievements 里的成就。 |
| limit | integer (1–) | no | not declared | 这次调用最多返回的条数，整数，至少为 1；不传按默认值，实际返回可能少于这个数。 |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| id | 该记录在原平台上的唯一标识。仅在同一平台内唯一，跨平台可能重复。 |
| name | 分类名（explore）或成就名（user_trophies）。 |
| description | 简介或描述，通常比 text 短。 |
| icon_url | 社区图标或成就图标的图片地址。 |
| unlocked_at | 成就解锁时间，格式同 posted_at。 |
| unlock_count | 这项成就拿了几次：能反复拿的成就才可能大于 1，其余是 1。 |
| rarity | 成就的稀有度：common、rare、epic、legendary；新出的成就可能暂时没有。 |
| 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": "user_trophies",
  "params": {
    "username": "spez"
  }
}'
```

```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": "user_trophies",
        "params": {
            "username": "spez",
        },
    },
    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": "user_trophies",
  "results": [
    {
      "id": …,
      "name": …,
      "description": …,
      "icon_url": …,
      "unlocked_at": …,
      "unlock_count": …,
      "rarity": …,
      "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
