# Bluesky Scraper — Posts, Profiles, Search & Author Feeds (`angaba92/bluesky-scraper`) Actor

Extract Bluesky posts, profiles, search results, metrics, and author feeds using public AT Protocol endpoints.

- **URL**: https://apify.com/angaba92/bluesky-scraper.md
- **Developed by:** [Andres Garcia-Baquero Leon](https://apify.com/angaba92) (community)
- **Categories:** Social media, Automation, AI
- **Stats:** 2 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.20 / 1,000 results

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 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 — Posts, Profiles, Search & Author Feeds

Extract public Bluesky data via AT Protocol endpoints. Search posts, scrape author feeds, find profiles, and collect profile metrics.

### Features

- Search Bluesky posts by keyword
- Get latest posts from an author
- Search profiles by keyword
- Fetch a single profile by handle / DID
- Includes engagement metrics: likes, reposts, replies, quotes
- Uses public AT Protocol endpoints; no login required

### Input examples

#### Search posts

```json
{
  "mode": "search_posts",
  "query": "apify",
  "sort": "latest",
  "maxResults": 50
}
```

#### Author feed

```json
{
  "mode": "author_feed",
  "handle": "bsky.app",
  "maxResults": 50
}
```

#### Profile search

```json
{
  "mode": "search_profiles",
  "query": "open source",
  "maxResults": 20
}
```

#### Single profile

```json
{
  "mode": "profile",
  "handle": "bsky.app"
}
```

### Input fields

| Field | Type | Default | Description |
|---|---:|---:|---|
| `mode` | string | `search_posts` | `search_posts`, `author_feed`, `search_profiles`, `profile` |
| `query` | string | - | Search query for post/profile search |
| `handle` | string | - | Bluesky handle or DID |
| `sort` | string | `latest` | `latest` or `top` for post search |
| `maxResults` | integer | `50` | Number of items to return, 1-1000 |

### Output: post

```json
{
  "type": "post",
  "uri": "at://...",
  "url": "https://bsky.app/profile/user.bsky.social/post/abc",
  "text": "Post text",
  "createdAt": "2026-01-01T00:00:00.000Z",
  "authorHandle": "user.bsky.social",
  "authorDisplayName": "User",
  "replyCount": 1,
  "repostCount": 2,
  "likeCount": 3,
  "quoteCount": 0
}
```

### Output: profile

```json
{
  "type": "profile",
  "did": "did:plc:...",
  "handle": "bsky.app",
  "displayName": "Bluesky",
  "followersCount": 1000000,
  "postsCount": 1234,
  "url": "https://bsky.app/profile/bsky.app"
}
```

### Use cases

- Social listening and brand monitoring
- Creator discovery
- AI/RAG datasets from Bluesky posts
- Competitor and topic monitoring
- Growth analytics for Bluesky accounts

### Pricing

Pay Per Event:

- `$0.005` per post returned
- `$0.010` per profile returned

You only pay when data is returned.

# Actor input Schema

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

What to scrape from Bluesky.

## `query` (type: `string`):

Search query for posts (search\_posts) or profiles (search\_profiles). Required for those modes.

## `handle` (type: `string`):

Bluesky handle or DID for profile / author\_feed mode, e.g. bsky.app.

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

Sort order for post search.

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

Maximum items to return (1-1000).

## Actor input object example

```json
{
  "mode": "search_posts",
  "query": "bluesky",
  "handle": "bsky.app",
  "sort": "latest",
  "maxResults": 50
}
```

# 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 = {
    "mode": "search_posts",
    "query": "bluesky",
    "handle": "bsky.app",
    "sort": "latest",
    "maxResults": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("angaba92/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 = {
    "mode": "search_posts",
    "query": "bluesky",
    "handle": "bsky.app",
    "sort": "latest",
    "maxResults": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("angaba92/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 '{
  "mode": "search_posts",
  "query": "bluesky",
  "handle": "bsky.app",
  "sort": "latest",
  "maxResults": 50
}' |
apify call angaba92/bluesky-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=angaba92/bluesky-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/0AOBM2moAKJXJCiPN/builds/1wQrcHXMIcJCjLUhH/openapi.json
