> ## Documentation Index > Fetch the complete documentation index at: https://developer.rocket.chat/llms.txt > Use this file to discover all available pages before exploring further. # Search Public Rooms >
Premium tag
Search for federated public rooms by the server name or room name. ### Changelog | Version | Description | | ------------ | ------------| |6.0.0 | Added | ## OpenAPI ````json GET /api/v1/federation/searchPublicRooms { "openapi": "3.0.0", "info": { "version": "1.0.0", "title": "Settings" }, "servers": [ { "url": "https://apiexplorer.support.rocket.chat" } ], "tags": [ { "name": "Settings" }, { "name": "Audit" }, { "name": "Cloud" }, { "name": "DNS" }, { "name": "E2E" }, { "name": "Import" }, { "name": "Bulk User Import" }, { "name": "Instances" }, { "name": "Federation" }, { "name": "Moderation" }, { "name": "Device Management" }, { "name": "Password policy" }, { "name": "Video Conference" }, { "name": "Media Calls" } ], "paths": { "/api/v1/federation/searchPublicRooms": { "parameters": [], "get": { "summary": "Search Public Rooms", "operationId": "get-api-v1-federation-searchPublicRooms", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "rooms": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "canJoin": { "type": "boolean" }, "canonicalAlias": { "type": "string" }, "joinedMembers": { "type": "integer" }, "topic": { "type": "string" } } } }, "count": { "type": "integer" }, "total": { "type": "integer" }, "nextPageToken": { "type": "string" }, "prevPageToken": { "type": "string" }, "success": { "type": "boolean" } } }, "examples": { "Success Example": { "value": { "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 } } } } } }, "401": { "$ref": "#/components/responses/authorizationError" } }, "description": "
\"Premium
\n\nSearch for federated public rooms by the server name or room name.\n\n### Changelog\n| Version | Description |\n| ------------ | ------------|\n|6.0.0 | Added |", "parameters": [ { "$ref": "#/components/parameters/X-User-Id" }, { "$ref": "#/components/parameters/X-Auth-Token" }, { "schema": { "type": "string" }, "example": "matrix.org", "in": "query", "name": "serverName", "description": "The server name.", "required": true }, { "schema": { "type": "string" }, "example": "my public room name", "in": "query", "name": "roomName", "description": "The room name you want to search for in the server." }, { "schema": { "type": "string" }, "example": "g6FtzRlCoXK+IUpmS", "in": "query", "name": "pageToken", "description": "The page you want to retrieve, use it for pagination. Make sure to URL encode this." }, { "$ref": "#/components/parameters/count" } ], "tags": [ "Federation" ] } } }, "components": { "responses": { "authorizationError": { "description": "Unauthorized", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "message": { "type": "string" } } }, "examples": { "Authorization Error": { "value": { "status": "error", "message": "You must be logged in to do this." } } } } } } }, "parameters": { "X-User-Id": { "name": "X-User-Id", "in": "header", "required": true, "schema": { "type": "string" }, "example": "CkCPNctrgCDfmWLqC", "description": "The user ID." }, "X-Auth-Token": { "name": "X-Auth-Token", "in": "header", "required": true, "schema": { "type": "string" }, "example": "1Dd4iN_ClKn5jl-xPC36snQ4s9Zd5GZnXCQuCNSKcVE", "description": "The authentication token." }, "count": { "name": "count", "in": "query", "required": false, "schema": { "type": "integer" }, "example": 50, "description": "How many items to return. Refer to the [official documentation](https://developer.rocket.chat/apidocs/query-parameters#pagination) to learn more." } } } } ````