# Bluesky Posts Scraper - Keyword Search & Author Feeds (`captainhandsome/bluesky-search-and-author-scraper`) Actor

Search public Bluesky posts by keyword or hashtag, or read any public account's newest posts. Returns text, author, date, likes, reposts, replies, hashtags and links as clean JSON. Public AT Protocol API: no login, no API key, no proxy.

- **URL**: https://apify.com/captainhandsome/bluesky-search-and-author-scraper.md
- **Developed by:** [Joseph McRell](https://apify.com/captainhandsome) (community)
- **Categories:** Social media, Developer tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.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 Posts Scraper — keyword search and author feeds

Search public Bluesky posts by keyword, phrase or hashtag, or read the newest posts from any public Bluesky account. Get clean JSON rows you can export to CSV, Excel or a database: the post text, who wrote it, when, and how much engagement it got.

Built on the public AT Protocol API. **No login, no API key, no cookies, no proxy.** You pay per post returned; a run that returns nothing is not billed per result.

### What you can do with it

- Track what people say about a brand, product or hashtag on Bluesky.
- Collect posts for sentiment analysis, trend research or content ideas.
- Pull an account's recent posts with their like, repost, reply and quote counts.
- Find posts that link to a domain or carry a specific hashtag, then follow the links.

### Input

| Field | Type | Default | What it does |
|---|---|---|---|
| `queries` | list of text | `["christmas printables"]` | Words, phrases or hashtags to search. Each post returned is one billed result. |
| `authors` | list of text | `[]` | Handles (`bsky.app`) or DIDs (`did:plc:...`) whose newest posts you want. |
| `maxPostsPerQuery` | integer 1–100 | `20` | How many posts to return per search query. |
| `maxPostsPerAuthor` | integer 1–100 | `20` | How many newest posts to read per author. |
| `language` | text | empty | Two-letter language code, e.g. `en`. Empty means every language. |
| `includeReplies` | boolean | `false` | Include replies when reading author feeds. |

Searching for a query and reading an author at the same time is allowed; results are de-duplicated.

### Output

One row per post:

```json
{
  "rowType": "post",
  "foundBy": "search",
  "query": "christmas printables",
  "uri": "at://did:plc:.../app.bsky.feed.post/3n2...",
  "url": "https://bsky.app/profile/someone.bsky.social/post/3n2...",
  "cid": "bafyrei...",
  "authorDid": "did:plc:...",
  "authorHandle": "someone.bsky.social",
  "authorDisplayName": "Someone",
  "text": "the post text",
  "createdAt": "2026-11-18T13:48:17.000Z",
  "indexedAt": "2026-11-18T13:48:21.043Z",
  "langs": ["en"],
  "likeCount": 0,
  "repostCount": 0,
  "replyCount": 0,
  "quoteCount": 0,
  "bookmarkCount": 0,
  "isReply": false,
  "hashtags": ["LUFC"],
  "links": ["https://example.com/article"],
  "quotedPostUri": null,
  "externalTitle": "Title of a linked page, when the post embeds one",
  "externalDescription": "Description of that page",
  "scrapedAt": "2026-11-18T14:00:00.000Z"
}
```

### Useful queries

- A brand: `queries: ["yourbrand"]` — every post that mentions it.
- A hashtag: `queries: ["#etsyseller"]`.
- An exact phrase: `queries: ["\"open source\" ai"]` — AT Protocol search understands quotes.
- One account's recent posts: `authors: ["bsky.app"]`, `maxPostsPerAuthor: 50`.

### Pricing

Pay per post returned, plus a small per-run start fee. Nothing is charged for a post that is not delivered.

### Notes and limits

- Only public posts are returned. Deleted or private content cannot be fetched.
- Search returns posts from Bluesky's public search index; very recent posts can take a few seconds to appear.
- Large jobs: keep `maxPostsPerQuery` sensible — each row is billed.
- This Actor reads data only; it never posts, follows or likes anything.

### Support

If a run returns nothing or fails, the run log says which query or handle was refused. Fix the input and run again — nothing is billed per result when no rows are returned.

# Actor input Schema

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

Words, phrases or hashtags to search across public Bluesky posts, e.g. 'christmas printables' or 'etsy seller'. Each post is one billed result. Defaults to one query so a run with no input still returns data.

## `authors` (type: `array`):

Public Bluesky accounts to read, as handles like 'bsky.app' or DIDs like 'did:plc:...'. Reads the newest posts from each account. Leave empty to only search by keyword.

## `maxPostsPerQuery` (type: `integer`):

How many posts to return for each search query. Each row is one billed result.

## `maxPostsPerAuthor` (type: `integer`):

How many of the newest posts to read from each author handle.

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

Two-letter language code to restrict search results, e.g. 'en'. Leave empty to search every language.

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

When reading author handles, include replies as well as top-level posts.

## Actor input object example

```json
{
  "queries": [
    "christmas printables"
  ],
  "authors": [],
  "maxPostsPerQuery": 20,
  "maxPostsPerAuthor": 20,
  "language": "",
  "includeReplies": false
}
```

# Actor output Schema

## `dataset` (type: `string`):

One row per Bluesky post: text, author, date, engagement counts, hashtags and links.

# 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 = {
    "queries": [
        "christmas printables"
    ],
    "authors": [],
    "maxPostsPerQuery": 20,
    "maxPostsPerAuthor": 20,
    "language": "",
    "includeReplies": false
};

// Run the Actor and wait for it to finish
const run = await client.actor("captainhandsome/bluesky-search-and-author-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 = {
    "queries": ["christmas printables"],
    "authors": [],
    "maxPostsPerQuery": 20,
    "maxPostsPerAuthor": 20,
    "language": "",
    "includeReplies": False,
}

# Run the Actor and wait for it to finish
run = client.actor("captainhandsome/bluesky-search-and-author-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 '{
  "queries": [
    "christmas printables"
  ],
  "authors": [],
  "maxPostsPerQuery": 20,
  "maxPostsPerAuthor": 20,
  "language": "",
  "includeReplies": false
}' |
apify call captainhandsome/bluesky-search-and-author-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,captainhandsome/bluesky-search-and-author-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/SpsxhYLeWk9WIEmXM/builds/ShwWwMMyXmSpG6fjO/openapi.json
