BotBlock API
A single POST to send your bot's guild count
curl -X POST https://botblock.org/api/count \
-H 'Content-Type: text/json' \
--data-raw '
{
"server_count": 10000,
"bot_id": "123456789123456789",
"discordbotlist.com": "abcDEFghi.JKLmnoPQR.stuVWXyz1",
"discord.bots.gg": "abcDEFghi.JKLmnoPQR.stuVWXyz1"
}'The POST /api/count endpoint of the BotBlock API is the core endpoint that bots and libraries integrate with, allowing a bot to make a single POST call to send their guild count to all supported lists, based on the API keys passed for lists.
Note: This ratelimit has a 1 / 120s ratelimit for successful requests. Requests that return a 400 or 429 status code are not ratelimited.
Request body (required)
application/json
Schema
object
server_count
integerThe server/guild count for the bot.
Note: Value is required but will not be sent to a list if ‘shards’ is provided and the list accepts a ‘shards’ value.
bot_id
string<snowflake>The ID of the bot.
shard_id
integerNullable: true
The shard ID for the current count being posted.
Note: This information is only sent to bot lists that support it.
shard_count
integerNullable: true
The total number of shards for the bot.
Note: This information is only sent to bot lists that support it.
shards
arrayNullable: true
The server/guild count for each shard.
Note: This information is only sent to bot lists that support it.
[*]
integer
<*>
stringProvide keys for each list ID to post to, with the value being the API key for the list.
Examples
{
"server_count": 10000,
"bot_id": "123456789123456789",
"thelist.org": "abcDEFghi.JKLmnoPQR.stuVWXyz1",
"listofbots.com": "abcDEFghi.JKLmnoPQR.stuVWXyz1",
"otherlist.xyz": "abcDEFghi.JKLmnoPQR.stuVWXyz1"
}Responses
200
Guild count forwarded to provided lists.
application/json
Schema
object
success
objectProperties for each list that returned a successful response.
<*>
arrayMin items: 3
Max items: 3
[*]
Integer response status code from list, followed by string response from list, followed by JSON stringified data sent to list.
One of:
-
string
-
integer
failure
objectProperties for each list that returned a failure response.
<*>
arrayMin items: 3
Max items: 3
[*]
Integer response status code from list, followed by string response from list, followed by JSON stringified data sent to list.
One of:
-
string
-
integerExamples
{
"success": {
"thelist.org": [
200,
"{\"message\":\"OK\"}",
"{\"server_count\":10000}"
],
"listofbots.com": [
200,
"",
"{\"count\":10000}"
]
},
"failure": {
"otherlist.xyz": [
404,
"Bot not found",
"{\"guilds\":10000}"
]
}
}400
Request validation failed.
application/json
Schema
object
error
boolean[ true ]
status
integer[ 400 ]
message
stringAn error message explaining why request validation failed.
Examples
{
"error": true,
"status": 400,
"message": "'bot_id' must be a snowflake"
}429
Request ratelimited.
application/json
Schema
object
error
boolean[ true ]
status
integer[ 429 ]
retry_after
integerHow many seconds until the API can be used again.
ratelimit_reset
integerThe unix timestamp when the API can be used again.
ratelimit_method
stringRatelimit scope - the HTTP method.
ratelimit_route
stringRatelimit scope - the API route.
ratelimit_ip
stringRatelimit scope - the requesting IP address.
ratelimit_bot_id
stringRatelimit scope - the provided bot ID.
Examples
{
"error": true,
"status": 429,
"retry_after": 80,
"ratelimit_reset": 1609459320,
"ratelimit_method": "GET",
"ratelimit_route": "/api/path/name",
"ratelimit_ip": "12.45.67.89",
"ratelimit_bot_id": "123456789123456789"
}Headers
Retry-After
integerHow many seconds until the API can be used again.
X-Rate-Limit-Reset
integerThe unix timestamp when the API can be used again.
X-Rate-Limit-Method
stringRatelimit scope - the HTTP method.
X-Rate-Limit-Route
stringRatelimit scope - the API route.
X-Rate-Limit-IP
stringRatelimit scope - the requesting IP address.
X-Rate-Limit-Bot-ID
stringRatelimit scope - the provided bot ID.
API Libraries
Interact with the BotBlock API through libraries built for Discord bots.
Save time and get started with the BotBlock API faster by using one of our pre-built libraries, designed with Discord bots in mind.
Fetch aggregated information about a Discord bot based on data returned by bot lists that BotBlock tracks that support getting bot information.
Note: This ratelimit has a 1 / 30s ratelimit for successful requests. Requests that return a 400 or 429 status code are not ratelimited.
Path Parameters
id
string<snowflake>Discord bot ID to fetch
Responses
200
Guild count forwarded to provided lists.
application/json
Schema
object
id
string<snowflake>The ID of the bot being fetched.
username
stringThe username of the bot fetched.
Note: Based on the most common value returned from list data, defaults to Unknown.
discriminator
stringThe discriminator of the bot fetched.
Note: Based on the most common value returned from list data, defaults to 0000.
owners
arrayThe IDs of all known owners of the bot.
[*]
string<snowflake>
server_count
integerThe server/guild count for the bot.
Note: Based on the maximum value returned from list data, defaults to 0.
invite
stringThe invite URL for the bot (Discord or custom), if known.
Note: Based on the most common value returned from list data, defaults to an empty string.
prefix
stringThe command prefix for the bot, if known.
Note: Based on the most common value returned from list data, defaults to an empty string.
website
stringThe website link for the bot, if known.
Note: Based on the most common value returned from list data, defaults to an empty string.
github
stringThe open-source GitHub URL for the bot, if known.
Note: Based on the most common value returned from list data, defaults to an empty string.
support
stringThe support link for the bot (Discord or custom), if known.
Note: Based on the most common value returned from list data, defaults to an empty string.
library
stringThe library/language the bot was developed in, if known.
Note: Based on the most common value returned from list data, defaults to an empty string.
list_data
objectResponse from each BotBlock-tracked list that has a endpoint for fetching bot information.
<*>
arrayMin items: 2
Max items: 2
[*]
Data response from the list (parsed JSON, or raw text respose), followed by the integer response status code.
One of:
-
AnyCan be any JSON-able value - string, number, boolean, array or object.
-
integerExamples
{
"id": "123456789123456789",
"username": "My Bot",
"discriminator": "1234",
"owners": [
"123456789123456789"
],
"server_count": 10000,
"invite": "https://discord.com/oauth2/authorize?client_id=123456789123456789&scope=bot",
"prefix": "!",
"website": "https://my-bot.com/",
"github": "https://github.com/hello/my-bot",
"support": "https://discord.gg/discord-developers",
"library": "discord.js",
"list_data": {
"thelist.org": [
{
"bot_id": "123456789123456789",
"...": "..."
},
200
],
"listofbots.com": [
{
"bot": {
"id": "123456789123456789",
"guilds": 10000,
"...": "..."
}
},
200
],
"otherlist.xyz": [
"Bot not found",
404
]
}
}400
Request validation failed.
application/json
Schema
object
error
boolean[ true ]
status
integer[ 400 ]
message
stringAn error message explaining why request validation failed.
Examples
{
"error": true,
"status": 400,
"message": "'id' must be a snowflake"
}429
Request ratelimited.
application/json
Schema
object
error
boolean[ true ]
status
integer[ 429 ]
retry_after
integerHow many seconds until the API can be used again.
ratelimit_reset
integerThe unix timestamp when the API can be used again.
ratelimit_method
stringRatelimit scope - the HTTP method.
ratelimit_route
stringRatelimit scope - the API route.
ratelimit_ip
stringRatelimit scope - the requesting IP address.
ratelimit_bot_id
stringRatelimit scope - the provided bot ID.
Examples
{
"error": true,
"status": 429,
"retry_after": 80,
"ratelimit_reset": 1609459320,
"ratelimit_method": "GET",
"ratelimit_route": "/api/path/name",
"ratelimit_ip": "12.45.67.89",
"ratelimit_bot_id": "123456789123456789"
}Headers
Retry-After
integerHow many seconds until the API can be used again.
X-Rate-Limit-Reset
integerThe unix timestamp when the API can be used again.
X-Rate-Limit-Method
stringRatelimit scope - the HTTP method.
X-Rate-Limit-Route
stringRatelimit scope - the API route.
X-Rate-Limit-IP
stringRatelimit scope - the requesting IP address.
X-Rate-Limit-Bot-ID
stringRatelimit scope - the provided bot ID.
Fetch information about all bot lists that BotBlock tracks, including core information as well as API details and known features.
Query Parameters
filter
booleanSet to true to only return API information for each lists. Lists with no API data will be excluded from the response.
Responses
200
Lists tracked by BotBlock.
application/json
Schema
objectProperties for each list.
<*>
object
id
stringThe ID of the list on BotBlock.
added
integerThe unix timestamp for when the list was added to BotBlock.
name
stringThe displayed name of the list.
url
string<uri>The main URL to access the bot list.
icon
string<uri>A URL for an icon for the list.
language
stringThe languages the list has support for.
display
integer[ 0, 1 ]
A flag for if the list is displayed on BotBlock, with 0 = hidden, 1 = displayed.
defunct
integer[ 0, 1 ]
A flag for if the list is known to be defunct, with 0 = active, 1 = defunct.
discord_only
integer[ 0, 1 ]
A flag for if the list holds Discord bots only, with 0 = includes non-Discord, 1 = Discord-only.
description
stringThe displayed description of the list.
api_docs
string<uri>Nullable: true
The URL to the API docs for the list, if known.
api_post
string<uri>Nullable: true
The endpoint URL for posting a bot’s guild count to the list, if known, with :id as placeholder for bot Id.
api_post_method
stringNullable: true
The HTTP method to use for submitting a bot’s guild count to the list via api_post. Defaults to POST if null.
api_field
stringNullable: true
The field name for guild count when posting a bot’s guild count to the list, if known.
api_shard_id
stringNullable: true
The field name for shard Id when posting a bot’s guild count to the list, if known.
api_shard_count
stringNullable: true
The field name for shard count when posting a bot’s guild count to the list, if known.
api_shards
stringNullable: true
The field name for shards when posting a bot’s guild count to the list, if known.
api_get
string<uri>Nullable: true
The endpoint URL for getting a bot from the list, if known, with :id as placeholder for bot Id.
api_all
string<uri>Nullable: true
The endpoint URL for getting all bots from the list, if known.
view_bot
string<uri>Nullable: true
The URL to the view a bot on the list, if known, with :id as placeholder for bot Id.
bot_widget
string<uri>Nullable: true
The URL to get a bot widget from the list, if known, with :id as placeholder for bot Id.
content
stringNullable: true
The displayed notice content for the list, if any.
owners
stringNullable: true
Names of the list owners, if known.
discord
string<uri>Nullable: true
The URL invite for the list’s Discord server, if known.
features
arrayA list of features that the list has
[*]
All of:
-
object
name
stringThe displayed name of the feature.
id
stringThe sluggified name of the feature.
display
integerA value used to rank features. Sorted in descending order.
type
integer[ 0, 1, 2 ]
The type the feature is, with 0 = positive, 1 = neutral, 2 = negative.
description
stringThe displayed description of the feature.
-
object
value
integer[ 0, 1 ]
A flag for if the list is known to have this feature or not, with 0 = does not have feature, 1 = has feature.
Examples
{
"thelist.org": {
"id": "thelist.org",
"added": 1609459200,
"name": "The List",
"url": "https://thelist.org/",
"icon": "https://thelist.org/favicon.png",
"language": "English",
"display": 1,
"defunct": 0,
"discord_only": 1,
"description": "The List",
"api_docs": "https://thelist.org/api/docs",
"api_post": "https://thelist.org/api/bot/:id",
"api_post_method": null,
"api_field": "server_count",
"api_shard_id": "shard_id",
"api_shard_count": "shard_count",
"api_shards": null,
"api_get": "https://thelist.org/api/bot/:id",
"api_all": null,
"view_bot": "https://thelist.org/bot/:id",
"bot_widget": "https://thelist.org/bot/:id/widget",
"content": null,
"owners": "123456789123456789",
"discord": "https://discord.gg/discord-developers",
"features": [
{
"name": "Guild count API",
"id": "guild-count-api",
"display": 5,
"type": 0,
"description": "Has an API endpoint for guild count",
"value": 1
}
]
},
"listofbots.com": {
"id": "listofbots.com",
"added": 1609459200,
"name": "List of Bots",
"url": "https://listofbots.com/",
"icon": "https://listofbots.com/assets/icon.png",
"language": "English",
"display": 1,
"defunct": 0,
"discord_only": 0,
"description": "List of Bots for chat platforms",
"api_docs": null,
"api_post": null,
"api_field": null,
"api_shard_id": null,
"api_shard_count": null,
"api_shards": null,
"api_get": null,
"api_all": null,
"view_bot": "https://listofbots.com/bots/:id",
"bot_widget": null,
"content": null,
"owners": "123456789123456789",
"discord": "https://discord.gg/discord-developers",
"features": [
{
"name": "Guild count API",
"id": "guild-count-api",
"display": 5,
"type": 0,
"description": "Has an API endpoint for guild count",
"value": 0
}
]
}
}Fetch information about a given bot lists that BotBlock tracks, including core information as well as API details and known features.
Path Parameters
id
stringID of the list on BotBlock to fetch.
Responses
200
Requested list on BotBlock.
application/json
Schema
object
id
stringThe ID of the list on BotBlock.
added
integerThe unix timestamp for when the list was added to BotBlock.
name
stringThe displayed name of the list.
url
string<uri>The main URL to access the bot list.
icon
string<uri>A URL for an icon for the list.
language
stringThe languages the list has support for.
display
integer[ 0, 1 ]
A flag for if the list is displayed on BotBlock, with 0 = hidden, 1 = displayed.
defunct
integer[ 0, 1 ]
A flag for if the list is known to be defunct, with 0 = active, 1 = defunct.
discord_only
integer[ 0, 1 ]
A flag for if the list holds Discord bots only, with 0 = includes non-Discord, 1 = Discord-only.
description
stringThe displayed description of the list.
api_docs
string<uri>Nullable: true
The URL to the API docs for the list, if known.
api_post
string<uri>Nullable: true
The endpoint URL for posting a bot’s guild count to the list, if known, with :id as placeholder for bot Id.
api_post_method
stringNullable: true
The HTTP method to use for submitting a bot’s guild count to the list via api_post. Defaults to POST if null.
api_field
stringNullable: true
The field name for guild count when posting a bot’s guild count to the list, if known.
api_shard_id
stringNullable: true
The field name for shard Id when posting a bot’s guild count to the list, if known.
api_shard_count
stringNullable: true
The field name for shard count when posting a bot’s guild count to the list, if known.
api_shards
stringNullable: true
The field name for shards when posting a bot’s guild count to the list, if known.
api_get
string<uri>Nullable: true
The endpoint URL for getting a bot from the list, if known, with :id as placeholder for bot Id.
api_all
string<uri>Nullable: true
The endpoint URL for getting all bots from the list, if known.
view_bot
string<uri>Nullable: true
The URL to the view a bot on the list, if known, with :id as placeholder for bot Id.
bot_widget
string<uri>Nullable: true
The URL to get a bot widget from the list, if known, with :id as placeholder for bot Id.
content
stringNullable: true
The displayed notice content for the list, if any.
owners
stringNullable: true
Names of the list owners, if known.
discord
string<uri>Nullable: true
The URL invite for the list’s Discord server, if known.
features
arrayA list of features that the list has
[*]
All of:
-
object
name
stringThe displayed name of the feature.
id
stringThe sluggified name of the feature.
display
integerA value used to rank features. Sorted in descending order.
type
integer[ 0, 1, 2 ]
The type the feature is, with 0 = positive, 1 = neutral, 2 = negative.
description
stringThe displayed description of the feature.
-
object
value
integer[ 0, 1 ]
A flag for if the list is known to have this feature or not, with 0 = does not have feature, 1 = has feature.
Examples
{
"id": "thelist.org",
"added": 1609459200,
"name": "The List",
"url": "https://thelist.org/",
"icon": "https://thelist.org/favicon.png",
"language": "English",
"display": 1,
"defunct": 0,
"discord_only": 1,
"description": "The List",
"api_docs": "https://thelist.org/api/docs",
"api_post": "https://thelist.org/api/bot/:id",
"api_post_method": null,
"api_field": "server_count",
"api_shard_id": "shard_id",
"api_shard_count": "shard_count",
"api_shards": null,
"api_get": "https://thelist.org/api/bot/:id",
"api_all": null,
"view_bot": "https://thelist.org/bot/:id",
"bot_widget": "https://thelist.org/bot/:id/widget",
"content": null,
"owners": "123456789123456789",
"discord": "https://discord.gg/discord-developers",
"features": [
{
"name": "Guild count API",
"id": "guild-count-api",
"display": 5,
"type": 0,
"description": "Has an API endpoint for guild count",
"value": 1
}
]
}404
Requested list not found.
application/json
Schema
object
error
boolean[ true ]
status
integer[ 404 ]
message
stringAn error message explaining the list wasn’t found.
Examples
{
"error": true,
"status": 404,
"message": "List not found"
}Fetch the map of legacy bot list IDs to the current list IDs.
Responses
200
Map of old IDs to new IDs.
application/json
Schema
objectObject mapping legacy IDs as keys to current list IDs as values.
<*>
stringExamples
{
"oldlist.com": "thelist.org",
"botlist.xyz": "botlist.com"
}