# Bluesky Scraper (`sones/bluesky-scraper`) Actor

Fast, low-cost scraper for Bluesky (AT Protocol). Extract posts, profiles, followers, and search results. HTTP-only, no browser needed.

- **URL**: https://apify.com/sones/bluesky-scraper.md
- **Developed by:** [Samy](https://apify.com/sones) (community)
- **Categories:** Social media, Lead generation, Developer tools
- **Stats:** 1 total users, 1 monthly users, 93.3% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Bluesky Scraper

Fast, low-cost scraper for Bluesky social network using the AT Protocol public API. Extracts posts, profiles, followers, follows, and search results. HTTP-only — no browser or headless rendering needed.

### Why this scraper is cheap

Bluesky's AT Protocol exposes a **fully public, unauthenticated API** with generous rate limits (~3000 requests per 5 minutes). No proxy is required, no login needed, no anti-bot measures to bypass. This means:

- **$0 proxy cost** — direct HTTP requests
- **256 MB memory** — no browser overhead
- **~1000 results per $0.01** of compute

### Supported Actions

#### `getProfiles`

Fetch detailed profiles for a list of handles or DIDs.

**Input:**

```json
{
    "action": "getProfiles",
    "handles": ["jay.bsky.team", "bsky.app"]
}
```

#### `searchPosts`

Search for posts matching a query.

**Input:**

```json
{
    "action": "searchPosts",
    "searchQuery": "artificial intelligence",
    "sort": "top",
    "maxResults": 500
}
```

#### `getAuthorFeed`

Get posts from specific authors.

**Input:**

```json
{
    "action": "getAuthorFeed",
    "handles": ["jay.bsky.team"],
    "filter": "posts_no_replies",
    "maxResults": 1000
}
```

#### `searchActors`

Search for users/profiles.

**Input:**

```json
{
    "action": "searchActors",
    "searchQuery": "data scientist",
    "maxResults": 200
}
```

#### `getFollowers`

Get the followers of specified accounts.

**Input:**

```json
{
    "action": "getFollowers",
    "handles": ["jay.bsky.team"],
    "maxResults": 5000
}
```

#### `getFollows`

Get accounts that the specified users follow.

**Input:**

```json
{
    "action": "getFollows",
    "handles": ["jay.bsky.team"],
    "maxResults": 5000
}
```

#### `getPostThread`

Get a post and its replies (full thread).

**Input:**

```json
{
    "action": "getPostThread",
    "postUrls": [
        "https://bsky.app/profile/jay.bsky.team/post/3abc123",
        "at://did:plc:abc123/app.bsky.feed.post/3xyz789"
    ]
}
```

### Output Format

#### Profile output

```json
{
    "type": "profile",
    "did": "did:plc:...",
    "handle": "jay.bsky.team",
    "displayName": "Jay",
    "description": "Building Bluesky",
    "avatar": "https://.../",
    "followersCount": 150000,
    "followsCount": 500,
    "postsCount": 3200,
    "url": "https://bsky.app/profile/jay.bsky.team"
}
```

#### Post output

```json
{
    "type": "post",
    "uri": "at://did:plc:.../app.bsky.feed.post/...",
    "authorHandle": "jay.bsky.team",
    "authorDisplayName": "Jay",
    "text": "Hello world!",
    "createdAt": "2024-01-15T10:30:00.000Z",
    "likeCount": 42,
    "repostCount": 5,
    "replyCount": 3,
    "quoteCount": 1,
    "images": [],
    "hasMedia": false,
    "url": "https://bsky.app/profile/jay.bsky.team/post/3abc123"
}
```

### Input Configuration

| Field | Type | Description | Default |
|-------|------|-------------|---------|
| `action` | enum | What to scrape (required) | — |
| `handles` | string\[] | Bluesky handles or DIDs | — |
| `searchQuery` | string | Search term | — |
| `postUrls` | string\[] | Post URLs (bsky.app or at:// URIs) | — |
| `maxResults` | integer | Max results per handle/query | 100 |
| `sort` | enum | Sort order for searchPosts | "latest" |
| `filter` | enum | Feed filter for getAuthorFeed | "posts\_no\_replies" |
| `proxy` | object | Proxy config (not needed!) | No proxy |

### Rate Limits

The AT Protocol public API allows ~3000 requests per 5 minutes. The scraper automatically:

- Adds a 50ms baseline delay between requests
- Handles 429 (Too Many Requests) with exponential backoff
- Retries on server errors (5xx)

### Cost Estimation

| Action | 1000 items | Estimated cost |
|--------|-----------|---------------|
| getProfiles | 1000 requests | ~$0.01 |
| searchPosts | 10 paginated requests | ~$0.001 |
| getAuthorFeed | 10 paginated requests | ~$0.001 |
| getFollowers | 10 paginated requests | ~$0.001 |

No proxy cost. No browser cost. Just HTTP requests to a public API.

### Pay-per-event pricing

This actor uses Apify pay-per-event pricing with a small Actor start charge and per-result events. Current event prices:

| Event | Price |
|-------|------:|
| `apify-actor-start` | $0.00005 |
| `profile` | $0.00003 |
| `search-post` | $0.00002 |
| `author-feed-post` | $0.00002 |
| `search-actor` | $0.00003 |
| `follower` | $0.00003 |
| `follow` | $0.00003 |
| `thread-post` | $0.00002 |

# Actor input Schema

## `action` (type: `string`):

What type of data to scrape

## `handles` (type: `array`):

Bluesky handles or DIDs. Used for: Get Profiles, Get Author Feed, Get Followers, Get Follows.

## `searchQuery` (type: `string`):

Search term. Used for: Search Posts, Search Users.

## `postUrls` (type: `array`):

Post URLs (at:// URIs or bsky.app links). Used for: Get Post Thread.

## `maxResults` (type: `integer`):

Maximum number of results per handle or query

## `sort` (type: `string`):

Sort order for Search Posts.

## `filter` (type: `string`):

Which posts to include. Used for: Get Author Feed.

## `proxy` (type: `object`):

Bluesky's public API doesn't require a proxy. Only enable if you hit rate limits.

## Actor input object example

```json
{
  "action": "getProfiles",
  "handles": [
    "bsky.app"
  ],
  "maxResults": 100,
  "sort": "latest",
  "filter": "posts_no_replies",
  "proxy": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `dataset` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "handles": [
        "bsky.app"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("sones/bluesky-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "handles": ["bsky.app"] }

# Run the Actor and wait for it to finish
run = client.actor("sones/bluesky-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "handles": [
    "bsky.app"
  ]
}' |
apify call sones/bluesky-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,sones/bluesky-scraper"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/nAGMkdhmPsbGL4UQk/builds/qiQzYCTdwctbBmkR7/openapi.json
