# Bluesky Posts Scraper (`lexis-solutions/bluesky-posts-scraper`)

The Apify Bluesky Posts Scraper allows a programmatic search for posts on Bluesky and the option to export to CSV, JSON, Excel, or integration with Zapier, Make, or any custom workflow.

- **URL**: https://beta-securitybyobscurity.apify.com/lexis-solutions/bluesky-posts-scraper.md
- **Developed by:** [Lexis Solutions](https://beta-securitybyobscurity.apify.com/lexis-solutions) (community)
- **Categories:** Social media, Lead generation
- **Stats:** 198 total users, 34 monthly users, 95.7% runs succeeded, 20 bookmarks
- **User rating**: 4.64 out of 5 stars

## Pricing

Pay per event

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/platform/actors/running/actors-in-store#pay-per-event

# README

## Bluesky Posts Scraper

![banner](https://lexis-solutions-apify.fra1.cdn.digitaloceanspaces.com/banners/bsky.png)

### What is the Bluesky Posts Scraper?

The Bluesky Posts Scraper is a tool specifically developed to extract post data from Bluesky, a decentralized social networking platform. It allows users to access and analyze public posts, interactions, and metadata related to user activities on Bluesky. This scraper is ideal for research, analytics, and monitoring trends on the platform.

### What data can the Bluesky Posts Scraper extract?

The Bluesky Posts Scraper can pull various types of data from the platform, including:

- Post content
- Post IDs
- User IDs
- Timestamps of posts
- Engagement metrics (likes, retweets, replies)
- Media URLs (images, links)

### What use cases does the Bluesky Posts Scraper have?

- 📈 Trend analysis
- 🚀 Influencer tracking
- 📊 Social media research
- 🛠 Brand monitoring

### How to use the Bluesky Posts Scraper

1. Sign up for a free account on Apify
2. Navigate to the Bluesky Posts Scraper actor
3. Input your queries
4. Click Start and wait for the results
5. Export the data in your preferred format (JSON, CSV)

### 📥 Input

To run the actor, you'll need to input a search queries. This is required.

Along with the search queries, you can also specify the following optional parameters:

- `limit` - The maximum number of posts to scrape per query. Default is 100.
- `sort` - The sorting order for the posts. Options are `latest` or `top`. Default is `latest`.
- `since` - The date from which to start scraping posts. This is useful for scraping posts from a specific date.
- `until` - The date until which to scrape posts. This is useful for scraping posts until a specific date.
- `language` - The language of the posts to scrape. This is useful for filtering posts by language.
- `proxyConfiguration` - The proxy configuration to use for the request. This is useful for avoiding IP bans.

### 📤 Output

The scraped data is stored in the default dataset associated with the actor. Here’s an example of what each item in the dataset looks like:

```json
{
  "id": "bafyreibqjfx2ejvxkd3okjtodoyqvoyk7wuberwonsakdjv4yahp2lrn4a",
  "authorId": "did:plc:pc2aiklrpzwgsiq3fuohbui4",
  "authorName": "Keri Warbis",
  "authorUsername": "keriwarbis.bsky.social",
  "authorAvatar": "https://cdn.bsky.app/img/avatar/plain/did:plc:pc2aiklrpzwgsiq3fuohbui4/bafkreihgejbtckxrsgrba7ckx6mlsofe6nzvs4t2m54y2in6edcp65tlne@jpeg",
  "text": "Bit sunburnt from yesterday’s stint in the garden.\n\nBit hungover from Eurovision.\n\nAnother day of sun and entertaining ahead.\n\nSunday roast at The Grand will be happening to round of the day.",
  "images": [
    {
      "thumb": "https://cdn.bsky.app/img/feed_thumbnail/plain/did:plc:pc2aiklrpzwgsiq3fuohbui4/bafkreiejc6jc4z47urksbwn7owoyyi4o46ufi362e52bscl4bsjrj4izyq@jpeg",
      "fullsize": "https://cdn.bsky.app/img/feed_fullsize/plain/did:plc:pc2aiklrpzwgsiq3fuohbui4/bafkreiejc6jc4z47urksbwn7owoyyi4o46ufi362e52bscl4bsjrj4izyq@jpeg",
      "alt": "",
      "aspectRatio": {
        "height": 820,
        "width": 828
      }
    }
  ],
  "link": null,
  "primaryImage": "https://cdn.bsky.app/img/feed_fullsize/plain/did:plc:pc2aiklrpzwgsiq3fuohbui4/bafkreiejc6jc4z47urksbwn7owoyyi4o46ufi362e52bscl4bsjrj4izyq@jpeg",
  "createdAt": "2024-05-12T08:36:29.345Z",
  "langs": ["en"],
  "replyCount": 0,
  "repostCount": 0,
  "likeCount": 0,
  "url": "https://bsky.app/profile/keriwarbis.bsky.social/post/3kxkwdhu77o23"
}
```

### Why use the Bluesky Posts Scraper?

- ⚡️ **Efficient** - Quickly collects comprehensive post data across Bluesky.
- 🤖 **Automated** - Automates data collection, saving time and reducing manual effort.
- 🔄 **Regular Updates** - Regularly updated to ensure compatibility with the latest Bluesky platform changes.

### FAQ

- **What is Bluesky?**
  Bluesky is a decentralized social networking platform focused on fostering open and public conversations.

- **How to find posts on Bluesky?**
  You can search directly on Bluesky using hashtags or user profiles. For automated searches, the Bluesky Posts Scraper can be used.

- **Is scraping Bluesky posts legal?**
  Scraping public information is generally legal, but it’s important to respect user privacy and adhere to the platform's terms of use.

- **How much does it cost?**
  Pricing details are available at the top of this page, or you can visit the Apify Store page for more information.

### Related Scrapers by Lexis Solutions

👉 Check out our other scrapers:

- [Facebook User Scraper](https://apify.com/lexis-solutions/facebook-user-search-scraper)
- [Facebook Views (Watch) Scraper](https://apify.com/lexis-solutions/facebook-videos-watch-scraper)
- [Bluesky Users Scraper](https://apify.com/lexis-solutions/bluesky-users-scraper)

***

👀 p.s.

Got feedback or need an extension?

Lexis Solutions is a [certified Apify Partner](https://apify.com/partners). We can help you with custom solutions or data extraction projects.

Contact us over [Email](mailto:info@lexis.solutions) or [LinkedIn](https://www.linkedin.com/company/lexis-solutions)

Image Credit: Google Transparency Center

# Actor input Schema

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

Queries to scrape

## `query` (type: `string`):

Use 'queries' instead.

## `limit` (type: `integer`):

Maximum number of items to scrape

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

Sort by

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

Since when to scrape posts

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

Until when to scrape posts

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

Language of the posts

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

Your proxy configuration from Apify

## Actor input object example

```json
{
  "queries": [
    "bluesky"
  ],
  "limit": 100,
  "sort": "latest",
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": []
  }
}
```

# 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": [
        "bluesky"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("lexis-solutions/bluesky-posts-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": ["bluesky"] }

# Run the Actor and wait for it to finish
run = client.actor("lexis-solutions/bluesky-posts-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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": [
    "bluesky"
  ]
}' |
apify call lexis-solutions/bluesky-posts-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=lexis-solutions/bluesky-posts-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Bluesky Posts Scraper",
        "description": "The Apify Bluesky Posts Scraper allows a programmatic search for posts on Bluesky and the option to export to CSV, JSON, Excel, or integration with Zapier, Make, or any custom workflow.",
        "version": "0.0",
        "x-build-id": "N9XAbP1QbqJYrda44"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/lexis-solutions~bluesky-posts-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-lexis-solutions-bluesky-posts-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/lexis-solutions~bluesky-posts-scraper/runs": {
            "post": {
                "operationId": "runs-sync-lexis-solutions-bluesky-posts-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/lexis-solutions~bluesky-posts-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-lexis-solutions-bluesky-posts-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "queries": {
                        "title": "Queries",
                        "type": "array",
                        "description": "Queries to scrape",
                        "items": {
                            "type": "string"
                        }
                    },
                    "query": {
                        "title": "(DEPRECATED) Query",
                        "type": "string",
                        "description": "Use 'queries' instead."
                    },
                    "limit": {
                        "title": "Max Items",
                        "minimum": 1,
                        "maximum": 10000,
                        "type": "integer",
                        "description": "Maximum number of items to scrape",
                        "default": 100
                    },
                    "sort": {
                        "title": "Sort",
                        "enum": [
                            "top",
                            "latest"
                        ],
                        "type": "string",
                        "description": "Sort by",
                        "default": "latest"
                    },
                    "since": {
                        "title": "Since",
                        "type": "string",
                        "description": "Since when to scrape posts"
                    },
                    "until": {
                        "title": "Until",
                        "type": "string",
                        "description": "Until when to scrape posts"
                    },
                    "lang": {
                        "title": "Language",
                        "type": "string",
                        "description": "Language of the posts"
                    },
                    "proxyConfiguration": {
                        "title": "Proxy Configuration",
                        "type": "object",
                        "description": "Your proxy configuration from Apify",
                        "default": {
                            "useApifyProxy": true,
                            "apifyProxyGroups": []
                        }
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
