Stream Chat icon

Stream Chat

Server-side Stream Chat operations

Message → Search

AI-generated

Summary

Search messages within a specific Stream Chat channel by querying message text content.

Inputs

  • Channel CID — The channel identifier in the format "type:id" (e.g., "messaging:general"). This specifies the channel to search in.
  • Search Query — The text query to search for in messages. Supports partial word matching and keyword usage for more precise results.

Output shape

a list of messages matching the search query within the specified channel.

The search operation returns an array of messages that match the given search query text in the specified channel. If the Channel CID or Search Query is omitted, behavior depends on the Stream Chat API defaults and may return no results or all messages.

Discussion