> ## Documentation Index
> Fetch the complete documentation index at: https://docs.magne.chat/llms.txt
> Use this file to discover all available pages before exploring further.

# Search server



## OpenAPI

````yaml developers/api-reference/openapi.json get /v1/servers/{serverId}/search
openapi: 3.0.3
info:
  title: Magne API
  version: 1.0.0
  description: RESTful API for the Magne communication platform.
servers:
  - url: https://api.magne.app
    description: Production
security:
  - BearerAuth: []
tags:
  - name: Auth
    description: Registration, login, password reset, and token management
  - name: Servers
    description: Server CRUD and membership
  - name: Discovery
    description: Discover public servers
  - name: Channels
    description: Channel management within servers
  - name: Messages
    description: Send, list, edit, and delete messages
  - name: Pins
    description: Pin and unpin messages
  - name: Reactions
    description: Message reactions
  - name: Categories
    description: Server category management
  - name: Members
    description: Server member management
  - name: Bans
    description: Ban and unban server members
  - name: Roles
    description: Role CRUD and assignment
  - name: Invites
    description: Server invite management
  - name: Join Requests
    description: Manage server join requests
  - name: Profile
    description: User profiles and search
  - name: Badges
    description: Badge catalog and user badges
  - name: Friends
    description: Friend requests and management
  - name: Direct Messages
    description: DM conversations and messages
  - name: Calls
    description: Voice and video calls
  - name: E2EE Keys
    description: End-to-end encryption key management
  - name: Voice
    description: Voice channel participation and controls
  - name: Notifications
    description: User notification management
  - name: Webhooks
    description: Server webhook management
  - name: Music
    description: Music bot proxy controls
  - name: Game Index
    description: Game executable index contributions
  - name: Search
    description: Server-wide search
  - name: Channel Permissions
    description: Channel permission overrides
  - name: Media
    description: File uploads and link previews
  - name: Templates
    description: Import Discord server templates
paths:
  /v1/servers/{serverId}/search:
    get:
      tags:
        - Search
      summary: Search server
      operationId: serverSearch
      parameters:
        - name: serverId
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: q
          in: query
          required: true
          schema:
            type: string
        - name: from
          in: query
          required: false
          schema:
            type: string
            format: uuid
        - name: inChannel
          in: query
          required: false
          schema:
            type: string
            format: uuid
        - name: has
          in: query
          required: false
          schema:
            type: string
        - name: before
          in: query
          required: false
          schema:
            type: string
        - name: after
          in: query
          required: false
          schema:
            type: string
        - name: limit
          in: query
          required: false
          schema:
            type: integer
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  members:
                    type: array
                    items:
                      $ref: '#/components/schemas/SearchMemberResult'
                  messages:
                    type: array
                    items:
                      $ref: '#/components/schemas/SearchMessageResult'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  schemas:
    SearchMemberResult:
      type: object
      properties:
        userId:
          type: string
          format: uuid
        username:
          type: string
        displayName:
          type: string
        avatarUrl:
          type: string
          nullable: true
        status:
          type: string
    SearchMessageResult:
      type: object
      properties:
        id:
          type: string
          format: uuid
        channelId:
          type: string
          format: uuid
        channelName:
          type: string
        authorId:
          type: string
          format: uuid
        authorName:
          type: string
        authorAvatar:
          type: string
          nullable: true
        content:
          type: string
        createdAt:
          type: string
          format: date-time
        hasAttachments:
          type: boolean
    ApiError:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          description: Human-readable error message
  responses:
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    InternalError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````