https://github.com/jamiew/bluesky-search
Simple API for searching Bluesky posts via the AT Protocol
https://github.com/jamiew/bluesky-search
atproto bluesky bun hono search
Last synced: 11 days ago
JSON representation
Simple API for searching Bluesky posts via the AT Protocol
- Host: GitHub
- URL: https://github.com/jamiew/bluesky-search
- Owner: jamiew
- Created: 2026-03-26T01:20:44.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2026-03-26T01:20:55.000Z (4 months ago)
- Last Synced: 2026-06-25T14:24:27.004Z (26 days ago)
- Topics: atproto, bluesky, bun, hono, search
- Language: TypeScript
- Homepage:
- Size: 7.81 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# bluesky-search
Simple API for searching Bluesky posts via the AT Protocol. Defaults to searching for "grand army plaza".
## Setup
```sh
bun install
cp .env.example .env
```
Fill in your `.env`:
- `BSKY_HANDLE` — your Bluesky handle (e.g. `you.bsky.social`)
- `BSKY_APP_PASSWORD` — create one at Bluesky → Settings → Privacy and Security → App Passwords
## Scripts
```sh
bun run dev # dev server with auto-reload (port 4000)
bun run start # production server
bun run check # typecheck
bun run test # curl-based smoke tests (server must be running)
```
## API
### `GET /search`
| Param | Default | Description |
|----------|--------------------|------------------------------|
| `q` | `grand army plaza` | Search query (Lucene syntax) |
| `sort` | `top` | `top` or `latest` |
| `limit` | `25` | Results per page (max 100) |
| `cursor` | | Pagination cursor |
| `since` | | ISO date, e.g. `2025-01-01` |
| `until` | | ISO date |
Response:
```json
{
"posts": [
{
"uri": "at://did:plc:.../app.bsky.feed.post/...",
"cid": "...",
"url": "https://bsky.app/profile/handle/post/rkey",
"text": "Post content...",
"author": {
"handle": "user.bsky.social",
"displayName": "User Name",
"avatar": "https://..."
},
"createdAt": "2025-03-20T12:00:00.000Z",
"likeCount": 5,
"repostCount": 1,
"replyCount": 2
}
],
"cursor": "..."
}
```
Use `cursor` from the response to paginate: `/search?q=...&cursor=`.
### `GET /health`
Returns `{ "ok": true }`.