# Bluesky Posts Scraper · Keywords, Hashtags, Only New Posts (`thequietstack/bluesky-scraper`) Actor

Bluesky posts scraper for keyword and hashtag search, profiles and reply threads. Pages search results back in time instead of stopping at ~100, and an only-new-posts mode for scheduled monitoring so you never pay twice for the same post. Exact like, repost, reply and quote counts. No login.

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

## Pricing

from $1.50 / 1,000 scraped posts

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 Posts Scraper · Keywords, Hashtags, Only New Posts

Scrape Bluesky posts by **keyword**, **hashtag**, **profile** or **post URL (reply thread + quote posts)**. Every post becomes one flat row with exact like, repost, reply, quote and bookmark counts, hashtags, links, media and reply/quote references. No login, no Bluesky account, no API key.

### Why this scraper

- **Search that keeps going past the first page.** Logged-out Bluesky search refuses the `cursor` after page one (HTTP 403) and throttles single IPs hard. This Actor pages back through time instead (`until` stepping, deduplicated at the page borders) and sends every search page through a fresh proxy session. Measured on 23 Sep 2026: 15 pages × 100 posts in a row, 0 failed pages. If a page still fails after retries, the run summary says so per keyword — it never comes back short silently.
- **Only new posts, for scheduled monitoring.** Turn on `onlyNewPosts` and schedule the Actor. It remembers the newest post per keyword / hashtag / profile / thread and on the next run returns only what is newer. **You are not charged again for posts you already have.**
- **Real hashtag matches.** A hashtag search returns only posts that actually carry the tag, not posts that merely contain the word. Posts dropped by this or any other filter are never charged.
- **Honest thread counts.** For a post URL you get the post, every reply Bluesky's thread API returns (with depth), and optionally every quote post. The summary shows `replyCountOnPost` next to `repliesReturnedByBluesky`, so you can see exactly what Bluesky did and did not hand out.
- **A hard limit you can trust.** `maxPosts` stops the run cleanly; you are never charged for more posts than that, and never for duplicates.

### Input example

```json
{
    "searchTerms": ["web scraping", "\"open source\""],
    "hashtags": ["buildinpublic"],
    "profiles": ["bsky.app"],
    "postUrls": ["https://bsky.app/profile/bsky.app/post/3l6oveex3ii2l"],
    "includeQuotes": true,
    "sinceDate": "2026-09-01",
    "language": "en",
    "minLikes": 5,
    "onlyNewPosts": true,
    "maxPosts": 5000
}
```

Search filters: `language`, `fromAuthor`, `mentions` (brand monitoring), `domain` (posts linking to a site), `sinceDate` / `untilDate`. Bluesky search syntax inside a keyword works too.

### Output example

```json
{
    "url": "https://bsky.app/profile/bsky.app/post/3l6oveex3ii2l",
    "uri": "at://did:plc:z72i7hdynmk6r22z27h6tvur/app.bsky.feed.post/3l6oveex3ii2l",
    "authorHandle": "bsky.app",
    "authorDisplayName": "Bluesky",
    "text": "👋  Bluesky is an open social network that gives creators independence from platforms, ...",
    "createdAt": "2024-10-17T07:06:51.491Z",
    "likeCount": 63696,
    "repostCount": 9531,
    "replyCount": 8592,
    "quoteCount": 708,
    "bookmarkCount": 254,
    "languages": ["en"],
    "hashtags": [],
    "links": [],
    "images": [],
    "externalLink": null,
    "quotedPostUrl": null,
    "isReply": false,
    "replyParentUri": null,
    "sourceType": "thread-root",
    "source": "at://did:plc:z72i7hdynmk6r22z27h6tvur/app.bsky.feed.post/3l6oveex3ii2l"
}
```

| Field | Meaning |
|---|---|
| `likeCount`, `repostCount`, `replyCount`, `quoteCount`, `bookmarkCount` | Exact integers as Bluesky's AppView returns them at scrape time |
| `createdAt`, `indexedAt` | ISO 8601 UTC |
| `hashtags`, `links`, `mentionedDids` | From the post's rich-text facets |
| `images`, `video`, `externalLink`, `quotedPostUrl` | Embedded media, link card, quoted post |
| `isReply`, `replyParentUri`, `replyRootUri`, `depth` | Reply structure (`depth` for thread replies) |
| `sourceType` | `search`, `hashtag`, `profile`, `thread-root`, `thread-reply`, `quote` |

A run summary (`SUMMARY` in the key-value store) lists per source: posts written, fetched, skipped as already seen last run, filtered out (by reason), pages, and why paging stopped.

### Honest limits

- **Top sort is one page.** Logged-out Bluesky search serves relevance-sorted ("Top") results as a single page of about 100 posts. Use `latest` (the default) for more.
- **Threads:** Bluesky's thread API does not return every reply on very large threads (e.g. 739 of 8,592 on Bluesky's own welcome post, measured 23 Sep 2026). The summary shows both numbers.
- **Search needs the Apify proxy** (on by default): Bluesky refuses logged-out search from bare cloud IPs. Profiles, threads and quotes do not use it.
- Counts are a snapshot at scrape time. Deleted and private-list content is not available.
- Posts only. Follower lists and profile details are not part of this Actor.

### Pricing (pay per event)

- Actor start: tiny flat fee per run
- Per scraped post: charged only for posts written to the dataset — no charge for duplicates, filtered-out posts, or posts you already got in an earlier `onlyNewPosts` run

# Actor input Schema

## `searchTerms` (type: `array`):

Keywords or phrases. Bluesky search syntax works too ("exact phrase", from:, lang:). Each keyword is paged back in time until your date or post limit.

## `hashtags` (type: `array`):

With or without #. Each hashtag is its own search.

## `profiles` (type: `array`):

Get an account's posts: bsky.app, @jay.bsky.team, did:plc:..., or https://bsky.app/profile/<handle>.

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

https://bsky.app/profile/<handle>/post/<id> or at:// URIs. Returns the post and every reply Bluesky's thread API returns, with reply depth.

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

Latest is required for more than ~100 posts per keyword: logged-out Bluesky search serves Top as a single page.

## `sinceDate` (type: `string`):

YYYY-MM-DD or ISO date-time. Applies to every source (also thread replies and quotes). Paging stops once posts are older.

## `untilDate` (type: `string`):

Optional upper bound, exclusive.

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

Two-letter code, e.g. en, de, ja.

## `fromAuthor` (type: `string`):

Handle or DID.

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

Handle or DID. Useful for brand monitoring.

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

e.g. nytimes.com

## `profileFilter` (type: `string`):

Bluesky's own author-feed filter.

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

Reposted posts of other accounts, with a repostedBy field.

## `includeQuotes` (type: `boolean`):

For every post URL, also return all posts that quote it.

## `excludeReplies` (type: `boolean`):

Drop posts that are replies (search and profiles). Skipped posts are not charged.

## `minLikes` (type: `integer`):

Keep only posts with at least this many likes. Skipped posts are not charged.

## `minReposts` (type: `integer`):

Keep only posts with at least this many reposts. Skipped posts are not charged.

## `onlyNewPosts` (type: `boolean`):

For scheduled monitoring: remembers the newest post per keyword/hashtag/profile/thread in a named key-value store and returns only posts newer than that on the next run. You are not charged again for posts you already have.

## `stateStoreName` (type: `string`):

Named key-value store for the only-new-posts memory. Use a different name per monitoring task to keep them separate.

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

Stop each source after this many posts.

## `maxPosts` (type: `integer`):

The run stops cleanly at this number. You are never charged for more posts than this.

## `proxyConfiguration` (type: `object`):

Required for keyword/hashtag search: Bluesky refuses logged-out search from bare cloud IPs. Every search page goes out on a fresh session. Profiles and threads do not use the proxy.

## Actor input object example

```json
{
  "searchTerms": [
    "web scraping",
    "\"open source\""
  ],
  "hashtags": [
    "buildinpublic"
  ],
  "profiles": [
    "bsky.app"
  ],
  "postUrls": [
    "https://bsky.app/profile/bsky.app/post/3l6oveex3ii2l"
  ],
  "sort": "latest",
  "profileFilter": "posts_with_replies",
  "includeReposts": false,
  "includeQuotes": false,
  "excludeReplies": false,
  "onlyNewPosts": false,
  "stateStoreName": "bluesky-scraper-state",
  "maxPostsPerSource": 1000,
  "maxPosts": 5000,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `posts` (type: `string`):

One flat row per post: text, author, ISO dates, exact like/repost/reply/quote counts, hashtags, links, media, reply/quote references.

## `summary` (type: `string`):

Per keyword/profile/post: posts written, fetched, skipped as already seen, filtered out, why paging stopped.

# 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 = {
    "searchTerms": [
        "web scraping"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("thequietstack/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 = {
    "searchTerms": ["web scraping"],
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("thequietstack/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 '{
  "searchTerms": [
    "web scraping"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call thequietstack/bluesky-scraper --silent --output-dataset

```

## MCP server setup

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