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

Bluesky scraper for public posts: search by keyword or hashtag (latest or top, date and language filters) or read any account's posts. One row per post with text, likes, reposts, replies, quotes, hashtags, links and media URLs. No login. Monitor mode returns only new posts.

- **URL**: https://apify.com/datahamster/bluesky-scraper.md
- **Developed by:** [Viktor Dubnytskiy](https://apify.com/datahamster) (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

from $0.80 / 1,000 result items

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

Search Bluesky posts by keyword or hashtag, or pull the latest posts of any public account, and get one flat row per post: text, timestamp, language, likes, reposts, replies, quotes, hashtags, links and media URLs. No Bluesky account, no app password, no API key. The actor reads the same public API the Bluesky app uses for logged-out visitors.

**Try it:** the prefilled example returns 20 rows in about 9 seconds and costs about $0.02. Results cost $1 per 1,000.

### What you get

Real rows from a test run (`searchQueries: ["climate"]`, `handles: ["bsky.app"]`):

| text | account | createdAt (UTC) | likes / reposts / replies / quotes | link or media |
|---|---|---|---|---|
| no kings includes billionaires who think they’re kings | `bsky.app` | 2026-10-17 21:55 | 9293 / 1796 / 670 / 422 |  |
| You can learn a little more about profile links in this blog post f... | `bsky.app` | 2026-10-22 16:11 | 906 / 77 / 27 / 12 | `https://bsky.social/about/blog/10-22-2026-introducing-profil...` |
| saw some cool clouds today | `bsky.app` | 2026-10-14 17:35 | 7693 / 418 / 240 / 44 | `https://cdn.bsky.app/img/feed_fullsize/plain/...` |

Search row for `climate` (`sort: latest`): `text: "\"I want to be really proud of the country that I live in\"..."`, `createdAt: 2026-11-01T16:37:25.246Z`, `langs: ["en"]`, `likeCount: 3`.

Profile row for `bsky.app`: `followersCount: 35479880`, `followsCount: 34`, `postsCount: 907`.

Reply row (no author fields): `text: "Edit button..?"`, `likeCount: 2`, `parentPostUrl: https://bsky.app/profile/bsky.app/post/3mz4cvpstb22v`.

Full row: `id`/`uri`, `url`, `kind`, `text`, `createdAt`, `indexedAt`, `langs`, `likeCount`, `repostCount`, `replyCount`, `quoteCount`, `bookmarkCount`, `hashtags`, `links`, `mentionsCount`, `isReply`, `contentLabels`, `embedType`, `imageUrls`, `imageCount`, `videoUrl`, `hasVideo`, `videoThumbnailUrl`, `externalUrl`, `externalTitle`, `quotedPostUri`, `authorHandle`, `authorDisplayName`, `source`, `query`, `scrapedAt`.

The posting account appears only as its handle and display name. Reply rows carry text, counters and media counts, never the replier or links to the replier's media. Accounts that switched on Bluesky's "hide my content from logged-out users" setting are skipped entirely.

### Use cases

- **Brand and topic monitoring.** Save a task with your brand name or hashtag in monitor mode and get only the posts that appeared since the last run, with a webhook or Telegram alert.
- **Research datasets.** Pull every recent post on a topic in one language between two dates, with engagement counters and media links, for sentiment or trend work.
- **Account tracking.** Follow what a newsroom, company or public figure posts on Bluesky and how each post performs.

### Try it in 10 seconds

**One-off search**: press **Start**, the input already works (`searchQueries: ["climate"]`, `maxPostsPerSource: 20`, `maxItems: 20`).

**Monitor mode**: save the task, then set:

```json
{
  "mode": "monitor",
  "monitorStateId": "my-brand-watch",
  "searchQueries": ["your brand", "#yourhashtag"],
  "sort": "latest",
  "webhookUrl": "https://your-endpoint.example.com/hook"
}
```

and put it on a schedule (Apify, Schedules, cron `0 * * * *` for hourly). Each run charges one `monitor-check` and returns only posts that are new since the previous run.

### Related actors

- [Threads Scraper](https://apify.com/datahamster/threads-scraper): the same keyword search and profile posts for Threads.
- [Truth Social Scraper](https://apify.com/datahamster/truth-social-posts): public posts of Truth Social accounts with a monitor mode.
- [Reddit Scraper](https://apify.com/datahamster/reddit-scraper): subreddit posts, search results and comments.

### Input

| Field | Meaning | Default |
|---|---|---|
| `searchQueries` | Keywords, phrases or hashtags (Bluesky search syntax, e.g. `from:`, `"exact phrase"`) | `["climate"]` |
| `sort` | `latest` (newest first, deep paging) or `top` (most engaged, one page of up to 100) | `latest` |
| `since` / `until` | Only posts created in this window, `2026-10-01` or an ISO datetime | empty |
| `lang` | Search only: language code such as `en`, `de`, `ja` | empty |
| `handles` | Accounts whose own posts to read: `nytimes.com`, `@bsky.app`, `https://bsky.app/profile/...` | empty |
| `includeProfiles` | One extra row per handle with followers, follows and posts counters | `false` |
| `includeReplies` | Add reply rows (text and counters only) under every post that has replies | `false` |
| `maxRepliesPerPost` | Reply rows per post | `20` |
| `maxPostsPerSource` | Posts per query or handle | `100` |
| `maxItems` | Stop the run after this many rows | `200` |
| `mode`, `monitorStateId`, `webhookUrl`, `telegramBotToken`, `telegramChatId` | Monitor mode settings | `scrape` |

### Pricing

| Event | Price |
|---|---|
| result | $0.001 per row ($1 per 1,000) |
| monitor-check | $0.005 per monitor run |
| change | $0.001 per new post in monitor mode |

Apify Store discounts apply: SILVER plans pay 10% less, GOLD and higher plans pay 20% less on every event. You pay only for rows actually pushed, and a run that finds nothing charges no result events. Platform usage is billed by Apify on top; the actor uses no proxy, so it stays small.

### Limits

- Bluesky blocks the search `cursor` for logged-out clients. With `sort: latest` the actor pages by moving the `until` bound to the oldest post it has seen, which reaches deep into the past. `sort: top` is one page of up to 100 posts per query. To get more top posts, split the period with `since` and `until`.
- Each query or handle reads at most 50 pages (5,000 posts).
- Reposts in an account feed are skipped because their author is another account.
- Counters are the values at scrape time.
- No follower lists, no like lists, no reply authors.

### FAQ

**Do I need a Bluesky account or an app password?** No. There is no credential field. Every request is a logged-out public API call.

**Why does a search return fewer than 100 posts per page?** Posts from accounts that hide themselves from logged-out visitors are removed after fetching.

**What happens when nothing matches?** No rows are pushed and nothing is charged. The `RUN_SUMMARY` record in the run's key-value store carries `emptyReason`.

### Changelog

- 0.1: initial release with keyword search (latest and top), account feeds, profile counters, replies and monitor mode.

***

If this actor saved you time, a short review on its Store page helps other people find it. Found a bug or need a field? Open a ticket on the **Issues** tab.

# Actor input Schema

## `searchQueries` (type: `array`):

Keywords, phrases or hashtags, one per line, e.g. "climate", "#photography", ""exact phrase"". Bluesky search operators such as from:handle work too. Leave empty to read only Handles.

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

latest = newest first, paged back in time without a limit other than Max posts per source. top = Bluesky's ranking, one page of up to 100 posts per query.

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

Only posts created on or after this date, e.g. "2026-10-01" or "2026-10-01T12:00:00Z". Applies to searches and handles.

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

Only posts created up to this date (a bare date includes the whole day), e.g. "2026-10-31". Applies to searches and handles.

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

Search only: keep posts in this language, ISO 639-1 code such as "en", "de" or "ja". Leave empty for all languages.

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

Accounts whose own posts to read, newest first: "nytimes.com", "@bsky.app" or "https://bsky.app/profile/bsky.app". A bare name like "alice" means alice.bsky.social. Reposts are skipped.

## `includeProfiles` (type: `boolean`):

true = one extra row (kind: profile) per handle with handle, display name, followers, follows and posts counters. No bio, no avatar, no follower lists.

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

true = for every post with replies, add reply rows (kind: reply) with text, timestamps and counters. Reply authors are never collected. Each post with replies costs one extra request.

## `maxRepliesPerPost` (type: `integer`):

Reply rows per post when Include replies is on, e.g. 20. Range 1-200.

## `maxPostsPerSource` (type: `integer`):

Posts taken from each search query and each handle, e.g. 100. The run still stops at Max items. Range 1-5000.

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

Stop the run after this many rows, e.g. 20. You are charged only for pushed rows.

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

scrape = full results; monitor = only new/changed items since the previous run of this task

## `monitorStateId` (type: `string`):

Optional state id when not running as a saved task (monitor mode)

## `webhookUrl` (type: `string`):

POST a change summary here in monitor mode

## `telegramBotToken` (type: `string`):

Optional: bot token for monitor-mode change summaries

## `telegramChatId` (type: `string`):

Optional: chat id that receives monitor-mode summaries

## Actor input object example

```json
{
  "searchQueries": [
    "climate"
  ],
  "sort": "latest",
  "since": "",
  "until": "",
  "lang": "",
  "handles": [],
  "includeProfiles": false,
  "includeReplies": false,
  "maxRepliesPerPost": 20,
  "maxPostsPerSource": 20,
  "maxItems": 20,
  "mode": "scrape"
}
```

# Actor output Schema

## `results` (type: `string`):

All pushed rows (dataset, JSON)

## `resultsTable` (type: `string`):

Dataset in the Console viewer

## `runSummary` (type: `string`):

RUN_SUMMARY record

# 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 = {
    "searchQueries": [
        "climate"
    ],
    "since": "",
    "until": "",
    "lang": "",
    "handles": [],
    "maxPostsPerSource": 20,
    "maxItems": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("datahamster/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 = {
    "searchQueries": ["climate"],
    "since": "",
    "until": "",
    "lang": "",
    "handles": [],
    "maxPostsPerSource": 20,
    "maxItems": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("datahamster/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 '{
  "searchQueries": [
    "climate"
  ],
  "since": "",
  "until": "",
  "lang": "",
  "handles": [],
  "maxPostsPerSource": 20,
  "maxItems": 20
}' |
apify call datahamster/bluesky-scraper --silent --output-dataset

```

## MCP server setup

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