Skip to main content
The bot endpoints let you search the Top.gg bot directory, check vote history, and post server count statistics. All bot endpoints require a valid Top.gg token and are subject to a rate limit of 60 requests per minute.
Bot endpoints have stricter rate limits than other v0 endpoints. Stay within 60 requests per minute to avoid 429 Too Many Requests errors.

GET /bots

Searches the Top.gg bot directory with optional filtering, sorting, and pagination.

Query parameters

number
default:"50"
Number of bots to return. Maximum 500.
number
default:"0"
Number of bots to skip before returning results. Use with limit for pagination.
string
Field to sort results by. Prefix with - to sort in descending order (e.g., -points).
string
Comma-separated list of Bot fields to include in the response. Defaults to all fields.

Response fields

object[]
required
Array of Bot objects matching the query.
number
required
The limit value used for this request.
number
required
The offset value used for this request.
number
required
Number of results returned in this response.
number
required
Total number of bots matching the search query.

GET /bots/:bot_id/stats

Returns server and shard statistics for the specified bot.

Response fields

number
Total number of servers the bot is in. May be absent if not posted.
number[]
required
Array of server counts per shard.
number
Total number of shards. May be absent if not posted.

GET /bots/:bot_id/check

Checks whether a specific user has an active vote for the bot. Safe to call even if your bot has more than 1,000 monthly votes.

Query parameters

string
required
The Discord Snowflake ID of the user to check.

Response

A voted value of 1 means the user has voted in the past 12 hours. A value of 0 means they have not.

POST /bots/:bot_id/stats

Posts updated server count statistics for the specified bot. Call this endpoint whenever your bot’s server count changes, for example when it joins or leaves a guild.

Request body

number | number[]
required
The number of servers your bot is in. Pass an array to post per-shard counts (equivalent to using the shards field).
number[]
An array of server counts, one entry per shard.
number
The zero-indexed ID of the shard posting stats. Used when posting per-shard updates.
number
The total number of shards your bot is running.

Response

Returns 200 OK with an empty body on success.

Bot structure

Every bot endpoint that returns a Bot object uses the following structure:

Example bot object