> Documentation index: https://docs.scrapier.io/llms.txt
> Auth: header `X-API-Key: <key>` · Base: https://api.scrapier.io/api/v2 · Synchronous; paginate with `cursor` ← `data.next_cursor`.

# Bluesky User Posts

Structured Bluesky data: send `handles`. Cursor-paginated, 1 credit per successful call.

`GET|POST https://api.scrapier.io/api/v2/bluesky-user-posts/` · 1 credit per successful call · Cursor-paginated

## Overview

Call `GET /api/v2/bluesky-user-posts/` with `handles`. The results are in `data.posts`; send `data.next_cursor` back as `cursor` to get the next page. 5 optional parameters refine the call (see Parameters).

## Request

```bash
curl -G "https://api.scrapier.io/api/v2/bluesky-user-posts/" \
  -H "X-API-Key: YOUR_API_KEY" \
  --data-urlencode "handles=espn.com" \
  --max-time 210
```

```python
import requests

resp = requests.get(
    "https://api.scrapier.io/api/v2/bluesky-user-posts/",
    headers={"X-API-Key": "YOUR_API_KEY"},
    params={"handles": "espn.com"},
    timeout=210,
)
body = resp.json()
if not resp.ok:
    raise RuntimeError(body.get("error") or body.get("detail"))

print(body["data"]["posts"])
```

POST with a JSON body works too (same parameters; the body is merged over the query string).

## Parameters

| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| `X-API-Key` (header) | string | yes | — | Your API key. |
| `handles` | string | yes | e.g. `espn.com` | Bluesky account: a handle ("espn.com", "@espn.com"), a profile URL (https://bsky.app/profile/espn.com), an at:// URI or a DID ("did:plc:x7d6j54pm22ufehkes6jo4jf") -> ONE native getAuthorFeed page (30 posts) per call in feed order, each row with the post's text, author, media, like / reply / repost / quote counts, the full post record + embed and the computed block (engagement_rate, language, content_category). An unknown / deactivated / taken-down / blocked account or an empty feed answers one status row (next_cursor null). Required on the first call; ignored when `cursor` is supplied. A raw Bluesky cursor (a v1 row's pagination.next_cursor) passed as `cursor` on the first call starts the walk there. |
| `cursor` | string | no | — | Pagination cursor returned in the previous response's `next_cursor`. Pass it back unchanged to fetch the next page. When `next_cursor` is null, you have reached the last page. |
| `filter` | string | no | `posts_and_author_threads` | posts_and_author_threads (default) \| posts_no_replies \| posts_with_replies \| posts_with_media \| posts_with_video - getAuthorFeed's own filter (applied by Bluesky after slicing, so a page can be shorter than 30). One of: `posts_and_author_threads`, `posts_no_replies`, `posts_with_replies`, `posts_with_media`, `posts_with_video`. Locked in cursor. |
| `include_pins` | boolean | no | `true` | true (default) = the pinned post rides on top of page 1 (is_pinned_copy true, an extra item); false = chronological only. Locked in cursor. |
| `compute_metrics` | boolean | no | `true` | true (default) = getProfile on page 1 fills account_followers_count / account_posts_count and computed.engagement_rate (carried in the cursor for later pages). Locked in cursor. |
| `video_duration` | boolean | no | `true` | true (default) = video posts get duration_seconds from their HLS playlist. Locked in cursor. |
| `use_proxy` | boolean | no | `true` | Route the request through Scrapier's residential proxy pool. Default: `true`. Leave as is unless support tells you otherwise. |
| `raw_data` | boolean | no | `false` | When true, the response carries the full raw upstream payload(s) the scraper received (GraphQL / JSON API bodies, HTML, embedded JSON-LD -- exactly as the platform returned them) under `raw_responses`, in place of the formatted items. When false (default) you get the formatted output. Pagination (`cursor` / `next_cursor`) works the same in both modes. |

## Response

HTTP 200. Results are in `data.posts`. Sample from the live catalog, arrays trimmed to 3 items.

```json
{
  "success": true,
  "data": {
    "handles": "espn.com",
    "handle": "espn.com",
    "did": "did:plc:x7d6j54pm22ufehkes6jo4jf",
    "filter": "posts_no_replies",
    "include_pins": true,
    "status": "ok",
    "note": null,
    "account_followers_count": 296583,
    "account_posts_count": 872,
    "page": 1,
    "page_size": 30,
    "cursor_sent": null,
    "bluesky_cursor": "2025-09-25T17:06:11.912Z",
    "has_more": true,
    "posts": [
      {
        "input_handle": "espn.com",
        "handle": "espn.com",
        "did": "did:plc:x7d6j54pm22ufehkes6jo4jf",
        "status": "ok",
        "position": 1,
        "post_id": "3muznlkmspz2x",
        "uri": "at://did:plc:x7d6j54pm22ufehkes6jo4jf/app.bsky.feed.post/3muznlkmspz2x",
        "cid": "bafyreiceaay7jrgqznvxhttsmizofewx3mj6bwebjtz76nd2wh4hix4fty",
        "url": "https://bsky.app/profile/espn.com/post/3muznlkmspz2x",
        "text": "One more sleep until NFL football is BACK. 🏈",
        "published_at": "2026-09-08T18:27:24.700Z",
        "indexed_at": "2026-09-08T18:27:30.159Z",
        "author_handle": "espn.com",
        "author_did": "did:plc:x7d6j54pm22ufehkes6jo4jf",
        "author_display_name": "ESPN",
        "like_count": 85,
        "reply_count": 8,
        "repost_count": 11,
        "quote_count": 6,
        "bookmark_count": 0,
        "is_pinned": false,
        "is_pinned_copy": false,
        "is_repost": false,
        "is_reply": false,
        "media_urls": [
          "https://video.bsky.app/watch/.../playlist.m3u8"
        ],
        "thumbnail_url": "https://video.bsky.app/watch/.../thumbnail.jpg",
        "duration_seconds": 34.567,
        "post": {
          "id": "3muznlkmspz2x",
          "url": "https://bsky.app/profile/espn.com/post/3muznlkmspz2x",
          "content": {
            "text": "One more sleep until NFL football is BACK. 🏈",
            "...": "..."
          },
          "author": {
            "username": "espn.com",
            "display_name": "ESPN",
            "verified": true,
            "did": "did:plc:x7d6j54pm22ufehkes6jo4jf",
            "...": "..."
          },
          "engagement": {
            "views": null,
            "likes": 85,
            "comments": 8,
            "shares": 11,
            "saves": 0,
            "quote_count": 6
          },
          "flags": {
            "nsfw": false,
            "spoiler": null,
            "pinned": false,
            "deleted": false
          },
          "published_at": "2026-09-08T18:27:24.700Z",
          "record": {
            "$type": "app.bsky.feed.post",
            "...": "..."
          },
          "embed": {
            "$type": "app.bsky.embed.video#view",
            "...": "..."
          },
          "...": "(same shape as the v1 row)"
        },
        "computed": {
          "engagement_rate": 0.0371,
          "language": "en",
          "content_category": "sports",
          "estimated_reach": null
        },
        "category_keywords": [
          "football",
          "nfl"
        ],
        "account_followers_count": 296583,
        "account_posts_count": 872,
        "filter": "posts_no_replies",
        "pagination": {
          "page": 1,
          "cursor_sent": null,
          "next_cursor": "2025-09-25T17:06:11.912Z",
          "has_more": true
        },
        "scraped_at": "2026-09-22T08:47:10.412Z"
      },
      {
        "position": 2,
        "post_id": "3mpglmolczz2w",
        "text": "Former Tennessee Titans and Arizona Cardinals running back Chris Johnson...",
        "like_count": 129,
        "reply_count": 16,
        "repost_count": 33,
        "quote_count": 17,
        "...": "(same shape as row 1)"
      },
      "... 28 more rows (positions 3-30: 3mov4cob7hn2x, 3mnzrylb65e2d, ... 3lzogruhwz52e) ..."
    ],
    "warnings": [],
    "next_cursor": "eyJjIjoiMjAyNS0wOS0yNVQxNzowNjoxMS45MTJaIiwiaCI6ImVzcG4uY29tIiwibGsiOnsiZmlsdGVyIjoicG9zdHNfbm9fcmVwbGllcyJ9LCJwIjoxLCJwZiI6eyJkaWQiOiJkaWQ6cGxjOng3ZDZqNTRwbTIydWZlaGtlczZqbzRqZiIsImZvbGxvd2Vyc0NvdW50IjoyOTY1ODMsImhhbmRsZSI6ImVzcG4uY29tIiwicG9zdHNDb3VudCI6ODcyfSwicGluIjpudWxsLCJwb3MiOjMwLCJzIjpbImtlczZqbzRqZi8zbXV6bmxrbXNwejJ4Iiwia2VzNmpvNGpmLzNtcGdsbW9sY3p6MnciLCIuLi4iXX0"
  }
}
```

## Response fields

| Field | Type | Example | Description |
|---|---|---|---|
| `handles` | string | `espn.com` |  |
| `handle` | string | `espn.com` |  |
| `did` | string | `did:plc:x7d6j54pm22ufehkes6jo4jf` |  |
| `filter` | string | `posts_no_replies` |  |
| `include_pins` | boolean | `true` |  |
| `status` | string | `ok` |  |
| `note` | null | `null` |  |
| `account_followers_count` | integer | `296583` |  |
| `account_posts_count` | integer | `872` |  |
| `page` | integer | `1` |  |
| `page_size` | integer | `30` |  |
| `cursor_sent` | null | `null` |  |
| `bluesky_cursor` | string | `2025-09-25T17:06:11.912Z` |  |
| `has_more` | boolean | `true` |  |
| `posts` | array | `[3 items]` | The results. |
| `warnings` | array | `[]` |  |
| `next_cursor` | string | `eyJjIjoiMjAyNS0wOS0yNVQxNzowNjoxMS45MTJaIiwia…` | Pass back as `cursor` for the next page. `null` on the last page. |
| `posts[].input_handle` | string | `espn.com` |  |
| `posts[].handle` | string | `espn.com` |  |
| `posts[].did` | string | `did:plc:x7d6j54pm22ufehkes6jo4jf` |  |
| `posts[].status` | string | `ok` |  |
| `posts[].position` | integer | `1` |  |
| `posts[].post_id` | string | `3muznlkmspz2x` |  |
| `posts[].uri` | string | `at://did:plc:x7d6j54pm22ufehkes6jo4jf/app.bsk…` |  |
| `posts[].cid` | string | `bafyreiceaay7jrgqznvxhttsmizofewx3mj6bwebjtz7…` |  |
| `posts[].url` | string | `https://bsky.app/profile/espn.com/post/3muznl…` |  |
| `posts[].text` | string | `One more sleep until NFL football is BACK. 🏈` |  |
| `posts[].published_at` | string | `2026-09-08T18:27:24.700Z` |  |
| `posts[].indexed_at` | string | `2026-09-08T18:27:30.159Z` |  |
| `posts[].author_handle` | string | `espn.com` |  |
| `posts[].author_did` | string | `did:plc:x7d6j54pm22ufehkes6jo4jf` |  |
| `posts[].author_display_name` | string | `ESPN` |  |
| `posts[].like_count` | integer | `85` |  |
| `posts[].reply_count` | integer | `8` |  |
| `posts[].repost_count` | integer | `11` |  |
| `posts[].quote_count` | integer | `6` |  |
| `posts[].bookmark_count` | integer | `0` |  |
| `posts[].is_pinned` | boolean | `false` |  |
| `posts[].is_pinned_copy` | boolean | `false` |  |
| `posts[].is_repost` | boolean | `false` |  |
| `posts[].is_reply` | boolean | `false` |  |
| `posts[].media_urls` | array | `[1 item]` |  |
| `posts[].thumbnail_url` | string | `https://video.bsky.app/watch/.../thumbnail.jpg` |  |
| `posts[].duration_seconds` | number | `34.567` |  |
| `posts[].post` | object | `{…}` |  |
| `posts[].computed` | object | `{…}` |  |
| `posts[].category_keywords` | array | `[2 items]` |  |
| `posts[].account_followers_count` | integer | `296583` |  |
| `posts[].account_posts_count` | integer | `872` |  |
| `posts[].filter` | string | `posts_no_replies` |  |
| `posts[].pagination` | object | `{…}` |  |
| `posts[].scraped_at` | string | `2026-09-22T08:47:10.412Z` |  |

## Pagination

Pass `data.next_cursor` back as `cursor` until it is `null`. Required inputs are ignored once a cursor is sent. Each page is one billed call.

```python
import requests

URL = "https://api.scrapier.io/api/v2/bluesky-user-posts/"
HEADERS = {"X-API-Key": "YOUR_API_KEY"}
params = {"handles": "espn.com"}
items = []

for _ in range(10):  # each page is one billed call
    resp = requests.get(URL, headers=HEADERS, params=params, timeout=210)
    resp.raise_for_status()
    data = resp.json()["data"]
    items.extend(data.get("posts") or [])
    if not data.get("next_cursor"):  # None = last page
        break
    params = {"cursor": data["next_cursor"]}
```

## Errors

Failed calls are free. Branch on HTTP status; the message is in `error` (or `detail`). See https://docs.scrapier.io/errors.md

- **400** Bad input. The exact message varies by endpoint. `{"success":false,"error":"…"}`
- **402** Balance below the endpoint's price. `{"error":"Insufficient credits. Buy more to scrape more.","balance":1,"required":2}`
- **403** Invalid or unknown API key. `{"detail":"Authentication service unavailable or invalid API key."}`
- **429** Throttled — wait for Retry-After. `{"detail":"Request was throttled. Expected available in N seconds."}`
- **404** unknown slug · **503** busy (retry after `Retry-After`) · **5xx** upstream failure or timeout (retry with backoff).

## Notes

- Locked into the cursor: `filter`, `include_pins`, `compute_metrics`, `video_duration`. Set them on the first call; later pages reuse them.

## Related

- [Bluesky Profile Info](https://docs.scrapier.io/api-reference/bluesky/bluesky-profile-info.md): Structured Bluesky data: send `handles`. Single lookup, 1 credit per successful call.
- [Bluesky Single Posts](https://docs.scrapier.io/api-reference/bluesky/bluesky-single-posts.md): Structured Bluesky data: send `urls`. Cursor-paginated, 1 credit per successful call.
