# Instagram 评论翻译 API (instagram.comment_translations)

- Canonical page: [https://everyinfra.com/instagram-api/comment_translations](https://everyinfra.com/instagram-api/comment_translations?utm_medium=ai_doc&utm_campaign=page_md)
- Endpoint: POST https://api.everyinfra.com/api/v1/social with {"platform": "instagram", "action": "comment_translations", "params": {...}}
- Price: $0.006389 per call ($6.39 per 1,000 requests); failed calls and empty results are not charged
- Returns: list, one page of 10 per target, no next_page_token (to read further, page one target at a time with the single-target action; limit is ignored)
- 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=instagram&action=comment_translations

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| url | not declared | yes | not declared | 这些评论所在的帖子或 Reel 链接，如 https://www.instagram.com/p/<shortcode>/。 |
| comment_ids | not declared | yes | not declared | 要翻译的评论编号，数组，一次 1 到 10 个，不能重复；取 comments、comment_replies 结果里的 id。只在帖子靠前的约 150 条评论里找，没找到的评论没有对应的行。一次调用算一次，不按评论条数算。 |
| target_language | not declared | no | not declared | 译成哪种语言，语言代码，如 en、zh-CN、zh-TW、ja、ko、es、pt-BR、fr、de；不传是 en。 |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| comment_id | （comment_translations）评论的数字编号，对应你传的 comment_ids 里的一项。 |
| text | 正文内容，已去除 HTML 标签，全文返回、不截断（个别平台的列表结果本身只有摘要，以该平台的字段说明为准）。 |
| translation | 译文（机器翻译）。帖子没有正文时不出现。 |
| source_language | 识别出来的原文语言代码，如 en；认不出时是 und。 |
| target_language | 译成的语言代码，就是你传的 target_language，没传是 en。 |
| author_username | 作者用户名（@handle），通常可用于拼 URL。 |
| posted_at | 发布时间，ISO 8601 格式、UTC 时区（如 2026-08-07T12:34:56+00:00）。平台只给非标准字符串时原样透传，解析前建议做容错。null 表示平台未公开。 |
| url | 该记录在原平台上的可访问链接。 |
| post_url | 帖子链接。 |
| 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": "instagram",
  "action": "comment_translations",
  "params": {
    "url": "https://www.instagram.com/p/DbiL3SDoJzV/",
    "comment_ids": [
      "18012025586749566"
    ]
  }
}'
```

```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": "instagram",
        "action": "comment_translations",
        "params": {
            "url": "https://www.instagram.com/p/DbiL3SDoJzV/",
            "comment_ids": [
                "18012025586749566",
            ],
        },
    },
    timeout=120,
)
print(response.status_code)
print(response.json())
```

## Response example

Real response to the example request above, captured 2026-11-21T08:10:56Z. `results` and `count` are real with personal information (names, handles, avatars, profile links, contact details) removed. `id`, `billing` and `quota` differ on every call, so only their shape is shown.

```text
{
  "id": "req_…",
  "platform": "instagram",
  "action": "comment_translations",
  "results": [
    {
      "comment_id": "•••",
      "text": "El equilibrio y la fuerza de zona media de ese pibe es increíble",
      "translation": "That kid's balance and core strength are incredible",
      "source_language": "es",
      "target_language": "en",
      "author_username": "p•••l",
      "posted_at": "2026-08-30T21:47:16+00:00",
      "url": "https://www.instagram.com/reel/DbiL3SDoJzV/c/18012025586749566/",
      "post_url": "https://www.instagram.com/reel/DbiL3SDoJzV/",
      "platform": "instagram"
    }
  ],
  "count": 1,
  "billing": {
    "charged": …,
    "charged_usd": …,
    "balance_after_usd": …,
    …
  },
  "quota": { … }
}
```

## Also

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