# Query the host list (/en/api-reference/api-ref/rtc/query-host-list)

> For AI agents: see the complete documentation index at [llms.txt](/llms.txt).

Retrieves hosts in a specified channel.

- OpenAPI: /openapi/rtc/channel-management.en.yaml
- Operation ID: cma-query-host-list
- Method: GET
- Path: /dev/v1/channel/user/{appid}/{channelName}/hosts_only

## Servers

- https://api.agora.io

## Parameters

- `appid` (path, required) - The App ID of the project. You can get it through one of the following methods:
- Copy from the [Agora Console](https://console.agora.io)
- Call the Get all projects API, and read the value of the `vendor_key`
  field in the response body.
- `channelName` (path, required) - The channel name.

## Request body

No request body.

## Responses

### 200

A `200` status code indicates success. The response body contains the result of the request.

- `success` (boolean) - The state of this request:
- `true`: Success.
- `false`: Reserved for future use.
No schema.
- `data` (object) - User information.
  - `data.channel_exist` (boolean) - Whether the specified channel exists. When `false`, no other fields are returned.
No schema.
  - `data.mode` (number) - The channel profile:
- `1`: The `COMMUNICATION` profile.
- `2`: The `LIVE_BROADCASTING` profile.
No schema.
  - `data.broadcasters` (array) - User IDs of all hosts in the channel. Returned only when `mode` is `2`.
    - `data.broadcasters.items` (number)
No schema.
### default

The request failed. See the `message` field in the response body for the reason. Refer to Response status codes for details.

No schema.
