Search Public Rooms

Prev Next
Get
/api/v1/federation/searchPublicRooms
Premium tag

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

Changelog

Version Description
6.0.0 Added
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. Refer to the official documentation to learn more.

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

Authorization Error
{
  "status": "error",
  "message": "You must be logged in to do this."
}
object
status
string
message
string
Tags