# Threads 社区列表 API (threads.communities)

- Canonical page: [https://everyinfra.com/threads-api/communities](https://everyinfra.com/threads-api/communities?utm_medium=ai_doc&utm_campaign=page_md)
- Endpoint: POST https://api.everyinfra.com/api/v1/social with {"platform": "threads", "action": "communities", "params": {...}}
- Price: $0.000556 per call ($0.56 per 1,000 requests); failed calls and empty results are not charged
- Returns: list, one page of 20 per call (limit is ignored; pass the top-level next_page_token from the response as page_token for the next page)
- Pagination: pass next_page_token back as page_token for the next page, other params unchanged; one call per page, tokens last 24 hours
- 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=communities

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| page_token | not declared | no | not declared | 翻页令牌。第一页不传；响应有 next_page_token 时原样作 page_token 传回，其他参数不变。一页最多 20 条，limit 不起作用。每页算一次调用；令牌 24 小时有效。没有 next_page_token 就是翻不下去了。 |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| rank | 这一行在榜单或结果里的名次，从 1 开始；榜单口径（按什么排、统计多久）以能力说明为准。 |
| id | 该记录在原平台上的唯一标识。仅在同一平台内唯一，跨平台可能重复。 |
| name | communities：社区的内部名，如 nbathreads；显示名在 display_name。 |
| display_name | 显示名，可能与 username 不同。 |
| member_count | 社区成员数。 |
| online_count | 社区当前在线人数。没有时没有这个字段。 |
| icon_url | 社区图标地址，带签名，会过期。 |
| 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": "threads",
  "action": "communities",
  "params": {}
}'
```

```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": "communities",
        "params": {},
    },
    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": "communities",
  "results": [
    {
      "rank": …,
      "id": …,
      "name": …,
      "display_name": …,
      "member_count": …,
      "online_count": …,
      "icon_url": …,
      "url": …,
      "platform": …
    }
  ],
  "next_page_token": …,
  "pagination": { … },
  "count": …,
  "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
