Search Public Rooms
    • Dark
      Light
    • PDF

    Search Public Rooms

    • Dark
      Light
    • PDF

    Article summary

    Get
    /api/v1/federation/searchPublicRooms
    Premium tag

    Search for federated public rooms by the server name or room name.

    Changelog

    VersionDescription
    6.0.0Added
    Header parameters
    X-User-Id
    stringRequired

    The user ID.

    ExampleCkCPNctrgCDfmWLqC
    X-Auth-Token
    stringRequired

    The authentication token.

    Example1Dd4iN_ClKn5jl-xPC36snQ4s9Zd5GZnXCQuCNSKcVE
    Query parameters
    serverName
    stringRequired

    The server name.

    Examplematrix.org
    roomName
    string

    The room name you want to search for in the server.

    Examplemy public room name
    pageToken
    string

    The page you want to retrieve, use it for pagination. Make sure to URL encode this.

    Exampleg6FtzRlCoXK+IUpmS
    count
    integer

    How many items to return.

    Example50
    Responses
    200

    OK

    Success Example
    {
      "rooms": [
        {
          "id": "!OGEhHVWSdvArJzumhm:matrix.org",
          "name": "Matrix HQ",
          "canJoin": true,
          "canonicalAlias": "#matrix:matrix.org",
          "joinedMembers": 44461,
          "topic": "The Official Matrix HQ - chat about Matrix here! | https://matrix.org | https://spec.matrix.org | To support Matrix.org development: https://patreon.com/matrixdotorg | Code of Conduct: https://matrix.org/legal/code-of-conduct/ | This is an English speaking room"
        }
      ],
      "count": 1,
      "total": 73080,
      "nextPageToken": "g6FtzZa3oXK+IUpkemFiTlVQUFh6bENKQWhFbDpmYWJyaWMucHVioWTD",
      "prevPageToken": "g6FtzYqIoXK+IWNOd2pkUXdWcFJNc0lNa1VweDptYXRyaXgub3JnoWTC",
      "success": true
    }
    Expand All
    object
    rooms
    Array of object
    object
    id
    string
    name
    string
    canJoin
    boolean
    canonicalAlias
    string
    joinedMembers
    integer
    topic
    string
    count
    integer
    total
    integer
    nextPageToken
    string
    prevPageToken
    string
    success
    boolean
    401

    Unauthorized



    Was this article helpful?

    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.