# Reddit 视频帖文稿 API (reddit.post_transcript)

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

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| url | not declared | yes | not declared | Reddit 自己托管的视频帖的链接；返回 Reddit 给这条视频的字幕，不做语音转写。认不出的链接在扣费前拒绝（422）；没有字幕时返回 503，不扣费。 |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| post_id | 评论所在帖子的 ID（user_comments）。 |
| url | 该记录在原平台上的可访问链接。 |
| title | 标题。平台无标题概念时（如纯文本帖）为 null。 |
| media_type | 帖子的类型（post_transcript）。 |
| has_transcript | 这个帖子有没有字幕（post_transcript）；是 false 时用 reason 看原因。 |
| reason | 没有字幕的原因（post_transcript）：no_caption 有视频没字幕，not_video 帖子里没有视频，external_video 视频在别的网站。 |
| source | 字幕的出处（post_transcript）。 |
| language | 内容语言代码（如 zh、en），由平台判定，可能不准。 |
| text | 正文内容，已去除 HTML 标签，全文返回、不截断（个别平台的列表结果本身只有摘要，以该平台的字段说明为准）。 |
| segment_count | `segments` 的条数（post_transcript）。 |
| segments | 逐句字幕（post_transcript）：[{start_sec, end_sec, duration_sec, text}]，`start_sec`、`end_sec`、`duration_sec` 是这一句的开始、结束时间和时长，单位秒，`text` 是这一句的文字。 |
| caption_url | 字幕文件的地址（post_transcript）；可能会失效。 |
| duration_sec | 时长，单位秒。 |
| duration_seconds | 时长，单位秒。非视频/音频内容为 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": "reddit",
  "action": "post_transcript",
  "params": {
    "url": "https://www.reddit.com/r/TikTokCringe/comments/1y4o37g/road_rage_between_bmw_and_cyclists/"
  }
}'
```

```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": "post_transcript",
        "params": {
            "url": "https://www.reddit.com/r/TikTokCringe/comments/1y4o37g/road_rage_between_bmw_and_cyclists/",
        },
    },
    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": "post_transcript",
  "results": {
    "post_id": …,
    "url": …,
    "title": …,
    "media_type": …,
    "has_transcript": …,
    "reason": …,
    "source": …,
    "language": …,
    "text": …,
    "segment_count": …,
    "segments": …,
    "caption_url": …,
    "duration_sec": …,
    "duration_seconds": …,
    "platform": …
  },
  "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
