Skip to main content
SDK v7.x · Last verified March 2026 · iOS · Android · Web · Flutter
Full walkthrough below ↓
Platform note — code samples below use TypeScript. Every method has an equivalent in the iOS (Swift), Android (Kotlin), and Flutter (Dart) SDKs — see the linked SDK reference in each step.
Discovery turns a closed social app into a growing platform. This guide walks through implementing full-text search for posts and communities, surfacing trending content, and building a category-based browsing experience.
Prerequisites: SDK installed and authenticated. Note: only public communities appear in search results — private communities are excluded.
After completing this guide you’ll have:
  • Full-text post search integrated into your app’s search bar
  • Community search with trending and recommended community lists
  • User-facing category browsing connected to community filtering

Quick Start: Search Communities

Community search is the primary discovery surface — query by name with optional membership and category filters:
TypeScript
Full reference → Intelligent Search: Communities

Step-by-Step Implementation

1

Search communities

Search communities by name with optional filters: membership status (all, member, notMember), sort order, and category.
TypeScript
Full reference → Intelligent Search: Communities
2

Get trending communities

Trending communities are ranked by recent activity (posts, members, engagement). Surface these on your explore page for new users.
TypeScript
Full reference → Trending & Recommended Communities
3

Get recommended communities

Recommended communities are personalized for the current user based on their activity and interests. Returns up to 15 communities.
TypeScript
Full reference → Trending & Recommended Communities
4

Browse communities by category

Organize communities into browsable categories. Query all categories, then filter communities by a selected category.
TypeScript
Full reference → Community Categories · Query Communities
5

Search posts

Two complementary search methods are available for posts:
  • Semantic search (PostRepository.semanticSearchPosts) — AI-powered natural-language search. Best for open-ended queries like “healthy breakfast ideas”.
  • Hashtag/keyword search (PostRepository.searchPostsByHashtag) — exact hashtag and keyword matching. Best for tag-driven browsing like #recipe.
TypeScript
Full reference → Intelligent Search: Posts

Connect to Moderation & Analytics

Track search query volume and discovery patterns in Admin Console → Analytics Dashboard → Social Insights to understand what users are looking for and which communities are growing.Admin Console: Analytics
Create and manage community categories in the Admin Console. Categories appear in the community creation flow and in the discovery browse view.Admin Console: Product Management

Common Mistakes

Firing a search API call on every keystroke — This creates excessive API calls and flickers results. Debounce the input by 300–500ms before searching.
Not handling empty search results — “No results found” is not enough. Suggest alternative queries, show trending content, or recommend popular communities to keep users engaged.
Searching without a minimum query length — Single-character searches return too many results and waste resources. Require at least 2–3 characters before triggering a search.

Best Practices

  • Add a 300ms debounce to search input before firing the query — prevents excessive API calls while the user types
  • Show suggested/recent searches before the user starts typing
  • Display skeleton placeholders while results load
  • Clearly differentiate post results from community results with distinct card styles
  • Show a “No results” empty state with suggestions if the query returns 0 results
  • Show trending communities prominently for logged-in users with no following history
  • Once a user has joined 5+ communities, replace trending with personalized recommendations
  • Use horizontal scrolling category pills for browsing — they take less vertical space than a list
  • Cache trending and recommended results for 5-10 minutes — they don’t need to be real-time
  • Use searchPosts() Live Collection — this handles debounced re-querying automatically on most platforms
  • Limit search result sets to 20-30 items; use pagination for deeper results
  • Pre-load categories at app launch and cache locally — they change infrequently

Dive deeper: Discovery & Engagement API Reference has full parameter tables, method signatures, and platform-specific details for every API used in this guide.

Next Steps

Your next step → User Search & People Discovery

Content search is working — now let users find each other with people search and suggestions.
Or explore related guides:

Community Platform

Build the communities that discovery surfaces

Build a Social Feed

Show content from discovered communities in a feed

Notifications & Engagement

Notify users about trending content they’d be interested in