# Bluesky Scraper — Posts, Profiles, Followers & Threads (`emperor1978/bluesky-scraper`) Actor

Scrape Bluesky social network data using the public AT Protocol API. Search posts by keyword, get user profiles, author feeds, followers/following lists, and full reply threads. No login or API key required. Export to JSON, CSV, or Excel. Fast pure-API scraping, no browser needed.

- **URL**: https://apify.com/emperor1978/bluesky-scraper.md
- **Developed by:** [The Emperor](https://apify.com/emperor1978) (community)
- **Categories:** Social media
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$2.00 / 1,000 result scrapeds

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?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Bluesky Scraper — Posts, Profiles, Followers & Threads

Scrape data from Bluesky (bsky.app) using the public AT Protocol API. No login, API key, or browser required — fast, reliable, and cost-effective.

### What can this scraper do?

- **Search posts** by keyword, with language and sort filters
- **Get user profiles** — followers count, posts count, bio, avatar
- **Scrape author feeds** — all posts from a specific user
- **Export followers and following lists** — social graph data
- **Scrape full threads** — parent post + all replies, nested

### Quick Start

1. Choose a **mode** (search, profile, feed, followers, following, or thread)
2. Enter your search query or Bluesky handles
3. Set max results and click **Start**
4. Export results as JSON, CSV, or Excel

#### Example: Search posts about "web scraping"

```json
{
    "mode": "search",
    "searchQuery": "web scraping",
    "maxResults": 100,
    "sort": "latest"
}
```

#### Example: Get a user's profile and recent posts

```json
{
    "mode": "feed",
    "handles": ["jay.bsky.team"],
    "maxResults": 50
}
```

#### Example: Export followers list

```json
{
    "mode": "followers",
    "handles": ["bsky.app"],
    "maxResults": 200
}
```

### Output fields

#### Posts (mode: search, feed, thread)

| Field | Description |
|-------|-------------|
| type | "post" |
| authorHandle | Author's Bluesky handle |
| authorDisplayName | Author's display name |
| text | Full post text |
| createdAt | Post creation timestamp |
| likeCount | Number of likes |
| repostCount | Number of reposts |
| replyCount | Number of replies |
| quoteCount | Number of quotes |
| language | Post language code |
| hasImages | Whether the post has images |
| hasLink | Whether the post has an external link |
| linkUrl | External link URL (if any) |
| bskyUrl | Direct URL to view on Bluesky |

#### Profiles (mode: profile)

| Field | Description |
|-------|-------------|
| handle | Bluesky handle |
| displayName | Display name |
| description | Bio text |
| followersCount | Number of followers |
| followsCount | Number of accounts followed |
| postsCount | Total posts |

#### Followers/Following (mode: followers, following)

| Field | Description |
|-------|-------------|
| handle | User's handle |
| displayName | Display name |
| description | Bio excerpt (300 chars) |

### Why use this scraper?

- **No authentication needed** — uses Bluesky's public AT Protocol API
- **No browser/Playwright** — pure API calls, fast and cheap to run
- **Rate-limit aware** — built-in delays and retry logic
- **Structured output** — clean, consistent JSON ready for analysis
- **Pay per result** — only pay for data you actually get

### Use cases

- Social media monitoring and brand tracking
- Academic research on public discourse
- Competitor analysis and market research
- Influencer discovery and audience analysis
- Content trend analysis

### Pricing

Pay-per-event: **$0.002 per result**. You only pay for results delivered to your dataset.

### Legal

This scraper accesses only public data through Bluesky's intentionally public AT Protocol API endpoints. Users are responsible for compliance with applicable laws and Bluesky's Terms of Service.

# Actor input Schema

## `mode` (type: `string`):

What to scrape: search posts by keyword, get profiles, author feeds, followers, following lists, or full threads.

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

Keyword to search for (mode=search). Example: 'artificial intelligence'

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

List of Bluesky handles to scrape (mode=profile/feed/followers/following). Example: jay.bsky.team

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

Direct Bluesky post URLs for thread scraping (mode=thread). Example: https://bsky.app/profile/jay.bsky.team/post/abc123

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

Maximum results per query or handle. Default 50, max 500.

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

Sort order for search results (mode=search only).

## `language` (type: `string`):

Filter by language code (mode=search). Example: en, ja, de. Leave empty for all languages.

## Actor input object example

```json
{
  "mode": "search",
  "searchQuery": "web scraping",
  "maxResults": 50,
  "sort": "latest"
}
```

# Actor output Schema

## `defaultDataset` (type: `string`):

Posts, profiles, followers, or following items from Bluesky.

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("emperor1978/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 = {}

# Run the Actor and wait for it to finish
run = client.actor("emperor1978/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 '{}' |
apify call emperor1978/bluesky-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,emperor1978/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/DAPpmpAURJqNUzpfl/builds/jOEo4iaz4lczg8uF1/openapi.json
