# 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:** 2 total users, 1 monthly users, 100.0% 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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=sones/bluesky-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Bluesky Scraper",
        "description": "Fast, low-cost scraper for Bluesky (AT Protocol). Extract posts, profiles, followers, and search results. HTTP-only, no browser needed.",
        "version": "1.0",
        "x-build-id": "qiQzYCTdwctbBmkR7"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/sones~bluesky-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-sones-bluesky-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/sones~bluesky-scraper/runs": {
            "post": {
                "operationId": "runs-sync-sones-bluesky-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/sones~bluesky-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-sones-bluesky-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "action"
                ],
                "properties": {
                    "action": {
                        "title": "Action",
                        "enum": [
                            "getProfiles",
                            "searchPosts",
                            "getAuthorFeed",
                            "searchActors",
                            "getFollowers",
                            "getFollows",
                            "getPostThread"
                        ],
                        "type": "string",
                        "description": "What type of data to scrape",
                        "default": "getProfiles"
                    },
                    "handles": {
                        "title": "Handles",
                        "type": "array",
                        "description": "Bluesky handles or DIDs. Used for: Get Profiles, Get Author Feed, Get Followers, Get Follows.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "searchQuery": {
                        "title": "Search Query",
                        "type": "string",
                        "description": "Search term. Used for: Search Posts, Search Users."
                    },
                    "postUrls": {
                        "title": "Post URLs",
                        "type": "array",
                        "description": "Post URLs (at:// URIs or bsky.app links). Used for: Get Post Thread.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "maxResults": {
                        "title": "Max Results",
                        "minimum": 1,
                        "maximum": 10000,
                        "type": "integer",
                        "description": "Maximum number of results per handle or query",
                        "default": 100
                    },
                    "sort": {
                        "title": "Sort Order",
                        "enum": [
                            "top",
                            "latest"
                        ],
                        "type": "string",
                        "description": "Sort order for Search Posts.",
                        "default": "latest"
                    },
                    "filter": {
                        "title": "Feed Filter",
                        "enum": [
                            "posts_with_replies",
                            "posts_no_replies",
                            "posts_with_media",
                            "posts_and_author_threads"
                        ],
                        "type": "string",
                        "description": "Which posts to include. Used for: Get Author Feed.",
                        "default": "posts_no_replies"
                    },
                    "proxy": {
                        "title": "Proxy Configuration",
                        "type": "object",
                        "description": "Bluesky's public API doesn't require a proxy. Only enable if you hit rate limits.",
                        "default": {
                            "useApifyProxy": false
                        }
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
