# Instagram Reels 短视频 API (instagram.reels)

- Canonical page: https://everyinfra.com/instagram-api/reels
- Endpoint: POST https://api.everyinfra.com/api/v1/social with {"platform": "instagram", "action": "reels", "params": {...}}
- Price: $0.001194 per call ($1.19 per 1,000 requests); failed calls and empty results are not charged
- Returns: list, default 30, max 100 per call
- Mode: sync; add "mode": "async" for slow tasks

Instagram Reels 短视频按 `username` 列出一个公开账号发布的 Reels，每条带文案、时长、播放量、点赞和评论数、发布时间、地点、话题标签、封面图、视频链接和配乐。它回答「这个账号在做什么样的短视频、表现如何」，适合达人营销评估合作账号，社媒团队对照竞品的视频产出，以及研究短视频形式。

`username` 填账号的 handle，例如 nasa，不带 @。比较表现时，用 `play_count` 对照 `like_count` 和 `comment_count`，能看出哪些视频看的人多、互动也多。这项能力不返回字幕文本、热门评论和作者粉丝数。计数为 null 表示没有公开，不等于 0；`duration_sec` 单位是秒。

## Health

- Live health (24h percent, hourly and daily trends): https://api.everyinfra.com/api/v1/social/availability?platform=instagram&action=reels

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| username | not declared | yes | not declared | Instagram 账号 handle，建议不带 @ 或完整主页 URL。profile/persona/user_posts/reels 查询账号数据；followers 只查粉丝数量，followers_list/following_list 才查粉丝/关注账号列表。 |
| limit | integer (1–100) | no | 30 | 这次调用最多返回的条数，整数，1–100；不传按默认值，实际返回可能少于这个数。超过上限会在扣费前返回 422。 |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| post_id | 帖子 ID。 |
| url | 该记录在原平台上的可访问链接。 |
| text | 正文内容，已去除 HTML 标签，全文返回、不截断（个别平台的列表结果本身只有摘要，以该平台的字段说明为准）。 |
| media_type | 媒体类型（图/视频/轮播）。 |
| like_count | 点赞数。null 表示该平台或该接口不公开此数据，不等于 0。 |
| comment_count | 评论数。null 表示不公开，不等于 0。 |
| author_username | 作者用户名（@handle），通常可用于拼 URL。 |
| author_name | 作者昵称（显示名）。 |
| posted_at | 发布时间，ISO 8601 格式、UTC 时区（如 2026-08-07T12:34:56+00:00）。平台只给非标准字符串时原样透传，解析前建议做容错。null 表示平台未公开。 |
| location | 地理位置描述，原文透传，格式随平台而异。 |
| id | 该记录在原平台上的唯一标识。仅在同一平台内唯一，跨平台可能重复。 |
| image_url | 图片链接。多图能力可能返回 image_urls 数组。 |
| video_url | platform-native meaning |
| author_id | 作者在原平台的唯一 ID。 |
| width | platform-native meaning |
| height | platform-native meaning |
| hashtags | 正文里的话题标签数组，按出现顺序；没有时不出现这个字段。 |
| play_count | 播放量。 |
| duration_sec | 时长，秒。 |
| duration_seconds | 时长，单位秒。非视频/音频内容为 null。 |
| music | Reels 使用的音乐，含歌手（artist）和曲名（title）；没有时不出现这个字段。 |
| 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": "reels",
  "params": {
    "username": "nasa"
  }
}'
```

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

## Response example

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

```text
{
  "id": "req_…",
  "platform": "instagram",
  "action": "reels",
  "results": [
    {
      "post_id": "DfF3eqGSKKc",
      "url": "https://www.instagram.com/reel/DfF3eqGSKKc/",
      "text": "More power loading. 🔋\n\nToday, NASA astronaut Anil Menon and CSA (Canadian Space Agency) astronaut Joshua Kutryk conducted a spacewalk to install the 7th of 8 new roll out solar arrays. The final new array is slated to be installed during the Nov. 5 spacewalk, increasing the stati…",
      "media_type": "video",
      "like_count": 11609,
      "comment_count": 129,
      "author_username": "•••",
      "author_name": "•••",
      "posted_at": "2026-10-29T20:35:35+00:00",
      "id": "•••",
      "image_url": "https://scontent-sof1-2.cdninstagram.com/v/t51.82787-15/865204930_18640535563026724_3353517023594775034_n.jpg?stp=dst-jpg_e15_s640x640_tt6&_nc_cat=1&ig_cache_key=NDAxODg2MjI0MTg0MzAyODYzNjE4NjQwNTM1NTYwMDI2NzI0.3-ccb7-5&ccb=7-5&_nc_sid=58cdad&efg=eyJ2ZW5jb2RlX3RhZyI6IkNMSVBTLnhwa…",
      "video_url": "https://scontent-sof1-2.cdninstagram.com/o1/v/t2/f2/m86/AQMgO65IBSO4D1Fg1v8qWRLjCR7N-LaX4H_sPQeyoyjFQE149o094RWHdy1qn9GBy1VHAND2Io7UoTGpUBgIXE-YSbD4UnaCrO694xk.mp4?_nc_cat=102&_nc_sid=5e9851&_nc_ht=scontent-sof1-2.cdninstagram.com&_nc_ohc=koWnhp-eBvIQ7kNvwFJyYpR&efg=eyJ2ZW5jb2RlX…",
      "author_id": "•••",
      "width": 1080,
      "height": 1920,
      "play_count": 2043930,
      "duration_sec": 41.375999450683594,
      "music": {
        "artist": "nasajohnson",
        "title": "Original audio"
      },
      "platform": "instagram",
      "duration_seconds": 41.375999450683594
    },
    {
      "post_id": "De7XCa_TJ4h",
      "url": "https://www.instagram.com/reel/De7XCa_TJ4h/",
      "text": "This is how @nasa does game day. Roll Tide! 🚀🏈",
      "media_type": "video",
      "like_count": 52012,
      "comment_count": 235,
      "author_username": "•••",
      "author_name": "•••",
      "posted_at": "2026-10-25T18:35:11+00:00",
      "location": "Bryant-Denny Stadium",
      "id": "•••",
      "image_url": "https://scontent-sof1-2.cdninstagram.com/v/t51.82787-15/858088880_1909652077075572_3321833479248057878_n.jpg?stp=dst-jpg_e15_s640x640_tt6&_nc_cat=101&ig_cache_key=NDAxNTkwNDgxNDIxODkxMTI2NTE5MDk2NTIwNzM3NDIyMzk%3D.3-ccb7-5&ccb=7-5&_nc_sid=58cdad&efg=eyJ2ZW5jb2RlX3RhZyI6IkNMSVBTLn…",
      "video_url": "https://scontent-sof1-2.cdninstagram.com/o1/v/t2/f2/m86/AQO_XE-Eozfv9EhJgpBw8CpgqEydxrCcLTTmdJ4OmJL4u8TmjEREW4NyjX7EoxhsUiVfVbZseRJAIb1F9nUfjAsGTOK4bYFiS-v5fw4.mp4?_nc_cat=105&_nc_sid=5e9851&_nc_ht=scontent-sof1-2.cdninstagram.com&_nc_ohc=47tcWctX0mAQ7kNvwFwIIq6&efg=eyJ2ZW5jb2RlX…",
      "author_id": "•••",
      "width": 1916,
      "height": 1078,
      "play_count": 4474276,
      "duration_sec": 61.507999420166016,
      "music": {
        "artist": "nasaadmin",
        "title": "Original audio"
      },
      "platform": "instagram",
      "duration_seconds": 61.507999420166016
    }
  ],
  "count": 30,
  "billing": {
    "charged": …,
    "charged_usd": …,
    "balance_after_usd": …,
    …
  },
  "quota": { … }
}
```

## FAQ

### 能拿到 Reel 里说了什么吗？

这项能力不返回字幕文本。作者写的文案在 `text`，话题标签在 `hashtags`，可以用它们检索、统计或分类内容；存数时和 `post_id`、`duration_sec` 放在一起，便于比较不同时长视频的文案。

### 播放量看哪个字段？

`play_count` 是这条 Reel 的播放量，这项能力不另给浏览数。比较时一直用 `play_count`，对照 `like_count`、`comment_count` 看互动；`play_count` 为 null 的行先排除，null 表示没有公开，不代表没人看。

### 怎么读某条 Reel 下面的评论？

这项能力不带热门评论。把这一行的 `url` 传给 Instagram 评论，它接受单个帖子或 Reel 链接，返回这条内容下的评论。账号本身的资料和粉丝数，用同一个 handle 调 Instagram 主页或对象详情。

## 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
