Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
title: "Get Guild Role Member Counts Endpoint"
date: "2025-12-09"
topics:
- "HTTP API"
---

Apps can now use the [Get Guild Role Member Counts](/docs/resources/guild#get-guild-role-member-counts) endpoint to access the number of members that have each role!
15 changes: 15 additions & 0 deletions docs/resources/guild.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -1153,6 +1153,21 @@ Returns a list of [role](/docs/topics/permissions#role-object) objects for the g

Returns a [role](/docs/topics/permissions#role-object) object for the specified role.

## Get Guild Role Member Counts
<Route method="GET">/guilds/[\{guild.id\}](/docs/resources/guild#guild-object)/roles/member-counts</Route>

Returns a map of role IDs to the number of members with the role. Does not include the @everyone role.

###### Example Response
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know this is a mapping but should we also create a table to show what the values are?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can propose my table 😅

A mapping of role IDs to the number of members with that role.

| Field      | Type      | Description                               |
|------------|-----------|-------------------------------------------|
| \{role.id} | integer   | number of members with the role           |

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, looks good to me!


```json
{
"613425648685547541": 1337,
"1409696176629878905": 2,
"697138785317814292": 67
}
```

## Create Guild Role
<Route method="POST">/guilds/[\{guild.id\}](/docs/resources/guild#guild-object)/roles</Route>

Expand Down