# Threads 互动率统计 API (threads.engagement)

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

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| username | not declared | yes | not declared | Threads 用户名（@ 后面那段，可带 @），也可以给主页链接，如 https://www.threads.com/@mosseri。 |
| posts | integer | no | not declared | 按最近多少条帖子算，3 到 50 的整数，默认 20。 |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| username | 用户名（@handle）。 |
| display_name | 显示名，可能与 username 不同。 |
| url | 该记录在原平台上的可访问链接。 |
| follower_count | 粉丝数。null 表示不公开，不等于 0。 |
| is_verified | 是否为平台认证账号（蓝V等）。null 表示无法判定。 |
| sample_size | engagement：实际参与计算的帖子条数。只算本人发的帖子，不含回复和转发，置顶帖也算。 |
| period_start | engagement：参与计算的帖子里最早一条的发布时间（UTC）。 |
| period_end | engagement：参与计算的帖子里最晚一条的发布时间（UTC）。 |
| posts_per_week | engagement：这段时间平均每周发几条。 |
| avg_like_count | engagement：平均每条的点赞数。 |
| avg_comment_count | engagement：平均每条的回复数。 |
| avg_repost_count | engagement：平均每条的转发数。 |
| avg_quote_count | engagement：平均每条的引用数。 |
| avg_share_count | engagement：平均每条的分享数。 |
| median_like_count | engagement：点赞数的中位数。 |
| avg_interactions | engagement：平均每条的互动数，互动数是点赞、回复、转发、引用、分享相加。 |
| median_interactions | engagement：每条互动数的中位数。 |
| engagement_rate | engagement：互动率，单位是 %：avg_interactions ÷ follower_count × 100。0.17 表示 0.17%。 |
| platform | 数据来源平台标识，与请求里的 platform 一致（如 xiaohongshu、tiktok）。 |
| posts_by_hour_utc | engagement：按 UTC 小时统计的发帖数，24 个数，第 1 个是 0 点。 |
| top_hours_utc | engagement：发帖最多的几个小时（UTC，0 到 23），多的在前。 |
| posts_by_weekday_utc | engagement：按星期统计的发帖数（UTC），7 个数，依次是周日到周六。 |
| media_mix | engagement：各类帖子的条数：text 纯文字、image 单图、video 视频、carousel 多图或图文混合。 |
| top_posts | engagement：互动最多的几条（最多 3 条），每项 url、text、posted_at、interactions（互动数）、like_count、comment_count、repost_count、quote_count、share_count。 |

## 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": "threads",
  "action": "engagement",
  "params": {
    "username": "zuck"
  }
}'
```

```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": "threads",
        "action": "engagement",
        "params": {
            "username": "zuck",
        },
    },
    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": "threads",
  "action": "engagement",
  "results": {
    "username": …,
    "display_name": …,
    "url": …,
    "follower_count": …,
    "is_verified": …,
    "sample_size": …,
    "period_start": …,
    "period_end": …,
    "posts_per_week": …,
    "avg_like_count": …,
    "avg_comment_count": …,
    "avg_repost_count": …,
    "avg_quote_count": …,
    "avg_share_count": …,
    "median_like_count": …,
    "avg_interactions": …,
    "median_interactions": …,
    "engagement_rate": …,
    "platform": …,
    "posts_by_hour_utc": …,
    "top_hours_utc": …,
    "posts_by_weekday_utc": …,
    "media_mix": …,
    "top_posts": …
  },
  "billing": {
    "charged": …,
    "charged_usd": …,
    "balance_after_usd": …,
    …
  },
  "quota": { … }
}
```

## Also

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