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

Scrape Bluesky posts by keyword or profile, plus reply threads and profile details. Likes, reposts, media and links included. No login or proxy needed.

- **URL**: https://apify.com/aswin_dg/bluesky-scraper.md
- **Developed by:** [Aswin D G](https://apify.com/aswin_dg) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.50 / 1,000 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 Scraper

Get **Bluesky posts** as clean data: search by keyword or hashtag, collect everything an account posted, or pull a post with all the replies under it. Each post comes with likes, reposts, replies, images, video, links and hashtags. No Bluesky account, API key or proxy needed.

### What you can do with it

- **Monitor a topic or brand**: search for a keyword, hashtag or phrase and see who is talking about it and how much attention it gets.
- **Track accounts**: collect every post, reply or repost from competitors, journalists, creators or public figures.
- **Read the conversation**: get a post with its full reply thread, for sentiment analysis or customer research.
- **Build datasets** of public posts for research, analytics or AI projects.
- **Find the best content**: sort search results by Bluesky's own ranking to see what performs.

### How to use it

1. Add **search queries**, **profiles** or **post links** (any mix of the three).
2. Choose how many posts you want from each.
3. Click **Start**, then download the results as JSON, CSV or Excel, or read them through the API.

### Input

| Field | What it does |
| --- | --- |
| **Search queries** | Finds posts matching each search. Supports `"exact phrase"`, `#hashtag`, `from:handle`, `mentions:handle`, `domain:example.com` and `lang:en`. |
| **Profiles** | Collects the posts of each account. Handles (`bsky.app`), `@handles`, profile links and DIDs all work. |
| **Post links (with replies)** | Collects one post and the replies under it, as deep as **Reply depth** allows. |
| **Max posts per query, profile or post** | Stops after this many posts from each source. Default 100. |
| **Search order** | Latest first (as many posts as you ask for), or Bluesky's top-ranked posts (up to 100 per query, since Bluesky only returns one page of ranked results). |
| **Search language** | Only return results in one language (`en`, `es`, `ja`…). |
| **Only posts newer / older than** | Date limits. `2026-01-01` means midnight UTC; add a time and offset for your own time zone, like `2026-01-01T00:00:00+05:30`. |
| **Profile posts to include** | Posts and replies, posts only, or only posts with images or video. |
| **Include reposts** | Also collect what a profile reposted. |
| **Save profile details** | Saves bio, followers, following and post counts of each profile. |

Example:

```json
{
    "searchQueries": ["web scraping", "#opendata"],
    "profiles": ["bsky.app"],
    "postUrls": ["https://bsky.app/profile/bsky.app/post/3l6oveex3ii2l"],
    "maxItemsPerSource": 200,
    "postsNewerThan": "2026-01-01"
}
```

### Output

Each post is one record:

```json
{
    "uri": "at://did:plc:z72i7hdynmk6r22z27h6tvur/app.bsky.feed.post/3l6oveex3ii2l",
    "url": "https://bsky.app/profile/bsky.app/post/3l6oveex3ii2l",
    "createdAt": "2026-10-20T14:03:11.000Z",
    "text": "Post text here",
    "authorHandle": "bsky.app",
    "authorDisplayName": "Bluesky",
    "likeCount": 1520,
    "repostCount": 210,
    "replyCount": 87,
    "quoteCount": 31,
    "hashtags": ["news"],
    "links": ["https://example.com"],
    "mediaType": "images",
    "media": [{ "type": "image", "url": "https://cdn.example/photo.jpg", "thumbnail": "https://cdn.example/thumb.jpg", "alt": "A photo" }],
    "externalLink": { "url": "https://example.com", "title": "Example", "description": "A link card" },
    "isReply": false,
    "isRepost": false,
    "quotedPostUri": null,
    "sourceType": "profile",
    "source": "did:plc:z72i7hdynmk6r22z27h6tvur"
}
```

Records also include `uri`, `cid`, `langs`, `mentions`, `replyToUri`, `rootUri`, `repostedBy` and `labels`. `sourceType` and `source` tell you which search, profile or post found each record. A post found by several sources is saved only once.

With **Save profile details** on, the details of every profile (display name, bio, followers, following, post count, creation date, verification) are saved in the `PROFILES` record of the key-value store.

### Good to know

- **Public data only.** The Actor reads what any logged-out visitor can see. Accounts that hide their posts from logged-out users and deleted posts are skipped with a warning in the log.
- **Search results come from Bluesky's own search**, so you get what Bluesky finds, which can differ from what you see signed in.
- **Counts are a snapshot.** Likes, reposts and replies are as of the moment of the run.
- **Media is returned as links**, not downloaded. Videos are links to the stream playlist.
- **Respect the rules.** Only collect public information, follow Bluesky's terms and your local laws, and avoid collecting personal data you have no reason to hold.

### Tips

- Run it on a **schedule** with **Only posts newer than** to collect new posts every day.
- Use `from:handle` or `lang:en` inside a search query to keep results small and cheaper.
- Set **Reply depth** to `0` to get just the post from a link, or higher to read a whole discussion.

### Questions or a feature request?

Open an issue on the Actor page and describe what you need. Changes to Bluesky's API are handled quickly.

# Actor input Schema

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

Find posts that match these searches. Bluesky search operators work: "exact phrase", #hashtag, from:handle, mentions:handle, domain:example.com, lang:en.

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

Get the posts of these accounts. Use handles (bsky.app), @handles, profile links (https://bsky.app/profile/bsky.app) or DIDs.

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

Get a single post and the replies under it. Use post links like https://bsky.app/profile/bsky.app/post/3l6oveex3ii2l.

## `maxItemsPerSource` (type: `integer`):

Stop after this many posts from each search query, profile or thread.

## `searchSort` (type: `string`):

Newest posts first, or the posts Bluesky ranks highest. Top returns up to 100 posts per query.

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

Only return search results in this language. Use a two-letter code like en, es or ja. Leave empty for all languages.

## `postsNewerThan` (type: `string`):

Skip posts before this moment. A plain date like 2026-01-01 means midnight UTC. For your own time zone add a time and offset, for example 2026-01-01T00:00:00+05:30. Leave empty for no limit.

## `postsOlderThan` (type: `string`):

Skip posts after this moment. Same format as 'Only posts newer than'. Leave empty for no limit.

## `profilePosts` (type: `string`):

Which of a profile's posts to collect.

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

Also collect posts the profile reposted. These records have isRepost set and show who reposted them.

## `includeProfileInfo` (type: `boolean`):

Save followers, following, post counts and bio of each profile to the PROFILES record in the key-value store.

## `threadDepth` (type: `integer`):

How many levels of replies to collect under each post link. 0 returns only the post itself.

## `maxConcurrency` (type: `integer`):

How many queries, profiles or posts to process at the same time. Lower this if you see rate limit warnings.

## Actor input object example

```json
{
  "searchQueries": [
    "web scraping"
  ],
  "profiles": [
    "bsky.app"
  ],
  "postUrls": [],
  "maxItemsPerSource": 100,
  "searchSort": "latest",
  "language": "",
  "postsNewerThan": "",
  "postsOlderThan": "",
  "profilePosts": "posts_and_replies",
  "includeReposts": false,
  "includeProfileInfo": true,
  "threadDepth": 3,
  "maxConcurrency": 3
}
```

# Actor output Schema

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

No description

## `profiles` (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 = {
    "searchQueries": [
        "web scraping"
    ],
    "profiles": [
        "bsky.app"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("aswin_dg/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": ["web scraping"],
    "profiles": ["bsky.app"],
}

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

```

## MCP server setup

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