> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stophy.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Bsky profile

> Read a Bluesky profile page as JSON with the bsky-profile parser. $1 per 1,000 calls. Send the page to scrape. Examples in cURL, TypeScript and Python.

Reads a Bluesky profile page, like bsky.app/profile/bsky.app, and returns one profile as JSON.

## Make a request

Send the page's URL to [scrape](https://docs.stophy.dev/api-reference/endpoint/scrape.md) with a `json` format that names the parser. Get an API key in the [Quickstart](https://docs.stophy.dev/quickstart).

```bash cURL theme={null}
curl -X POST https://api.stophy.dev/v1/scrape \
  -H "Authorization: Bearer $STOPHY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://bsky.app/profile/bsky.app","formats":[{"type":"json","parser":"bsky-profile"}]}'
```

```typescript TypeScript theme={null}
const response = await fetch("https://api.stophy.dev/v1/scrape", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.STOPHY_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    url: "https://bsky.app/profile/bsky.app",
    formats: [{ type: "json", parser: "bsky-profile" }],
  }),
});
console.log(await response.json());
```

```python Python theme={null}
import os

import requests

response = requests.post(
    "https://api.stophy.dev/v1/scrape",
    headers={"Authorization": f"Bearer {os.environ['STOPHY_API_KEY']}"},
    json={
        "url": "https://bsky.app/profile/bsky.app",
        "formats": [{"type": "json", "parser": "bsky-profile"}],
    },
)
print(response.json())
```

## Read the response

The parser's data is in `data.json`. Its fields include `id`, `url`, `handle`, `name`, `bio`, `avatarUrl`, `isVerified`, `followers`, `following`, `posts`, `website`, `location` and `category`. This sample is cut to the first items.

```json theme={null}
{
  "success": true,
  "data": {
    "json": {
      "id": "did:plc:z72i7hdynmk6r22z27h6tvur",
      "url": "https://bsky.app/profile/bsky.app",
      "handle": "bsky.app",
      "name": "Bluesky",
      "bio": "official Bluesky account (check username👆)\n\nBugs, feature requests, feedback: name@example.com",
      "avatarUrl": "https://cdn.bsky.app/img/avatar/plain/did:plc:z72i7hdynmk6r22z27h6tvur/bafkreihwihm6kpd6zuwhhlro75p5qks5qtrcu55jp3gddbf…",
      "isVerified": true,
      "followers": 35709725,
      "following": 43,
      "posts": 923,
      "website": null,
      "location": null,
      "category": null,
      "bannerUrl": "https://cdn.bsky.app/img/banner/plain/did:plc:z72i7hdynmk6r22z27h6tvur/bafkreichzyovokfzmymz36p5jibbjrhsur6n7hjnzxrpbt5…",
      "createdAt": "2023-04-12T04:53:57.057Z"
    }
  }
}
```

## Options

Send options in the `options` object of the `json` format.

| Option | What it does |
| - | - |
| `view` | Picks one of the answers this parser can give: `posts`. |

## Price

\$1 per 1,000 calls. See [Pricing](https://docs.stophy.dev/account/pricing.md).

## Limits and errors

* The URL must be a Bluesky profile page, like bsky.app/profile/bsky.app. Send options view posts for the profile's posts, and options cursor from the last answer for the next page. A page can be empty with a cursor, so keep paging until the cursor is null. Any other URL fails with `invalidRequest`.
* The answer comes back in `data.json`. If the page cannot be read, the call fails with an error code from [Errors](https://docs.stophy.dev/api-reference/errors.md).

## Related

* [Pre-built parsers](https://docs.stophy.dev/scrape/prebuilt-parsers) lists every parser.
* [Scrape](https://docs.stophy.dev/scrape/overview) has the options every scrape takes.
* [Bsky post](https://docs.stophy.dev/scrape/prebuilt-parsers/social/bsky-post.md)
* [Reddit search](https://docs.stophy.dev/scrape/prebuilt-parsers/social/reddit-search.md)
* [Reddit post](https://docs.stophy.dev/scrape/prebuilt-parsers/social/reddit-post.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.