# Reddit 游戏版帖子 API (reddit.games_posts)

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

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| date_range | enum: all_time / past_day / past_hour / past_month / past_week / past_year | no | not declared | 时间范围，只在 sort=top 或 controversial 时生效：past_hour、past_day、past_week、past_month、past_year、all_time。 |
| page_token | not declared | no | not declared | 翻页令牌：把上一页响应里的 next_page_token 原样传回拿下一页；不传从第一页开始。第一页约 5 行（含 Featured Games、Explore by Category 两张栏目卡），之后每页约 25 行；每页算一次调用。 |
| sort | enum: controversial / newest / popular / rising / top | no | not declared | 排序：popular 热门（默认）、newest 最新、top 高分、rising 上升、controversial 争议。 |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| id | 该记录在原平台上的唯一标识。仅在同一平台内唯一，跨平台可能重复。 |
| url | 该记录在原平台上的可访问链接。 |
| title | 标题。平台无标题概念时（如纯文本帖）为 null。 |
| text | 正文内容，已去除 HTML 标签，全文返回、不截断（个别平台的列表结果本身只有摘要，以该平台的字段说明为准）。 |
| author_username | 作者用户名（@handle），通常可用于拼 URL。 |
| community | 所属 subreddit 名称（不含 r/ 前缀）。 |
| like_count | 点赞数。null 表示该平台或该接口不公开此数据，不等于 0。 |
| comment_count | 评论数。null 表示不公开，不等于 0。 |
| posted_at | 发布时间，ISO 8601 格式、UTC 时区（如 2026-08-07T12:34:56+00:00）。平台只给非标准字符串时原样透传，解析前建议做容错。null 表示平台未公开。 |
| flair | 帖子的分类标签（flair）原文。 |
| domain | 帖子链接的域名（文字帖为 self.版块名 或 reddit.com）。 |
| external_link | 链接帖指向的站外地址。 |
| thumbnail_url | 缩略图链接，分辨率低于 image_url。 |
| image_urls | 帖子里的图片地址。 |
| 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": "games_posts",
  "params": {}
}'
```

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

## Response example

Real response to the example request above, captured 2026-11-21T07:20:59Z. `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": "reddit",
  "action": "games_posts",
  "results": [
    {
      "id": "1y1qsu4",
      "url": "https://www.reddit.com/r/pocketgrids/comments/1y1qsu4/caren_xi/",
      "title": "Caren XI",
      "author_username": "N•••6",
      "community": "pocketgrids",
      "like_count": 1,
      "comment_count": 0,
      "posted_at": "2026-11-21T07:07:37.986000+00:00",
      "domain": "self.pocketgrids",
      "platform": "reddit"
    },
    {
      "id": "1up5v13",
      "url": "https://www.reddit.com/r/games_tab_posts/comments/1up5v13/explore_by_category/",
      "title": "สำรวจตามประเภท",
      "author_username": "c•••y",
      "community": "games_tab_posts",
      "like_count": 50,
      "comment_count": 50,
      "posted_at": "2026-07-06T18:29:22.635000+00:00",
      "domain": "self.games_tab_posts",
      "platform": "reddit"
    }
  ],
  "next_page_token": …,
  "pagination": { … },
  "count": 5,
  "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
