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

# Get Users By Query

> Retrieve users based on a search query.

<Warning>The property `currentlyFollowing` will be returned **only** if userId is passed to the API.</Warning>
<Tip>This API is useful for searching users by a partial match on their username.</Tip>


## OpenAPI

````yaml GET /users/search
openapi: 3.0.1
info:
  title: Users API
  version: 1.0.0
  description: API for searching users and retrieving user IDs by tags.
servers:
  - url: https://our-secret-api-url.com
security: []
paths:
  /users/search:
    get:
      summary: Search for users by query
      description: Retrieve users based on a search query.
      parameters:
        - name: query
          in: query
          required: true
          schema:
            type: string
            description: Search query for users
        - name: userId
          in: query
          required: false
          schema:
            type: string
            description: >-
              Filter results to exclude the user with the specified userId and
              return include additional property `currentFollowing`, indicating
              whether the specified user is following each returned user.
      responses:
        '200':
          description: Successful response with user data
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: integer
                      format: int64
                      description: Unique identifier for the user
                    username:
                      type: string
                      description: Username of the user
                    name:
                      type: string
                      description: Full name of the user
                    image:
                      type: string
                      description: URL of the user's profile image
                    bio:
                      type: string
                      nullable: true
                      description: Biography of the user
                    verifiedAt:
                      type: string
                      format: date-time
                      nullable: true
                      description: Timestamp when the user was verified
                    currentlyFollowing:
                      type: boolean
                      description: Whether the current user is following this user
                  required:
                    - id
                    - username
                    - name
                    - image
                    - bio
                    - verifiedAt
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message

````