Search Discord guild members
Search guild members whose username or nickname starts with the query (Discord matches prefixes only, not substrings).
Does not require the privileged Server Members Intent, so this works even where the full member listing returns 403.
API key authentication - use your Zernio API key as a Bearer token
In: header
Path Parameters
Query Parameters
Username or nickname prefix to match.
1 <= length <= 100251 <= value <= 1000Response Body
application/json
application/json
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.discord.searchDiscordGuildMembers({ path: { guildId: 'guild_abc123', }, query: { accountId: 'account_abc123', query: 'string', },});console.log(data);{
"data": [
{
"user": {
"id": "string",
"username": "string",
"discriminator": "string",
"avatar": "string",
"global_name": "string"
},
"nick": "string",
"roles": [
"string"
],
"joined_at": "2019-08-24T14:15:22Z",
"premium_since": "2019-08-24T14:15:22Z"
}
]
}{
"error": "Unauthorized"
}List Discord guild members GET
Cursor-paginated list of guild members. Returns Discord's raw member objects so callers can build community-ops automation (e.g. "add role to all members joined in the last 7 days") on the actual platform shape. **Important:** this endpoint requires the privileged "Server Members Intent" on the Discord application. If the intent is not enabled, Discord rejects the call and this endpoint returns **403**. Single member lookup and prefix search (see the sibling endpoints) do not need the intent. Pagination: pass `after` = the last `user.id` from the previous page. Omit on the first call. Response includes a `nextCursor` and `hasMore` flag so callers don't need to know Discord's pagination shape.
Get a Discord guild member GET
Fetch a single guild member by Discord user id. Does not require the privileged Server Members Intent, so this works even where the full member listing returns 403.