# Instagram 帖子正文翻译 API (instagram.post_translation)

- Canonical page: [https://everyinfra.com/instagram-api/post_translation](https://everyinfra.com/instagram-api/post_translation?utm_medium=ai_doc&utm_campaign=page_md)
- Endpoint: POST https://api.everyinfra.com/api/v1/social with {"platform": "instagram", "action": "post_translation", "params": {...}}
- Price: $0.006389 per call ($6.39 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=instagram&action=post_translation

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| media_id | not declared | no | not declared | 帖子的数字编号（post 结果里的 id）。和 url 给一个。 |
| target_language | not declared | no | not declared | 译成哪种语言，语言代码，如 en、zh-CN、zh-TW、ja、ko、es、pt-BR、fr、de；不传是 en。正文本来就是这种语言时原样返回。 |
| url | not declared | no | not declared | 帖子或 Reel 链接，如 https://www.instagram.com/p/<shortcode>/。url 和 media_id 给一个，两个都给按 url。 |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| media_id | 帖子的数字编号。oembed 给的是「帖子编号_作者编号」的写法。 |
| shortcode | 帖子码：帖子链接里 /p/ 或 /reel/ 后面那一段。 |
| url | 该记录在原平台上的可访问链接。 |
| author_username | 作者用户名（@handle），通常可用于拼 URL。 |
| text | 正文内容，已去除 HTML 标签，全文返回、不截断（个别平台的列表结果本身只有摘要，以该平台的字段说明为准）。 |
| translation | 译文（机器翻译）。帖子没有正文时不出现。 |
| source_language | 识别出来的原文语言代码，如 en；认不出时是 und。 |
| target_language | 译成的语言代码，就是你传的 target_language，没传是 en。 |
| 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": "post_translation",
  "params": {
    "url": "https://www.instagram.com/p/DbYmqpplO_N/"
  }
}'
```

```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": "post_translation",
        "params": {
            "url": "https://www.instagram.com/p/DbYmqpplO_N/",
        },
    },
    timeout=120,
)
print(response.status_code)
print(response.json())
```

## Response example

Real response to the example request above, captured 2026-11-21T07:18:47Z. `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": "post_translation",
  "results": {
    "media_id": "3952078729724096461",
    "shortcode": "DbYmqpplO_N",
    "url": "https://www.instagram.com/reel/DbYmqpplO_N/",
    "author_username": "n•••a",
    "text": "The Sun and Moon are coming together to put on a show for Earth, and we'll be sharing it with you. 😎\n\nOn Aug. 12, a total solar eclipse will pass over Earth, and we'll be broadcasting it live along the path of totality. Check our link in bio to learn how to watch along with us!\n\n…",
    "translation": "The Sun and Moon are coming together to put on a show for Earth, and we'll be sharing it with you. 😎\n\nOn Aug. 12, a total solar eclipse will pass over Earth, and we'll be broadcasting it live along the path of totality. Check our link in bio to learn how to watch along with us!\n\n…",
    "source_language": "en",
    "target_language": "en",
    "platform": "instagram"
  },
  "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
