If you're building a Bluesky client and want to help users discover trending hashtags or provide hashtag suggestions while composing posts, you'll quickly run into a problem: Bluesky's ATProtocol API doesn't support querying hashtag popularity.

This is the story of how we built our own hashtag tracking service for Skyscraper for iOS, and how it powers features that help users grow their Bluesky following by leveraging the right hashtags at the right time.

The Problem: No Trending Hashtags API in ATProtocol

Bluesky's API provides excellent tools for many things. You can search for posts containing a specific hashtag using app.bsky.feed.searchPosts:

GET https://bsky.social/xrpc/app.bsky.feed.searchPosts?q=%23bluesky

But here's what's missing: there's no API endpoint to get a ranked list of which hashtags are trending. You can't ask the API:

  • "What are the most popular hashtags right now?"
  • "Which hashtags have grown the most in the last hour?"
  • "What hashtags should I suggest when a user starts typing #?"

For developers building tools to help users become popular on Bluesky or increase their Bluesky reach, this is a significant gap. Trending hashtags are one of the most effective ways to boost visibility.

Our Solution: Building a Hashtag Tracking Service

To solve this, we built our own hashtag tracking service that powers Skyscraper's trending features. Here's how it works:

1. Connecting to the Bluesky Firehose

The Bluesky Firehose is a real-time stream of all public events on the network - every post, like, repost, and follow. By connecting to this stream, we can observe every hashtag as it's used across the platform.

// Firehose WebSocket connection
wss://bsky.network/xrpc/com.atproto.sync.subscribeRepos

This gives us raw data we can process and aggregate.

2. Extracting Hashtags from Posts

When a post comes through the firehose, we extract hashtags from two places:

  • The tags field - An explicit array of hashtags in the post record
  • Facets - Rich text annotations that mark hashtag positions in the text
// Hashtag extraction regex
(?:^|\s)#([a-zA-Z0-9_]+)

3. Aggregating Across Time Windows

Raw counts aren't enough - we need to track trending momentum. Our service aggregates hashtag usage across multiple time windows:

  • 1 hour - What's hot right now
  • 24 hours - Today's trending topics
  • 7 days - This week's popular tags
  • 30 days - Monthly trends

This allows users to see not just what's popular, but what's gaining momentum - crucial for growing your Bluesky audience.

4. Serving the Data via API

We expose this data through a simple REST API:

GET /api/trending/hashtags?window=1h&limit=50

Response:
{
    "window": "1h",
    "generatedAt": "2025-12-18T10:30:00Z",
    "hashtags": [
        { "tag": "bluesky", "count": 15234 },
        { "tag": "photography", "count": 8921 },
        { "tag": "news", "count": 7456 }
        // ...
    ]
}

You can try it yourself: View Live Trending Hashtags

Powering Hashtag Suggestions in Our iOS App

With our hashtag tracking service in place, we built a two-tier suggestion system for the Skyscraper iOS app's post composer. When a user types #, they instantly see relevant hashtag suggestions.

Tier 1: Instant Local Suggestions

Speed matters for user experience. We cache autocomplete data locally with a smart scoring algorithm:

GET /api/trending/autocomplete

Response:
{
    "hashtags": [
        { "tag": "bluesky", "score": 9500, "recentCount": 5000, "longTermCount": 45000 },
        { "tag": "art", "score": 8200, "recentCount": 3200, "longTermCount": 52000 }
        // ...
    ]
}

The score combines recent popularity with long-term usage, ensuring suggestions are both timely and proven. When a user types #blu, we instantly filter the local cache - no network delay.

Tier 2: Bluesky API Fallback

For less common hashtags not in our trending cache, we fall back to searching Bluesky's app.bsky.feed.searchPosts API and extract hashtags from the results. This provides comprehensive coverage while keeping the primary experience fast.

Smart Caching Strategy

To balance freshness with performance:

  • 1-hour refresh interval for autocomplete data
  • Per-window caching for trending results
  • Background refresh when the app becomes active
  • Persistent backup in UserDefaults for offline access

How This Helps Users Grow Their Bluesky Following

These features directly help users become more popular on Bluesky:

Discover What's Trending Now

Users can browse real-time trending hashtags right in the app. See what's hot in the last hour, today, this week, or this month. Timing matters - posting with a trending hashtag while it's rising increases visibility dramatically.

Smart Hashtag Suggestions While Composing

When composing a post, users get intelligent hashtag suggestions based on what's popular. No more guessing which hashtags to use - the app surfaces relevant, trending options that can increase your Bluesky reach.

Find Your Niche

By exploring trending hashtags across different time windows, users can identify communities and topics where they can establish themselves. Growing an audience is easier when you find your people.

Technical Considerations for Developers

If you're building your own hashtag tracking service for Bluesky, here are some lessons we learned:

Handle Scale Thoughtfully

The Bluesky firehose processes millions of events daily. Design your ingestion pipeline to handle bursts and have strategies for catching up if you fall behind.

Filter Appropriately

Not all hashtags are useful. We filter for Latin script by default (with an option for all scripts) to keep results relevant for most users. Consider your audience when deciding what to surface.

Prevent Race Conditions

When users rapidly switch between time windows, cancel previous requests to prevent stale data from overwriting fresh data:

// Cancel previous request before starting new one
currentTask?.cancel()
currentTask = Task {
    // Fetch new data
}

Debounce API Searches

For fallback searches to Bluesky's API, implement debouncing (we use 0.3 seconds) to avoid hammering the API as users type.

Try Skyscraper's Trending Hashtags

Want to see what's trending on Bluesky right now? We've made our trending hashtags tool freely available:

And if you want the full experience with hashtag suggestions while composing posts, download Skyscraper for iOS.

The Future of Bluesky Discovery

While Bluesky's app.bsky.unspecced.getTrendingTopics endpoint provides some discovery features, it's limited and doesn't focus on hashtags specifically. We expect the platform to evolve, but for now, building your own tracking infrastructure is the way to go if you want to help users grow their Bluesky presence.

The open nature of ATProtocol makes this possible. Anyone can connect to the firehose and build their own analytics. That's the beauty of decentralized social networking - when the platform doesn't provide a feature, the community can build it.

Have questions about building hashtag tracking for Bluesky? Reach out at contact@getskyscraper.com.