Skip to content

Bluesky

Bluesky posts, threads, profiles, followers, feeds, trends and the live Jetstream firehose

Connector software
Free and open source
Service credentials
Not needed
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
Result Β· first 5 rows
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.

setup.sql
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;

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'
);

3. Run a query

query.sql
SELECT rank, display_name, category, post_count
FROM bluesky.main.trends
ORDER BY rank
More example queries β†’
Technical details
Verified connector release
v0.5.1
Engine
2.0.1
VGI protocol
3.4.0
Verified on
December 1, 2026
Release notes on GitHub
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'
);

Overview

Read-only Bluesky data: posts, threads, profiles, followers, likes, feeds and trending topics

Catalog

Everything bluesky exposes once attached β€” read straight from the worker's released build.

bluesky 1 schema
main 1 table Β· 16 functions

Bluesky public AppView data β€” no credentials required

Schema examples (10)
Examples (10)

What is trending on Bluesky right now

SELECT rank, display_name, category, post_count
FROM bluesky.main.trends
ORDER BY rank;
Result Β· first 5 rows
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;
Tables
Table functions
actor_feeds (actor VARCHAR) 1 example

Custom feeds a Bluesky account has published

Arguments
actor VARCHAR
Handle, DID, @handle or bsky.app profile URL
Returns columns
uri VARCHAR
AT-URI of the feed (at://<did>/app.bsky.feed.generator/<rkey>); the key feed() takes.
display_name VARCHAR
The feed's name as shown in the app.
description VARCHAR
What the feed says it shows.
creator_did VARCHAR
DID of the account that published the feed.
creator_handle VARCHAR
Handle of that account.
service_did VARCHAR
DID of the service that computes the feed's contents.
like_count BIGINT
Likes of the feed itself β€” the usual popularity measure.
accepts_interactions BOOLEAN
Whether the feed accepts 'show more/less like this' feedback.
content_mode VARCHAR
Declared content mode, e.g. video-only, when the feed sets one.
avatar_url VARCHAR
CDN URL of the feed's avatar image.
indexed_at TIMESTAMP WITH TIME ZONE
When the AppView last indexed the feed's declaration.
labels VARCHAR[]
Moderation labels applied to the feed.
feed_url VARCHAR
Link to the feed in the Bluesky web app.
Example

Feeds published by the official Bluesky account

SELECT display_name, description, like_count, uri
FROM bluesky.main.actor_feeds('bsky.app');
Link
author_feed (actor VARCHAR, filter := VARCHAR, include_pins := BOOLEAN) 2 examples

A Bluesky account's posts and reposts, newest first

Positional arguments
actor VARCHAR
Handle, DID, @handle or bsky.app profile URL
Named arguments
filter := VARCHAR
Which posts: posts_with_replies (default), posts_no_replies, posts_with_media, posts_and_author_threads, posts_with_video Β· default "posts_with_replies"
include_pins := BOOLEAN
Put the account's pinned post first Β· default false
Returns columns
uri VARCHAR
AT-URI of the post (at://<did>/app.bsky.feed.post/<rkey>); the key post() and thread() take.
cid VARCHAR
Content hash of this exact version of the post record.
author_did VARCHAR
DID of the author.
author_handle VARCHAR
Handle of the author at the time of the query.
author_display_name VARCHAR
Display name of the author.
text VARCHAR
The post's text.
created_at TIMESTAMP WITH TIME ZONE
When the author's client says the post was written. Client-supplied, so it can be backdated; NULL when unrepresentable.
indexed_at TIMESTAMP WITH TIME ZONE
When the AppView first saw the post β€” the trustworthy clock.
langs VARCHAR[]
BCP-47 language tags the author's client declared, e.g. ['en'].
reply_count BIGINT
Replies to this post.
repost_count BIGINT
Reposts of this post.
like_count BIGINT
Likes of this post.
quote_count BIGINT
Quote posts of this post.
bookmark_count BIGINT
Times this post has been bookmarked.
reply_parent_uri VARCHAR
AT-URI of the post this replies to; NULL for a top-level post.
reply_root_uri VARCHAR
AT-URI of the first post in the thread this reply belongs to.
embed_type VARCHAR
What is attached: 'images', 'video', 'external' (link card), 'record' (quote post), 'recordWithMedia', or NULL for plain text.
quoted_uri VARCHAR
AT-URI of the quoted post or feed, when this is a quote post.
external_url VARCHAR
URL of the attached link card, when there is one.
image_count BIGINT
Number of attached images (0 when none).
hashtags VARCHAR[]
Hashtags in the text or the post's tag list, without the '#'.
mentions VARCHAR[]
DIDs of accounts mentioned in the text.
links VARCHAR[]
URLs linked from the text.
labels VARCHAR[]
Moderation labels applied to the post.
post_url VARCHAR
Link to the post in the Bluesky web app.
reason VARCHAR
Why the post is in this feed: 'repost', 'pin', or NULL when it is simply the author's own post.
reposted_by_did VARCHAR
DID of the account that reposted it, when reason = 'repost'.
reposted_by_handle VARCHAR
Handle of that account.
reposted_at TIMESTAMP WITH TIME ZONE
When it was reposted, when reason = 'repost'.
Examples (2)

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;
Link
feed (uri VARCHAR) 1 example

The posts a Bluesky custom feed is currently serving, in feed order

Arguments
uri VARCHAR
Feed AT-URI or bsky.app feed URL
Returns columns
uri VARCHAR
AT-URI of the post (at://<did>/app.bsky.feed.post/<rkey>); the key post() and thread() take.
cid VARCHAR
Content hash of this exact version of the post record.
author_did VARCHAR
DID of the author.
author_handle VARCHAR
Handle of the author at the time of the query.
author_display_name VARCHAR
Display name of the author.
text VARCHAR
The post's text.
created_at TIMESTAMP WITH TIME ZONE
When the author's client says the post was written. Client-supplied, so it can be backdated; NULL when unrepresentable.
indexed_at TIMESTAMP WITH TIME ZONE
When the AppView first saw the post β€” the trustworthy clock.
langs VARCHAR[]
BCP-47 language tags the author's client declared, e.g. ['en'].
reply_count BIGINT
Replies to this post.
repost_count BIGINT
Reposts of this post.
like_count BIGINT
Likes of this post.
quote_count BIGINT
Quote posts of this post.
bookmark_count BIGINT
Times this post has been bookmarked.
reply_parent_uri VARCHAR
AT-URI of the post this replies to; NULL for a top-level post.
reply_root_uri VARCHAR
AT-URI of the first post in the thread this reply belongs to.
embed_type VARCHAR
What is attached: 'images', 'video', 'external' (link card), 'record' (quote post), 'recordWithMedia', or NULL for plain text.
quoted_uri VARCHAR
AT-URI of the quoted post or feed, when this is a quote post.
external_url VARCHAR
URL of the attached link card, when there is one.
image_count BIGINT
Number of attached images (0 when none).
hashtags VARCHAR[]
Hashtags in the text or the post's tag list, without the '#'.
mentions VARCHAR[]
DIDs of accounts mentioned in the text.
links VARCHAR[]
URLs linked from the text.
labels VARCHAR[]
Moderation labels applied to the post.
post_url VARCHAR
Link to the post in the Bluesky web app.
reason VARCHAR
Why the post is in this feed: 'repost', 'pin', or NULL when it is simply the author's own post.
reposted_by_did VARCHAR
DID of the account that reposted it, when reason = 'repost'.
reposted_by_handle VARCHAR
Handle of that account.
reposted_at TIMESTAMP WITH TIME ZONE
When it was reposted, when reason = 'repost'.
Example

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;
Link
followers (actor VARCHAR) 2 examples

Accounts that follow a Bluesky account, most recent first

Arguments
actor VARCHAR
Handle, DID, @handle or bsky.app profile URL
Returns columns
subject_did VARCHAR
DID of the account whose followers or follows these are.
subject_handle VARCHAR
Handle of that account.
did VARCHAR
Permanent account identifier (DID); stable across handle changes.
handle VARCHAR
Current handle, e.g. 'bsky.app'. Can change; 'handle.invalid' means its DNS/HTTP proof failed.
display_name VARCHAR
Free-form display name the account chose.
description VARCHAR
Profile bio text.
avatar_url VARCHAR
CDN URL of the avatar image.
created_at TIMESTAMP WITH TIME ZONE
When the account's profile was created.
indexed_at TIMESTAMP WITH TIME ZONE
When the AppView last indexed this profile.
labels VARCHAR[]
Moderation labels applied to the account, e.g. '!no-unauthenticated'.
profile_url VARCHAR
Link to the profile in the Bluesky web app.
Examples (2)

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;
Link
follows (actor VARCHAR) 1 example

Accounts a Bluesky account follows, most recent first

Arguments
actor VARCHAR
Handle, DID, @handle or bsky.app profile URL
Returns columns
subject_did VARCHAR
DID of the account whose followers or follows these are.
subject_handle VARCHAR
Handle of that account.
did VARCHAR
Permanent account identifier (DID); stable across handle changes.
handle VARCHAR
Current handle, e.g. 'bsky.app'. Can change; 'handle.invalid' means its DNS/HTTP proof failed.
display_name VARCHAR
Free-form display name the account chose.
description VARCHAR
Profile bio text.
avatar_url VARCHAR
CDN URL of the avatar image.
created_at TIMESTAMP WITH TIME ZONE
When the account's profile was created.
indexed_at TIMESTAMP WITH TIME ZONE
When the AppView last indexed this profile.
labels VARCHAR[]
Moderation labels applied to the account, e.g. '!no-unauthenticated'.
profile_url VARCHAR
Link to the profile in the Bluesky web app.
Example

Accounts the official Bluesky account follows

SELECT handle, display_name FROM bluesky.main.follows('bsky.app') LIMIT 100;
Link
jetstream (batch_events := BIGINT, batch_ms := BIGINT, collections := VARCHAR, cursor := BIGINT, dids := VARCHAR, max_events := BIGINT, seconds := BIGINT) 5 examples

Bluesky's live firehose via Jetstream: every post, like, follow and more, time-boxed

Named arguments
batch_events := BIGINT
Close a batch after this many events Β· default 1000
batch_ms := BIGINT
Close a batch after this many milliseconds, even if it is short or empty Β· default 1000
collections := VARCHAR
Comma-separated record types to keep, e.g. 'app.bsky.feed.post,app.bsky.feed.like'; a trailing '.*' matches a prefix, e.g. 'app.bsky.graph.*' (empty = every collection) Β· default ""
cursor := BIGINT
Resume after this time_us: pass the highest time_us already read, or epoch_us(now() - INTERVAL 10 MINUTE) to replay (0 = start live, now) Β· default 0
dids := VARCHAR
Comma-separated account DIDs to keep (empty = every account) Β· default ""
max_events := BIGINT
Stop after this many events, finishing the commit the last one is in (0 = no cap) Β· default 0
seconds := BIGINT
How long to listen, wall-clock from when the connection opens, before the scan ends (0 = never: stream batches until the caller stops asking) Β· default 10
Returns columns
time_us BIGINT
Jetstream's cursor: microseconds since the Unix epoch at which this Jetstream instance received the event. Strictly increasing, and the value to pass as `cursor` to resume.
event_time TIMESTAMP WITH TIME ZONE
`time_us` as a timestamp β€” when the event reached Jetstream.
kind VARCHAR
'commit' for a record created, updated or deleted; 'identity' for a handle or DID document change; 'account' for an account activated, deactivated or taken down.
did VARCHAR
DID of the repository (account) the event belongs to.
operation VARCHAR
For commits: 'create', 'update' or 'delete'. NULL otherwise.
collection VARCHAR
For commits: the record type, e.g. 'app.bsky.feed.post', 'app.bsky.feed.like', 'app.bsky.graph.follow'. NULL otherwise.
rkey VARCHAR
For commits: the record key within its collection.
uri VARCHAR
For commits: the record's AT-URI (at://<did>/<collection>/<rkey>) β€” for a post, the key post() and thread() take.
cid VARCHAR
For creates and updates: content hash of the new record version.
rev VARCHAR
For commits: the repository revision the change was committed in.
record VARCHAR
For creates and updates: the full record as JSON text. Query it with DuckDB's JSON functions, e.g. record->>'$.subject.uri'. NULL for deletes, which carry no record.
text VARCHAR
For a post: its text.
created_at TIMESTAMP WITH TIME ZONE
The record's own createdAt, as the author's client wrote it; can be backdated.
langs VARCHAR[]
For a post: the language tags its client declared.
reply_parent_uri VARCHAR
For a reply: AT-URI of the post it replies to.
reply_root_uri VARCHAR
For a reply: AT-URI of the thread's first post.
embed_type VARCHAR
For a post: what is attached β€” 'images', 'video', 'external', 'record', 'recordWithMedia' β€” or NULL.
quoted_uri VARCHAR
For a quote post: AT-URI of the quoted record.
external_url VARCHAR
For a post with a link card: its URL.
image_count BIGINT
For a post: number of attached images (0 when none).
hashtags VARCHAR[]
For a post: its hashtags, without '#'.
mentions VARCHAR[]
For a post: DIDs mentioned in its text.
links VARCHAR[]
For a post: URLs linked from its text.
subject_uri VARCHAR
For a like or repost: AT-URI of the post (or feed) acted on.
subject_did VARCHAR
The account acted on: the followed/blocked DID for a follow or block, the author of the liked or reposted record for a like or repost.
handle VARCHAR
For an identity event: the handle, when the event carries one.
active BOOLEAN
For an account event: whether the account is now active.
account_status VARCHAR
For an inactive account: why β€” e.g. 'deactivated', 'takendown', 'suspended', 'deleted'.
Examples (5)

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;
Link
likes (uri VARCHAR) 1 example

Accounts that liked a Bluesky post, most recent first

Arguments
uri VARCHAR
Post AT-URI or bsky.app post URL
Returns columns
subject_uri VARCHAR
AT-URI of the post that was liked or reposted.
interacted_at TIMESTAMP WITH TIME ZONE
When the like was made. NULL for reposts, which the endpoint does not timestamp.
did VARCHAR
Permanent account identifier (DID); stable across handle changes.
handle VARCHAR
Current handle, e.g. 'bsky.app'. Can change; 'handle.invalid' means its DNS/HTTP proof failed.
display_name VARCHAR
Free-form display name the account chose.
description VARCHAR
Profile bio text.
avatar_url VARCHAR
CDN URL of the avatar image.
created_at TIMESTAMP WITH TIME ZONE
When the account's profile was created.
indexed_at TIMESTAMP WITH TIME ZONE
When the AppView last indexed this profile.
labels VARCHAR[]
Moderation labels applied to the account, e.g. '!no-unauthenticated'.
profile_url VARCHAR
Link to the profile in the Bluesky web app.
Example

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;
Link
post (uri VARCHAR) 2 examples

One Bluesky post with its current like, repost and reply counts

Arguments
uri VARCHAR
Post AT-URI or bsky.app post URL
Returns columns
uri VARCHAR
AT-URI of the post (at://<did>/app.bsky.feed.post/<rkey>); the key post() and thread() take.
cid VARCHAR
Content hash of this exact version of the post record.
author_did VARCHAR
DID of the author.
author_handle VARCHAR
Handle of the author at the time of the query.
author_display_name VARCHAR
Display name of the author.
text VARCHAR
The post's text.
created_at TIMESTAMP WITH TIME ZONE
When the author's client says the post was written. Client-supplied, so it can be backdated; NULL when unrepresentable.
indexed_at TIMESTAMP WITH TIME ZONE
When the AppView first saw the post β€” the trustworthy clock.
langs VARCHAR[]
BCP-47 language tags the author's client declared, e.g. ['en'].
reply_count BIGINT
Replies to this post.
repost_count BIGINT
Reposts of this post.
like_count BIGINT
Likes of this post.
quote_count BIGINT
Quote posts of this post.
bookmark_count BIGINT
Times this post has been bookmarked.
reply_parent_uri VARCHAR
AT-URI of the post this replies to; NULL for a top-level post.
reply_root_uri VARCHAR
AT-URI of the first post in the thread this reply belongs to.
embed_type VARCHAR
What is attached: 'images', 'video', 'external' (link card), 'record' (quote post), 'recordWithMedia', or NULL for plain text.
quoted_uri VARCHAR
AT-URI of the quoted post or feed, when this is a quote post.
external_url VARCHAR
URL of the attached link card, when there is one.
image_count BIGINT
Number of attached images (0 when none).
hashtags VARCHAR[]
Hashtags in the text or the post's tag list, without the '#'.
mentions VARCHAR[]
DIDs of accounts mentioned in the text.
links VARCHAR[]
URLs linked from the text.
labels VARCHAR[]
Moderation labels applied to the post.
post_url VARCHAR
Link to the post in the Bluesky web app.
Examples (2)

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;
Link
profile (actor VARCHAR) 2 examples

One Bluesky account's profile and follower counts, by handle or DID

Arguments
actor VARCHAR
Handle, DID, @handle or bsky.app profile URL
Returns columns
actor VARCHAR
The actor exactly as it was passed in β€” a handle, DID or profile URL β€” so a LATERAL can join back on its input.
did VARCHAR
Permanent account identifier (DID); stable across handle changes.
handle VARCHAR
Current handle, e.g. 'bsky.app'. Can change; 'handle.invalid' means its DNS/HTTP proof failed.
display_name VARCHAR
Free-form display name the account chose.
description VARCHAR
Profile bio text.
avatar_url VARCHAR
CDN URL of the avatar image.
created_at TIMESTAMP WITH TIME ZONE
When the account's profile was created.
indexed_at TIMESTAMP WITH TIME ZONE
When the AppView last indexed this profile.
labels VARCHAR[]
Moderation labels applied to the account, e.g. '!no-unauthenticated'.
profile_url VARCHAR
Link to the profile in the Bluesky web app.
banner_url VARCHAR
CDN URL of the profile banner image.
pronouns VARCHAR
Pronouns the account lists on its profile.
website VARCHAR
Website the account lists on its profile.
followers_count BIGINT
Accounts following this one.
follows_count BIGINT
Accounts this one follows.
posts_count BIGINT
Posts this account has made (including replies).
lists_count BIGINT
Lists this account has created.
feeds_count BIGINT
Custom feeds this account has published.
starter_packs_count BIGINT
Starter packs this account has created.
is_labeler BOOLEAN
Whether this account runs a moderation labeling service.
verified_status VARCHAR
Bluesky's blue-check verification state: 'valid', 'invalid' or 'none'.
Examples (2)

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;
Link
quotes (uri VARCHAR) 1 example

Posts quoting a Bluesky post, most recent first

Arguments
uri VARCHAR
Post AT-URI or bsky.app post URL
Returns columns
uri VARCHAR
AT-URI of the post (at://<did>/app.bsky.feed.post/<rkey>); the key post() and thread() take.
cid VARCHAR
Content hash of this exact version of the post record.
author_did VARCHAR
DID of the author.
author_handle VARCHAR
Handle of the author at the time of the query.
author_display_name VARCHAR
Display name of the author.
text VARCHAR
The post's text.
created_at TIMESTAMP WITH TIME ZONE
When the author's client says the post was written. Client-supplied, so it can be backdated; NULL when unrepresentable.
indexed_at TIMESTAMP WITH TIME ZONE
When the AppView first saw the post β€” the trustworthy clock.
langs VARCHAR[]
BCP-47 language tags the author's client declared, e.g. ['en'].
reply_count BIGINT
Replies to this post.
repost_count BIGINT
Reposts of this post.
like_count BIGINT
Likes of this post.
quote_count BIGINT
Quote posts of this post.
bookmark_count BIGINT
Times this post has been bookmarked.
reply_parent_uri VARCHAR
AT-URI of the post this replies to; NULL for a top-level post.
reply_root_uri VARCHAR
AT-URI of the first post in the thread this reply belongs to.
embed_type VARCHAR
What is attached: 'images', 'video', 'external' (link card), 'record' (quote post), 'recordWithMedia', or NULL for plain text.
quoted_uri VARCHAR
AT-URI of the quoted post or feed, when this is a quote post.
external_url VARCHAR
URL of the attached link card, when there is one.
image_count BIGINT
Number of attached images (0 when none).
hashtags VARCHAR[]
Hashtags in the text or the post's tag list, without the '#'.
mentions VARCHAR[]
DIDs of accounts mentioned in the text.
links VARCHAR[]
URLs linked from the text.
labels VARCHAR[]
Moderation labels applied to the post.
post_url VARCHAR
Link to the post in the Bluesky web app.
Example

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;
Link
reposted_by (uri VARCHAR) 1 example

Accounts that reposted a Bluesky post

Arguments
uri VARCHAR
Post AT-URI or bsky.app post URL
Returns columns
subject_uri VARCHAR
AT-URI of the post that was liked or reposted.
interacted_at TIMESTAMP WITH TIME ZONE
When the like was made. NULL for reposts, which the endpoint does not timestamp.
did VARCHAR
Permanent account identifier (DID); stable across handle changes.
handle VARCHAR
Current handle, e.g. 'bsky.app'. Can change; 'handle.invalid' means its DNS/HTTP proof failed.
display_name VARCHAR
Free-form display name the account chose.
description VARCHAR
Profile bio text.
avatar_url VARCHAR
CDN URL of the avatar image.
created_at TIMESTAMP WITH TIME ZONE
When the account's profile was created.
indexed_at TIMESTAMP WITH TIME ZONE
When the AppView last indexed this profile.
labels VARCHAR[]
Moderation labels applied to the account, e.g. '!no-unauthenticated'.
profile_url VARCHAR
Link to the profile in the Bluesky web app.
Example

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;
Link
search_actors (query VARCHAR) 1 example

Search Bluesky accounts by handle, display name and bio

Arguments
query VARCHAR
Search terms matched against handles, names and bios
Returns columns
did VARCHAR
Permanent account identifier (DID); stable across handle changes.
handle VARCHAR
Current handle, e.g. 'bsky.app'. Can change; 'handle.invalid' means its DNS/HTTP proof failed.
display_name VARCHAR
Free-form display name the account chose.
description VARCHAR
Profile bio text.
avatar_url VARCHAR
CDN URL of the avatar image.
created_at TIMESTAMP WITH TIME ZONE
When the account's profile was created.
indexed_at TIMESTAMP WITH TIME ZONE
When the AppView last indexed this profile.
labels VARCHAR[]
Moderation labels applied to the account, e.g. '!no-unauthenticated'.
profile_url VARCHAR
Link to the profile in the Bluesky web app.
Example

Accounts that talk about DuckDB

SELECT handle, display_name, description
FROM bluesky.main.search_actors('duckdb')
LIMIT 20;
Link
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) 4 examples

Full-text search over Bluesky posts

Positional arguments
query VARCHAR
Search query; supports Bluesky's syntax, e.g. 'from:bsky.app'
Named arguments
author := VARCHAR
Only posts by this handle or DID Β· default ""
cache_ttl := BIGINT
Seconds to cache results (0 = off; search is live) Β· default 0
domain := VARCHAR
Only posts linking to this domain Β· default ""
lang := VARCHAR
Only posts in this language, e.g. 'en' Β· default ""
mentions := VARCHAR
Only posts mentioning this handle or DID Β· default ""
since := VARCHAR
Only posts at or after this moment, e.g. '2026-09-01' Β· default ""
sort := VARCHAR
'latest' (newest first) or 'top' (by engagement) Β· default "latest"
tag := VARCHAR
Only posts with this hashtag (without '#') Β· default ""
until := VARCHAR
Only posts before this moment, e.g. '2026-09-01T12:00:00Z' Β· default ""
url := VARCHAR
Only posts linking to this URL Β· default ""
Returns columns
uri VARCHAR
AT-URI of the post (at://<did>/app.bsky.feed.post/<rkey>); the key post() and thread() take.
cid VARCHAR
Content hash of this exact version of the post record.
author_did VARCHAR
DID of the author.
author_handle VARCHAR
Handle of the author at the time of the query.
author_display_name VARCHAR
Display name of the author.
text VARCHAR
The post's text.
created_at TIMESTAMP WITH TIME ZONE
When the author's client says the post was written. Client-supplied, so it can be backdated; NULL when unrepresentable.
indexed_at TIMESTAMP WITH TIME ZONE
When the AppView first saw the post β€” the trustworthy clock.
langs VARCHAR[]
BCP-47 language tags the author's client declared, e.g. ['en'].
reply_count BIGINT
Replies to this post.
repost_count BIGINT
Reposts of this post.
like_count BIGINT
Likes of this post.
quote_count BIGINT
Quote posts of this post.
bookmark_count BIGINT
Times this post has been bookmarked.
reply_parent_uri VARCHAR
AT-URI of the post this replies to; NULL for a top-level post.
reply_root_uri VARCHAR
AT-URI of the first post in the thread this reply belongs to.
embed_type VARCHAR
What is attached: 'images', 'video', 'external' (link card), 'record' (quote post), 'recordWithMedia', or NULL for plain text.
quoted_uri VARCHAR
AT-URI of the quoted post or feed, when this is a quote post.
external_url VARCHAR
URL of the attached link card, when there is one.
image_count BIGINT
Number of attached images (0 when none).
hashtags VARCHAR[]
Hashtags in the text or the post's tag list, without the '#'.
mentions VARCHAR[]
DIDs of accounts mentioned in the text.
links VARCHAR[]
URLs linked from the text.
labels VARCHAR[]
Moderation labels applied to the post.
post_url VARCHAR
Link to the post in the Bluesky web app.
Examples (4)

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;
Link
thread (uri VARCHAR, depth := BIGINT, parent_height := BIGINT) 2 examples

A Bluesky post's full conversation: ancestors and replies, one row per post

Positional arguments
uri VARCHAR
Post AT-URI or bsky.app post URL
Named arguments
depth := BIGINT
Levels of replies to include below the post Β· default 6
parent_height := BIGINT
Levels of ancestors to include above the post Β· default 80
Returns columns
anchor VARCHAR
The post reference exactly as it was passed in, so a LATERAL can join back on its input.
depth BIGINT
Position relative to the anchor post: 0 is the anchor, negative numbers are its ancestors (-1 the parent), positive numbers are replies (1 a direct reply).
uri VARCHAR
AT-URI of the post (at://<did>/app.bsky.feed.post/<rkey>); the key post() and thread() take.
cid VARCHAR
Content hash of this exact version of the post record.
author_did VARCHAR
DID of the author.
author_handle VARCHAR
Handle of the author at the time of the query.
author_display_name VARCHAR
Display name of the author.
text VARCHAR
The post's text.
created_at TIMESTAMP WITH TIME ZONE
When the author's client says the post was written. Client-supplied, so it can be backdated; NULL when unrepresentable.
indexed_at TIMESTAMP WITH TIME ZONE
When the AppView first saw the post β€” the trustworthy clock.
langs VARCHAR[]
BCP-47 language tags the author's client declared, e.g. ['en'].
reply_count BIGINT
Replies to this post.
repost_count BIGINT
Reposts of this post.
like_count BIGINT
Likes of this post.
quote_count BIGINT
Quote posts of this post.
bookmark_count BIGINT
Times this post has been bookmarked.
reply_parent_uri VARCHAR
AT-URI of the post this replies to; NULL for a top-level post.
reply_root_uri VARCHAR
AT-URI of the first post in the thread this reply belongs to.
embed_type VARCHAR
What is attached: 'images', 'video', 'external' (link card), 'record' (quote post), 'recordWithMedia', or NULL for plain text.
quoted_uri VARCHAR
AT-URI of the quoted post or feed, when this is a quote post.
external_url VARCHAR
URL of the attached link card, when there is one.
image_count BIGINT
Number of attached images (0 when none).
hashtags VARCHAR[]
Hashtags in the text or the post's tag list, without the '#'.
mentions VARCHAR[]
DIDs of accounts mentioned in the text.
links VARCHAR[]
URLs linked from the text.
labels VARCHAR[]
Moderation labels applied to the post.
post_url VARCHAR
Link to the post in the Bluesky web app.
Examples (2)

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;
Link

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

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.