# Bluesky Scraper - Posts, Profiles, Followers, Threads (`omar_jarvis/bluesky-data`) Actor

Search Bluesky posts, get profiles, author feeds, full threads, followers, following, likes, reposts and quotes, or monitor keywords for new posts. Official AT Protocol API, no login, no cookies.

- **URL**: https://apify.com/omar_jarvis/bluesky-data.md
- **Developed by:** [Omar Nassar](https://apify.com/omar_jarvis) (community)
- **Categories:** Social media
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$1.00 / 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/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, Monitoring

Get Bluesky data from the official, open AT Protocol API (the Bluesky AppView). No login, no cookies, no API key, no proxy.

### Modes

| Mode | Input field | One result per |
|---|---|---|
| `search` | `queries` | Post that matches the query and the filters |
| `monitor` | `queries` | New post since the last run (keyword monitoring) |
| `profiles` | `accounts` | Profile: bio, follower, following and post counts, join date, bio links and emails |
| `authorFeed` | `accounts` | Post, reply or repost of the account, all pages |
| `thread` | `posts` | Post in the thread: parents, the post, all replies with their depth |
| `followers` | `accounts` | Account that follows the account |
| `following` | `accounts` | Account that the account follows |
| `likes` | `posts` | Account that liked the post, with the like time |
| `reposts` | `posts` | Account that reposted the post |
| `quotes` | `posts` | Quote post of the post |

Accounts can be handles (`bsky.app`, `@jay.bsky.team`), DIDs (`did:plc:...`) or profile URLs. Posts can be `https://bsky.app/profile/<handle>/post/<id>` URLs or `at://` URIs.

### Search filters

`search` and `monitor` accept: `author`, `mentions`, `lang` (two-letter code), `domain` (posts that link to a domain), `tags` (hashtags), `since`, `until` and `sort` (`latest` or `top`). `since` and `until` also apply to `authorFeed`.

### Limits of the public API

- **Search: at most 100 posts per query.** Without login, Bluesky serves only the first page of search results. A request for the next page gets HTTP 403. To get more posts, use more specific queries, or split a period into date windows with `since` and `until`.
- Bluesky rejects `since` and `until` on a search without a keyword. To get the posts of one account by date, use `authorFeed`.
- `thread`: Bluesky returns up to about 200 direct replies per post. Deleted, blocked and hidden replies are not returned. For very large threads, `reply_count` is higher than the number of replies in the dataset.
- `profiles`: up to 25 profiles per request. Accounts that do not exist give an error row.

### Keyword monitoring

`monitor` stores the newest post time and the delivered post URIs per query in a named key-value store (`monitorStateName`, default `bluesky-data-monitor`). Schedule the same input. Each run returns only posts that earlier runs did not return. The first run returns the latest posts and sets the baseline. Because search gives at most 100 posts per query, schedule the monitor often enough that fewer than 100 new posts appear between runs.

### Output

Post rows (`type: "post"`):

| Field | Meaning |
|---|---|
| `url`, `uri`, `cid` | Link on bsky.app, AT URI, content ID |
| `text`, `langs`, `created_at`, `indexed_at` | Post text, languages, times |
| `author_handle`, `author_did`, `author_name`, `author_avatar`, `author_url` | Author |
| `like_count`, `repost_count`, `reply_count`, `quote_count`, `bookmark_count` | Counts |
| `links`, `hashtags`, `mentions` | From the rich-text facets and the link card. Mentions have `did` and `handle`. |
| `images`, `video`, `external` | Full-size image URLs with alt text and size, video playlist (HLS) and thumbnail, link card |
| `quoted_post` | The quoted post: URL, author, text, counts |
| `is_reply`, `reply_parent_uri`, `reply_root_uri`, `is_quote` | Reply and quote structure |
| `feed_reason`, `reposted_by_handle`, `reposted_at` | `authorFeed` only: `post`, `repost` or `pinned` |
| `thread_role`, `thread_depth`, `thread_anchor_uri` | `thread` only: `parent` (negative depth), `anchor` (0) or `reply` (1 and higher) |

Profile rows (`type: "profile"`): `handle`, `did`, `url`, `display_name`, `description`, `bio_links`, `bio_emails`, `avatar`, `banner`, `followers_count`, `follows_count`, `posts_count`, `lists_count`, `feeds_count`, `starter_packs_count`, `verified`, `pinned_post_url`, `created_at`, `labels`. In `followers`, `following`, `likes` and `reposts`, the counts are `null` unless `enrichProfiles` is `true`. `likes` rows also have `liked_at`.

Every row has `mode`, `input` and `error`.

### Pricing

**$0.001 per result** (pay per event `result`). One charge per row without an error. Error rows (unknown account, deleted post, API failure) are not charged. When an input fails after some results, the results stay in the dataset and are charged; the error row tells how many. The run stops when it reaches your maximum cost per run.

### Rate limits

The actor waits at least 60 ms between requests. On HTTP 429 or 5xx it waits for the `retry-after` or `ratelimit-reset` header (or backs off exponentially) and retries up to 5 times.

### Local test

```
bash test/run-cases.sh            # every case in test/cases, live API
bash test/run-cases.sh monitor    # two monitor runs on one store, checks for duplicates
```

# Actor input Schema

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

What to fetch. search and monitor use Search queries. profiles, authorFeed, followers and following use Accounts. thread, likes, reposts and quotes use Posts.

## `queries` (type: `array`):

For search and monitor. One query per line. Supports phrases in quotes and Lucene-style syntax. Leave empty to search on the filters below only.

## `accounts` (type: `array`):

For profiles, authorFeed, followers and following. Handles (bsky.app, @jay.bsky.team), DIDs (did:plc:...) or profile URLs (https://bsky.app/profile/...).

## `posts` (type: `array`):

For thread, likes, reposts and quotes. Post URLs (https://bsky.app/profile/<handle>/post/<id>) or at:// URIs.

## `maxItems` (type: `integer`):

Upper limit of results for each query, account or post. You pay only for results delivered.

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

latest = newest first. top = Bluesky's ranking.

## `author` (type: `string`):

Only posts by this account (handle or DID).

## `mentions` (type: `string`):

Only posts that mention this account (handle or DID).

## `lang` (type: `string`):

Only posts in this language, as a two-letter code (en, nl, de, ja).

## `domain` (type: `string`):

Only posts that link to this domain, e.g. nytimes.com.

## `tags` (type: `array`):

Only posts with all of these hashtags (without #).

## `since` (type: `string`):

Only posts from this date or time on (inclusive). YYYY-MM-DD or ISO date-time.

## `until` (type: `string`):

Only posts before this date or time (exclusive). YYYY-MM-DD or ISO date-time.

## `includeReplies` (type: `boolean`):

Include the account's replies to other posts.

## `includeReposts` (type: `boolean`):

Include posts the account reposted. Each repost row has feed_reason = repost.

## `includePins` (type: `boolean`):

Include the account's pinned post first.

## `mediaOnly` (type: `boolean`):

Only posts with images or video.

## `includeParents` (type: `boolean`):

If the post is a reply, also return the posts above it, up to the root.

## `enrichProfiles` (type: `boolean`):

Adds followers_count, follows_count and posts_count to each account. Uses one extra request per 25 accounts. Same price.

## `monitorStateName` (type: `string`):

Name of the key-value store that remembers what monitor already returned. Use a different name per monitoring project. Schedule the same input to get only new posts on each run.

## `concurrency` (type: `integer`):

How many inputs to process in parallel.

## Actor input object example

```json
{
  "mode": "search",
  "queries": [
    "apify"
  ],
  "accounts": [
    "bsky.app"
  ],
  "maxItems": 200,
  "sort": "latest",
  "includeReplies": true,
  "includeReposts": true,
  "includePins": false,
  "mediaOnly": false,
  "includeParents": true,
  "enrichProfiles": false,
  "monitorStateName": "bluesky-data-monitor",
  "concurrency": 2
}
```

# Actor output Schema

## `results` (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 = {
    "mode": "search",
    "queries": [
        "apify"
    ],
    "accounts": [
        "bsky.app"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("omar_jarvis/bluesky-data").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",
    "queries": ["apify"],
    "accounts": ["bsky.app"],
}

# Run the Actor and wait for it to finish
run = client.actor("omar_jarvis/bluesky-data").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 '{
  "mode": "search",
  "queries": [
    "apify"
  ],
  "accounts": [
    "bsky.app"
  ]
}' |
apify call omar_jarvis/bluesky-data --silent --output-dataset

```

## MCP server setup

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

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/KKkMWu1eWlpyMgfLk/builds/nyLJz0uIq9ATaMrSs/openapi.json
