---
title: "Lists a server's published room directory"
method: GET
path: "/_matrix/client/v3/publicRooms"
tags: ["Room discovery"]
---

# Lists a server's published room directory

`GET /_matrix/client/v3/publicRooms`

## Request

- Base URL: `https://matrix.org`
- URL: `https://matrix.org/_matrix/client/v3/publicRooms`
- Auth: none declared
- TypeScript: <https://skmtc.dev/matrix/apis/matrix-client-server-api/docs/_matrix/client/v3/publicRooms/get.ts> (a function with typed inputs; its response is checked against the schema)

Lists a server's published room directory.

This API returns paginated responses.

**[Changed in `v1.19`]**  The server determines the order of the rooms
returned by this endpoint. Previously, rooms were ordered with the largest
joined member count first. Continuing to order by largest first or another
stable order is recommended.

## Query parameters

- `limit` integer
- `since` string
- `server` string, mx-server-name

## Response `200`

A list of the published rooms on the server.

- object: A list of the published rooms on the server.
  - `chunk` object[], required: A paginated chunk of published rooms.
    - `avatar_url` string, uri: The URL for the room's avatar, if one is set.
    - `canonical_alias` string, mx-room-alias: The canonical alias of the room, if any.
    - `guest_can_join` boolean, required: Whether guest users may join the room and participate in it. If they can, they will be subject to ordinary power level rules like any other user.
    - `join_rule` string: The room's join rule. When not present, the room is assumed to be `public`.
    - `name` string: The name of the room, if any.
    - `num_joined_members` integer, required: The number of members joined to the room.
    - `room_id` string, mx-room-id, required: The ID of the room.
    - `room_type` string: The `type` of room (from [`m.room.create`](https://spec.matrix.org/v1.19/client-server-api/#mroomcreate)), if any.
    - `topic` string: The plain text topic of the room. Omitted if no `text/plain` mimetype exists in [`m.room.topic`](https://spec.matrix.org/v1.19/client-server-api/#mroomtopic).
    - `world_readable` boolean, required: Whether the room may be viewed by users without joining.
  - `next_batch` string: A pagination token for the response. The absence of this token means there are no more results to fetch and the client should stop paginating.
  - `prev_batch` string: A pagination token that allows fetching previous results. The absence of this token means there are no results before this batch, i.e. this is the first batch.
  - `total_room_count_estimate` integer: An estimate on the total number of published rooms, if the server has an estimate.

---

[API](https://skmtc.dev/matrix/apis/matrix-client-server-api.md) - [All operations](https://skmtc.dev/matrix/apis/matrix-client-server-api/llms.txt) - [OpenAPI document](https://skmtc.dev/matrix/apis/matrix-client-server-api/revisions/c7fe4072c681?raw)
