# Bluesky (`canadesk/bluesky`) Actor

Collect Bluesky posts, search results, profiles, followers and follows for multiple accounts or keywords.

- **URL**: https://apify.com/canadesk/bluesky.md
- **Developed by:** [Canadesk Support](https://apify.com/canadesk) (community)
- **Categories:** Lead generation, SEO tools, Social media
- **Stats:** 47 total users, 0 monthly users, 100.0% runs succeeded, 5 bookmarks
- **User rating**: 1.00 out of 5 stars

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-usage

## 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

Collect public Bluesky posts, profiles and audience data for research, monitoring and analysis. Run one account or a list of accounts and search terms, then export to JSON, CSV or Excel. No login or API key is required.

### Features

- **Get Posts:** posts from an account, including text, dates, engagement counts, media, links and rich-text facets.
- **Search for Posts:** keyword, phrase or advanced Lucene-style searches, with sorting and language filters.
- **Get Followers:** public accounts following a selected account.
- **Get Follows:** public accounts followed by a selected account.
- **Get Account Profile:** biography, images, follower/following counts, post count and other available profile fields.
- **Search for Accounts:** profiles matching a name or keyword.

### Get started

Choose a process and enter a Bluesky handle, profile URL or DID. For search modes, enter your search phrase instead. Use **Accounts or keywords** to supply multiple inputs in one run; this list takes priority over the single keyword field.

```json
{
  "process": "gp",
  "keywords": ["bsky.app", "washingtonpost.com"],
  "maximum": 50,
  "postsType": "posts_with_replies"
}
```

Existing integrations can continue sending a single string in `keyword`.

### Filters and limits

- **Maximum per input** limits the records collected for each account or search term. **Maximum total results** applies to the whole run.
- **Posts type** selects all posts, top-level posts, media posts or author threads.
- **Since** and **Until** include the full selected UTC calendar days for account posts. Search date filters are applied by Bluesky.
- Enable **Lucene query syntax** to put filters directly in a post-search query, such as `from:washingtonpost.com lang:en "climate"`. This overrides the separate language and date search fields.
- Post searches return up to 100 posts per query. Other list modes follow available pagination up to your limits.
- **Cursor** continues from a source cursor. Returned continuation cursors are available in the run's `RUN_SUMMARY` record.
- **Output format** offers flat records or a `data` array containing one record per row.

### Output

Post rows include `id`, `author`, `authorName`, `authorJoined`, `avatar`, `text`, `createdAt`, `replyCount`, `repostCount`, `likeCount`, `quoteCount`, `media`, `facets` and `url`, when available. Profile, follower, follow and account-search rows retain the public profile fields returned by Bluesky.

Business or research workflows can schedule recurring runs to monitor accounts and topics. Add a proxy if your connection is blocked.

For support, open an issue with your run URL and input.

# Actor input Schema

## `process` (type: `string`):

No description

## `keyword` (type: `string`):

A Bluesky handle, profile URL or DID; a search phrase for search modes.

## `keywords` (type: `array`):

Optional list of accounts or search terms. Takes priority over the single keyword.

## `last_id` (type: `string`):

Optional source cursor to continue a previous collection.

## `lucene` (type: `string`):

Only applies to Search for Posts. Read the Information tab!

## `postsType` (type: `string`):

Only for Get Posts.

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

Only applies to Search for Posts.

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

Only applies to Search for Posts.

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

YYYY-MM-DD, inclusive UTC calendar day for account posts.

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

YYYY-MM-DD, inclusive UTC calendar day for account posts.

## `savings` (type: `string`):

Flat records, or a data array containing one record per row.

## `maximum` (type: `integer`):

Maximum results for each input. Post search returns at most 100 per query.

## `maxResults` (type: `integer`):

Maximum real records across all inputs.

## `maxPages` (type: `integer`):

Maximum source pages across all inputs.

## `pause` (type: `integer`):

Delay in milliseconds.

## `proxy` (type: `object`):

Optional proxy for connecting to Bluesky.

## Actor input object example

```json
{
  "process": "gp",
  "keyword": "bsky.app",
  "lucene": "no",
  "postsType": "posts_with_replies",
  "sort": "latest",
  "lang": "all",
  "savings": "2",
  "maximum": 50,
  "maxResults": 10000,
  "maxPages": 1000,
  "pause": 1000,
  "proxy": {
    "useApifyProxy": false
  }
}
```

# 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 = {
    "keyword": "bsky.app",
    "last_id": "",
    "since": "",
    "until": "",
    "proxy": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("canadesk/bluesky").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 = {
    "keyword": "bsky.app",
    "last_id": "",
    "since": "",
    "until": "",
    "proxy": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("canadesk/bluesky").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 '{
  "keyword": "bsky.app",
  "last_id": "",
  "since": "",
  "until": "",
  "proxy": {
    "useApifyProxy": false
  }
}' |
apify call canadesk/bluesky --silent --output-dataset

```

## MCP server setup

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

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/p2NsYh3iNZBKI4YCQ/builds/Hg9qYdM1yclTeenob/openapi.json
