Bluesky
Bluesky posts, threads, profiles, followers, feeds, trends and the live Jetstream firehose
- Connector software
- Free and open source
- Service credentials
- Not needed
- Query Farm hosting
- Available Β· $10/month organization minimum
Use with an agent
Install the Orchard skill in your project to help your agent find connectors, configure them, and verify SQL results.
npx skills add Query-farm/vgi-skills --skill orchard
Copy this request into your coding agent to get started.
Use https://query.farm/products/orchard/connectors/bluesky/index.md to help me query Bluesky with DuckDB or Haybarn 2.0.1 and VGI protocol 3.4. Ask only for missing details about the result I need or whether I want local execution, self-hosting or Query Farm hosting. Check the connector's actual hosting availability, credentials and input requirements. Read one format of each needed reference and the exact object declarations before writing SQL. Use a released connector, and distinguish a saved example result from anything you actually execute. If you cannot run the query, tell me what remains to verify.
See what is trending on Bluesky
Example output Β· captured
- Connector release
- v0.5.1
- Engine
- 2.0.1
- VGI protocol
- 3.4.0
SELECT rank, display_name, category, post_count
FROM bluesky.main.trends
ORDER BY rank
| rank | display_name | category | post_count |
|---|---|---|---|
| 1 | Spain votes in general election | politics | 2754 |
| 2 | Russia's war in Ukraine continues | politics | 482 |
| 3 | This year's personal accomplishments | culture | 221 |
| 4 | GTA VI's Jason and Lucia | entertainment | 5434 |
| 5 | Ryan Gosling's Star Wars movie | entertainment | 1479 |
Quick start
Choose where to run Bluesky, then follow the steps below.
The connector runs alongside DuckDB or Haybarn. No Query Farm account is needed.
1. Install the vgi extension
Run this in your SQL client. On DuckDB, keep FROM query_farm on LOAD in later sessions.
SET allow_extension_repositories = 'allowed';
CREATE EXTENSION REPOSITORY IF NOT EXISTS query_farm
WITH PREFIX 'https://duckdb-extensions.query.farm';
INSTALL vgi FROM query_farm;
LOAD vgi FROM query_farm;
INSTALL vgi FROM community;
LOAD vgi;
2. Attach the connector
Attach with uvx
Needs uv. uvx builds the worker from its release tag on first attach and reuses the cached environment after that.
ATTACH 'bluesky' AS bluesky (
TYPE vgi,
LOCATION 'uvx --from git+https://github.com/Query-farm/[email protected] vgi-bluesky'
);
Attach the signed image
Needs Docker, Podman or another OCI runtime. The extension runs the container and talks to it over stdio.
ATTACH 'bluesky' AS bluesky (
TYPE vgi,
LOCATION 'oci://ghcr.io/query-farm/vgi-bluesky:0.5.1'
);
3. Run a query
SELECT rank, display_name, category, post_count
FROM bluesky.main.trends
ORDER BY rank
Run the connector on a server you manage. You operate the service and choose who can connect.
1. Deploy the connector on your server
Follow the connectorβs deployment instructions. Use its supported HTTP transport, or launch it remotely over SSH. The connection guide explains both options.
2. Install the vgi extension
Run this in your SQL client. On DuckDB, keep FROM query_farm on LOAD in later sessions.
SET allow_extension_repositories = 'allowed';
CREATE EXTENSION REPOSITORY IF NOT EXISTS query_farm
WITH PREFIX 'https://duckdb-extensions.query.farm';
INSTALL vgi FROM query_farm;
LOAD vgi FROM query_farm;
INSTALL vgi FROM community;
LOAD vgi;
3. Attach the connector
For an HTTP deployment, replace the example URL with your endpoint. Add the authentication options your deployment requires. For SSH, use the SSH connection instructions.
ATTACH 'bluesky' AS bluesky
(TYPE vgi, LOCATION 'https://your-connector.example.com');
4. Run a query
SELECT rank, display_name, category, post_count
FROM bluesky.main.trends
ORDER BY rank
Query Farm operates Bluesky for your team. Hosting has a $10 monthly minimum per organization; usage counts toward it. From $2.97 per instance-month ($10 monthly minimum).
1. Create your hosted connector
Open the console, choose your organization and deployment size, and add any service credentials there.
2. Install the vgi extension
SET allow_extension_repositories = 'allowed';
CREATE EXTENSION REPOSITORY IF NOT EXISTS query_farm
WITH PREFIX 'https://duckdb-extensions.query.farm';
INSTALL vgi FROM query_farm;
LOAD vgi FROM query_farm;
INSTALL vgi FROM community;
LOAD vgi;
3. Attach your deployment
Copy the ATTACH statement from your deployment in the console and run it in DuckDB or Haybarn. Use bluesky as the catalog alias for the query below.
4. Run a query
SELECT rank, display_name, category, post_count
FROM bluesky.main.trends
ORDER BY rank
Technical details
- Verified connector release
- v0.5.1
- Engine
- 2.0.1
- VGI protocol
- 3.4.0
- Verified on
- December 1, 2026
Pin a version for production
When running the connector yourself, keep a specific release until youβre ready to upgrade. Replace the ATTACH statement above with this one and follow the same extension and credential setup.
Attach with uvx
Needs uv. uvx builds the worker from its release tag on first attach and reuses the cached environment after that.
ATTACH 'bluesky' AS bluesky (
TYPE vgi,
LOCATION 'uvx --from git+https://github.com/Query-farm/[email protected] vgi-bluesky'
);
Attach the signed image
Needs Docker, Podman or another OCI runtime. The extension runs the container and talks to it over stdio.
ATTACH 'bluesky' AS bluesky (
TYPE vgi,
LOCATION 'oci://ghcr.io/query-farm/vgi-bluesky:0.5.1'
);
Overview
Read-only Bluesky data: posts, threads, profiles, followers, likes, feeds and trending topics
Bluesky is a decentralised social network built on the AT Protocol. This catalog reads its public AppView β the service that indexes the whole network β and returns what it serves as ordinary tables.
Identifiers
- Actors are accounts. Each has a permanent
did(did:plc:...) and ahandle(bsky.app) that it can change. Every function taking an actor accepts either, as well as@handleor a pastedhttps://bsky.app/profile/...URL. Join and store ondid. - Posts are addressed by AT-URI,
at://<did>/app.bsky.feed.post/<rkey>. Functions taking a post also accept thehttps://bsky.app/profile/<handle>/post/<rkey>URL the app shows.
Timestamps
created_at on a post is what the author's app claimed and can be backdated; indexed_at is when Bluesky first saw it, and is the one to trust for ordering.
Access and limits
No credentials are needed and none are accepted. Bluesky rate-limits anonymous traffic per IP; requests are retried with backoff, and the AppView's own 30-second Cache-Control is forwarded to the result cache, so repeating a query within half a minute is free.
Catalog
Everything bluesky exposes once attached β read straight from the worker's
released build.
main 1 table Β· 16 functions
Bluesky public AppView data β no credentials required
Schema examples (10)
What is trending on Bluesky right now
SELECT rank, display_name, category, post_count
FROM bluesky.main.trends
ORDER BY rank;
| rank | display_name | category | post_count |
|---|---|---|---|
| 1 | Spain votes in general election | politics | 2754 |
| 2 | Russia's war in Ukraine continues | politics | 482 |
| 3 | This year's personal accomplishments | culture | 221 |
| 4 | GTA VI's Jason and Lucia | entertainment | 5434 |
| 5 | Ryan Gosling's Star Wars movie | entertainment | 1479 |
The latest posts mentioning DuckDB
SELECT created_at, author_handle, text
FROM bluesky.main.search_posts('duckdb')
LIMIT 25;
One account's profile and counts
SELECT handle, display_name, followers_count, posts_count
FROM bluesky.main.profile('bsky.app');
An account's recent original posts and how they performed
SELECT created_at, text, like_count, repost_count
FROM bluesky.main.author_feed('bsky.app', filter => 'posts_no_replies')
WHERE reason IS NULL
LIMIT 20;
6 more examples
Follower counts for everyone a search finds, via LATERAL
SELECT p.handle, p.followers_count
FROM (SELECT did FROM bluesky.main.search_actors('duckdb') LIMIT 20) a,
LATERAL bluesky.main.profile(a.did) p
ORDER BY p.followers_count DESC;
The most-liked replies in a conversation
SELECT author_handle, text, like_count
FROM bluesky.main.thread((SELECT uri FROM bluesky.main.author_feed('bsky.app', filter => 'posts_no_replies') WHERE reason IS NULL LIMIT 1))
WHERE depth > 0
ORDER BY like_count DESC
LIMIT 10;
The best-followed accounts posting about DuckDB, with how many of the latest 100 matches each wrote
SELECT p.handle, p.followers_count, count(*) AS posts
FROM (SELECT author_did FROM bluesky.main.search_posts('duckdb') LIMIT 100) s,
LATERAL bluesky.main.profile(s.author_did) p
GROUP BY p.handle, p.followers_count
ORDER BY p.followers_count DESC, p.handle
LIMIT 10;
The biggest accounts among the 100 that most recently followed an account
SELECT p.handle, p.display_name, p.followers_count
FROM (SELECT did FROM bluesky.main.followers('bsky.app') LIMIT 100) f,
LATERAL bluesky.main.profile(f.did) p
ORDER BY p.followers_count DESC, p.did
LIMIT 10;
Replies under the official account's latest post from its best-followed repliers, biggest first
SELECT t.author_handle, t.text, p.followers_count
FROM bluesky.main.thread((SELECT uri FROM bluesky.main.author_feed('bsky.app', filter => 'posts_no_replies') WHERE reason IS NULL LIMIT 1)) t,
LATERAL bluesky.main.profile(t.author_did) p
WHERE t.depth > 0
ORDER BY p.followers_count DESC, t.uri
LIMIT 10;
What the Discover feed is showing
SELECT author_handle, text
FROM bluesky.main.feed('at://did:plc:z72i7hdynmk6r22z27h6tvur/app.bsky.feed.generator/whats-hot')
LIMIT 20;
trends
What Bluesky currently reports as trending, in rank order
What is trending right now
SELECT rank, display_name, description, post_count
FROM bluesky.main.trends
ORDER BY rank;
Trending topics by category
SELECT category, count(*) AS trends, sum(post_count) AS posts
FROM bluesky.main.trends
GROUP BY category
ORDER BY posts DESC;
actor_feeds (actor VARCHAR)
Custom feeds a Bluesky account has published
Feeds published by the official Bluesky account
SELECT display_name, description, like_count, uri
FROM bluesky.main.actor_feeds('bsky.app');
all_trends ()
Bluesky's current trending topics (the scan backing the trends table)
Trending topics, read straight from the scan function
SELECT rank, display_name, post_count
FROM bluesky.main.all_trends()
ORDER BY rank;
author_feed (actor VARCHAR, filter := VARCHAR, include_pins := BOOLEAN)
A Bluesky account's posts and reposts, newest first
The official account's 20 most recent original posts
SELECT created_at, text, like_count
FROM bluesky.main.author_feed('bsky.app', filter => 'posts_no_replies')
WHERE reason IS NULL
ORDER BY created_at DESC
LIMIT 20;
Which hashtags an account uses most in its recent posts
SELECT tag, count(*) AS uses
FROM (SELECT unnest(hashtags) AS tag FROM (SELECT hashtags FROM bluesky.main.author_feed('bsky.app') LIMIT 300))
GROUP BY tag
ORDER BY uses DESC;
feed (uri VARCHAR)
The posts a Bluesky custom feed is currently serving, in feed order
What the Discover feed is showing right now
SELECT author_handle, text, like_count
FROM bluesky.main.feed('at://did:plc:z72i7hdynmk6r22z27h6tvur/app.bsky.feed.generator/whats-hot')
LIMIT 30;
followers (actor VARCHAR)
Accounts that follow a Bluesky account, most recent first
The 50 most recent followers of an account
SELECT handle, display_name
FROM bluesky.main.followers('bsky.app')
LIMIT 50;
The biggest accounts among the 100 that most recently followed an account
SELECT p.handle, p.display_name, p.followers_count
FROM (SELECT did FROM bluesky.main.followers('bsky.app') LIMIT 100) f,
LATERAL bluesky.main.profile(f.did) p
ORDER BY p.followers_count DESC, p.did
LIMIT 10;
follows (actor VARCHAR)
Accounts a Bluesky account follows, most recent first
Accounts the official Bluesky account follows
SELECT handle, display_name FROM bluesky.main.follows('bsky.app') LIMIT 100;
jetstream (batch_events := BIGINT, batch_ms := BIGINT, collections := VARCHAR, cursor := BIGINT, dids := VARCHAR, max_events := BIGINT, seconds := BIGINT)
Bluesky's live firehose via Jetstream: every post, like, follow and more, time-boxed
Ten seconds of new posts from across the whole network
SELECT event_time, did, text, langs
FROM bluesky.main.jetstream(collections => 'app.bsky.feed.post')
WHERE operation = 'create';
What the network is doing right now, by record type
SELECT collection, operation, count(*) AS events
FROM bluesky.main.jetstream(seconds => 5)
GROUP BY ALL
ORDER BY events DESC;
Posting volume by language over the last minute, replayed
SELECT lang, count(*) AS posts
FROM (SELECT unnest(langs) AS lang FROM bluesky.main.jetstream(collections => 'app.bsky.feed.post', seconds => 60) WHERE event_time >= now() - INTERVAL 1 MINUTE AND event_time < now())
GROUP BY lang
ORDER BY posts DESC
LIMIT 10;
2 more examples
Hashtags trending in the live stream
SELECT tag, count(*) AS uses
FROM (SELECT unnest(hashtags) AS tag FROM bluesky.main.jetstream(collections => 'app.bsky.feed.post', seconds => 20))
GROUP BY tag
ORDER BY uses DESC
LIMIT 15;
The most-liked posts of the last 15 seconds, hydrated with post()
SELECT p.author_handle, p.text, j.likes
FROM (SELECT subject_uri, count(*) AS likes FROM bluesky.main.jetstream(collections => 'app.bsky.feed.like', seconds => 15) WHERE subject_uri LIKE '%/app.bsky.feed.post/%' GROUP BY subject_uri ORDER BY likes DESC LIMIT 5) j,
LATERAL bluesky.main.post(j.subject_uri) p
ORDER BY j.likes DESC;
likes (uri VARCHAR)
Accounts that liked a Bluesky post, most recent first
Who most recently liked bsky.app's pinned welcome post
SELECT handle, interacted_at
FROM bluesky.main.likes('at://did:plc:z72i7hdynmk6r22z27h6tvur/app.bsky.feed.post/3l6oveex3ii2l')
LIMIT 50;
popular_feeds (query := VARCHAR)
Bluesky custom feeds by popularity, optionally searched by name
The most popular custom feeds
SELECT display_name, creator_handle, like_count
FROM bluesky.main.popular_feeds()
LIMIT 25;
Feeds about science
SELECT display_name, description, uri
FROM bluesky.main.popular_feeds(query => 'science')
LIMIT 25;
post (uri VARCHAR)
One Bluesky post with its current like, repost and reply counts
Engagement on the official account's latest post
SELECT text, like_count, repost_count, reply_count
FROM bluesky.main.post((SELECT uri FROM bluesky.main.author_feed('bsky.app', filter => 'posts_no_replies') WHERE reason IS NULL LIMIT 1));
Hydrate the posts that search results are quoting
SELECT q.author_handle, q.text, q.like_count
FROM (SELECT quoted_uri FROM bluesky.main.search_posts('duckdb') WHERE quoted_uri LIKE '%app.bsky.feed.post%' LIMIT 25) s,
LATERAL bluesky.main.post(s.quoted_uri) q;
profile (actor VARCHAR)
One Bluesky account's profile and follower counts, by handle or DID
The official Bluesky account's counts
SELECT handle, display_name, followers_count, follows_count, posts_count
FROM bluesky.main.profile('bsky.app');
Follower counts for every account a search finds, via LATERAL
SELECT p.handle, p.followers_count
FROM (SELECT did FROM bluesky.main.search_actors('duckdb') LIMIT 20) a,
LATERAL bluesky.main.profile(a.did) p
ORDER BY p.followers_count DESC;
quotes (uri VARCHAR)
Posts quoting a Bluesky post, most recent first
The most-liked quotes of bsky.app's pinned welcome post
SELECT author_handle, text, like_count
FROM bluesky.main.quotes('at://did:plc:z72i7hdynmk6r22z27h6tvur/app.bsky.feed.post/3l6oveex3ii2l')
ORDER BY like_count DESC
LIMIT 20;
reposted_by (uri VARCHAR)
Accounts that reposted a Bluesky post
Who reposted bsky.app's pinned welcome post
SELECT handle, display_name
FROM bluesky.main.reposted_by('at://did:plc:z72i7hdynmk6r22z27h6tvur/app.bsky.feed.post/3l6oveex3ii2l')
LIMIT 50;
search_actors (query VARCHAR)
Search Bluesky accounts by handle, display name and bio
Accounts that talk about DuckDB
SELECT handle, display_name, description
FROM bluesky.main.search_actors('duckdb')
LIMIT 20;
search_posts (query VARCHAR, author := VARCHAR, cache_ttl := BIGINT, domain := VARCHAR, lang := VARCHAR, mentions := VARCHAR, since := VARCHAR, sort := VARCHAR, tag := VARCHAR, until := VARCHAR, url := VARCHAR)
Full-text search over Bluesky posts
The latest posts mentioning DuckDB
SELECT created_at, author_handle, text
FROM bluesky.main.search_posts('duckdb')
LIMIT 25;
The best-followed accounts posting about DuckDB, with how many of the latest 100 matches each wrote
SELECT p.handle, p.followers_count, count(*) AS posts
FROM (SELECT author_did FROM bluesky.main.search_posts('duckdb') LIMIT 100) s,
LATERAL bluesky.main.profile(s.author_did) p
GROUP BY p.handle, p.followers_count
ORDER BY p.followers_count DESC, p.handle
LIMIT 10;
The most-engaged posts on a topic this week
SELECT author_handle, text, like_count, repost_count
FROM bluesky.main.search_posts('duckdb', sort => 'top', since => CAST(current_date - 7 AS VARCHAR))
ORDER BY like_count DESC
LIMIT 20;
1 more example
Who posted most about a topic among the latest 100 matches
SELECT author_handle, count(*) AS posts
FROM bluesky.main.search_posts('duckdb')
GROUP BY author_handle
ORDER BY posts DESC
LIMIT 10;
thread (uri VARCHAR, depth := BIGINT, parent_height := BIGINT)
A Bluesky post's full conversation: ancestors and replies, one row per post
The most-liked direct replies to the official account's latest post
SELECT author_handle, text, like_count
FROM bluesky.main.thread((SELECT uri FROM bluesky.main.author_feed('bsky.app', filter => 'posts_no_replies') WHERE reason IS NULL LIMIT 1), depth => 1)
WHERE depth = 1
ORDER BY like_count DESC
LIMIT 10;
Replies under the official account's latest post from its best-followed repliers, biggest first
SELECT t.author_handle, t.text, p.followers_count
FROM bluesky.main.thread((SELECT uri FROM bluesky.main.author_feed('bsky.app', filter => 'posts_no_replies') WHERE reason IS NULL LIMIT 1)) t,
LATERAL bluesky.main.profile(t.author_did) p
WHERE t.depth > 0
ORDER BY p.followers_count DESC, t.uri
LIMIT 10;
Try these queries
trends_are_ranked_from_one β The trends table is populated and ranked from 1.
SELECT min(rank) = 1 AND count(*) > 0 FROM bluesky.main.trends;
Uses trends
profile_resolves_a_handle_to_its_did β A handle resolves to the account's permanent DID.
SELECT did FROM bluesky.main.profile('bsky.app');
Uses profile
author_feed_is_the_authors β Without reposts, an author feed holds only that author's posts.
SELECT bool_and(author_handle = 'bsky.app')
FROM (SELECT author_handle FROM bluesky.main.author_feed('bsky.app') WHERE reason IS NULL LIMIT 50);
Uses author_feed
a_limit_stops_the_scan_early β A paged scan over an account with millions of followers yields its first rows without walking every page.
SELECT count(*)
FROM (SELECT did FROM bluesky.main.followers('bsky.app') LIMIT 5);
Uses followers
jetstream_delivers_live_events β A few seconds of the firehose always holds events; the network never goes quiet.
SELECT count(*) > 0 FROM bluesky.main.jetstream(seconds => 3);
Uses jetstream
thread_anchor_is_depth_zero β A thread always contains the anchor post, at depth 0.
SELECT count(*)
FROM bluesky.main.thread((SELECT uri FROM bluesky.main.author_feed('bsky.app', filter => 'posts_no_replies') WHERE reason IS NULL LIMIT 1), depth => 0)
WHERE depth = 0;
Uses threadauthor_feed
3 more examples Hide 3 more
trends_and_scan_function_agree β The `trends` table and the `all_trends` function behind it have the same shape.
SELECT (SELECT count(*) FROM bluesky.main.trends) > 0 AND (SELECT count(*) FROM bluesky.main.all_trends()) > 0;
Uses trendsall_trends
profile_accepts_a_web_url β A pasted bsky.app profile URL is accepted as an actor.
SELECT handle
FROM bluesky.main.profile('https://bsky.app/profile/bsky.app');
Uses profile
jetstream_collection_filter_holds β A collection filter keeps only that record type among commits.
SELECT bool_and(collection = 'app.bsky.feed.post')
FROM bluesky.main.jetstream(collections => 'app.bsky.feed.post', seconds => 3)
WHERE kind = 'commit';
Uses jetstream
35 more examples in the Catalog, each listed under the table or function it uses.
Questions it can answer
Plain-English questions from the worker's agent test tasks. An AI agent with this catalog attached should answer each one with SQL.
- What are the top five things trending on Bluesky right now?
- How many followers does the Bluesky account bsky.app have?
- Show the ten most recent posts the account bsky.app wrote itself β not things it reposted.
- Find recent Bluesky posts about DuckDB and who wrote them.
- What is the most-liked reply to bsky.app's most recent original post?
- What did people say when they quote-posted the post bsky.app has pinned to its profile?
Bluesky is an independent open-source connector from Query.Farm. It is not affiliated with, endorsed by or sponsored by the services, projects or organisations it works with. Product names, logos and trademarks belong to their respective owners.
Related workers
Search
News, social & research
Query Brave, Tavily, Exa, SearXNG, DuckDuckGo, SerpAPI and Serper web search from SQL through one interface
Wikipedia
News, social & research
Connect Wikipedia articles with Wikidata statements and graph queries from SQL
Hacker News
News, social & research
Hacker News front page, stories, comment threads and users