# Bluesky 用户内容 API (bluesky.user_posts)

- Canonical page: [https://everyinfra.com/bluesky-api/user_posts](https://everyinfra.com/bluesky-api/user_posts?utm_medium=ai_doc&utm_campaign=page_md)
- Endpoint: POST https://api.everyinfra.com/api/v1/social with {"platform": "bluesky", "action": "user_posts", "params": {...}}
- Price: $0.001389 per call ($1.39 per 1,000 requests); failed calls and empty results are not charged
- Returns: list, default 20, max 200 per call
- 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=bluesky&action=user_posts

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| username | not declared | yes | not declared | Bluesky 完整 handle，例如 alice.bsky.social 或账号绑定的自定义域名；不是显示昵称，也不要传 bsky.app/profile/ 页面 URL。profile、user_posts、followers、following 均用同一账号 handle 定位。 |
| limit | integer (1–200) | no | 20 | 这次调用最多返回的条数，整数，1–200；不传按默认值，实际返回可能少于这个数。超过上限会在扣费前返回 422。 |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| id | 该记录在原平台上的唯一标识。仅在同一平台内唯一，跨平台可能重复。 |
| url | 该记录在原平台上的可访问链接。 |
| text | 正文内容，已去除 HTML 标签，全文返回、不截断（个别平台的列表结果本身只有摘要，以该平台的字段说明为准）。 |
| author_username | 作者用户名（@handle），通常可用于拼 URL。 |
| author_name | 作者昵称（显示名）。 |
| author_id | 作者在原平台的唯一 ID。 |
| author_avatar_url | 作者头像。 |
| lang | 内容语言，作者发布时自行标注。 |
| like_count | 点赞数。null 表示该平台或该接口不公开此数据，不等于 0。 |
| repost_count | 转发数（区别于引用转发）。null 表示不公开。 |
| comment_count | 评论数。null 表示不公开，不等于 0。 |
| quote_count | 引用转发数。**与 repost 不同**：引用是带评论的转发。 |
| bookmark_count | 收藏数。 |
| is_reply | 是否为回复。 |
| is_repost | 是否为转发。 |
| posted_at | 发布时间，ISO 8601 格式、UTC 时区（如 2026-08-07T12:34:56+00:00）。平台只给非标准字符串时原样透传，解析前建议做容错。null 表示平台未公开。 |
| platform | 数据来源平台标识，与请求里的 platform 一致（如 xiaohongshu、tiktok）。 |
| media_urls | platform-native meaning |
| embed_url | platform-native meaning |
| embed_title | platform-native meaning |
| hashtags | 帖子里的话题标签，按出现顺序；帖子里没有时不出现这个字段。 |
| mentions | 帖子里 @ 提及的账号（handle），按出现顺序；没有时不出现这个字段。 |
| links | 帖子正文里的外部链接；没有时不出现这个字段。 |

## 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": "bluesky",
  "action": "user_posts",
  "params": {
    "username": "bsky.app"
  }
}'
```

```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": "bluesky",
        "action": "user_posts",
        "params": {
            "username": "bsky.app",
        },
    },
    timeout=120,
)
print(response.status_code)
print(response.json())
```

## Response example

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

```text
{
  "id": "req_…",
  "platform": "bluesky",
  "action": "user_posts",
  "results": [
    {
      "id": "at://did:plc:z72i7hdynmk6r22z27h6tvur/app.bsky.feed.post/3mykozpeyv22w",
      "url": "https://bsky.app/profile/bsky.app/post/3mykozpeyv22w",
      "text": "this was the exact use case we had in mind while we were building it",
      "author_username": "bsky.app",
      "author_name": "•••",
      "author_id": "•••",
      "author_avatar_url": "https://cdn.bsky.app/•••",
      "lang": "en",
      "like_count": 90,
      "repost_count": 3,
      "comment_count": 4,
      "quote_count": 0,
      "bookmark_count": 0,
      "is_reply": true,
      "is_repost": false,
      "posted_at": "2026-10-23T17:24:06.492000+00:00",
      "platform": "bluesky"
    },
    {
      "id": "at://did:plc:z72i7hdynmk6r22z27h6tvur/app.bsky.feed.post/3myinmg7his27",
      "url": "https://bsky.app/profile/bsky.app/post/3myinmg7his27",
      "text": "please make sure to get the goat's permission",
      "author_username": "bsky.app",
      "author_name": "•••",
      "author_id": "•••",
      "author_avatar_url": "https://cdn.bsky.app/•••",
      "lang": "en",
      "like_count": 73,
      "repost_count": 2,
      "comment_count": 1,
      "quote_count": 0,
      "bookmark_count": 1,
      "is_reply": true,
      "is_repost": false,
      "posted_at": "2026-10-22T21:53:27.448000+00:00",
      "platform": "bluesky"
    }
  ],
  "count": 20,
  "billing": {
    "charged": …,
    "charged_usd": …,
    "balance_after_usd": …,
    …
  },
  "quota": { … }
}
```

## Also

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