Botlist Documentation

Last updated 13 days ago

Welcome to the documentation

The official documentation for the NPM package botlist.space-api.

Botlist

Serverlist

NPM Package

For support, DM Wistful__#9063 on discord.

Start the API

First install the package by running:

$ npm i botlist.space-api

Once you installed the npm package, you can now use the package in your code:

const botlistspaceAPI = require('botlist.space-api');
// Now call the API code
const api = new botlistspaceAPI.botlistAPI('InsertUserKeyHere');

Note, a user key is needed for MOST functions with the api.

Functions with the API

Now that you have your code set up, you can now interact the API.

Please remember like I said, a user key is need for MOST functions with the api.

ALL FUNCTIONS BELOW NEED A USER KEY.

For more info on the functions like response, go here.

get
Get Bot

api.
getBot('InsertIDHere')
This function is used to get info about a bot. A user key is needed for this function.
Request
Response
Path Parameters
id
required
string
ID of the bot.
200: OK
Click here for more info.
{
"success": true, // Boolean
"page": 1, // Number
"page_count": 20, // Number
"bots": [ // Array<Object>
{ ... },
{ ... },
{ ... }
]
}

get
Get User

api.
getUser('InsertIDHere')
This function is used to get info about a user.
Request
Response
Path Parameters
id
required
string
ID of user
200: OK
Click Here for more info.
{
"success": true, // Boolean
"id": "507329700402561045", // String
"username": "PassTheMayo", // String
"discriminator": "1281", // String
"avatar": "https://cdn.discordapp.com/avatars/507329700402561045/188e722beb5a696d9cd320d1b9b1fd2e.png?size=256", // String
"short_description": "..." // ?String
}

get
Get Stats

api.
getStats()
The function get the stats about the website.
Request
Response
200: OK
Click Here for more info.
{
"success": true, // Boolean
"total_bots": 400, // Number
"approved_bots": 390, // Number
"unapproved_bots": 10, // Number
"tags": 34, // Number
"users": 2500 // Number
}

post
Post Stats

api.
postStats(guild, auth, id)
This functions is used to post your guild count. THIS REQUIRES YOUR BOT KEY, NOT TOKEN.
Request
Response
Headers
id
required
string
ID of the bot.
auth
required
string
Your bot's key from the page. NOT BOT TOKEN.
Body Parameters
shard-array
optional
array
guild
required
string
Number of guilds. Can be used with Array and string.
200: OK
Click here for more info.
{
"success": true, // Boolean
"code": 200, // Number
"message": "Successfully updated server count" // String
}

get
Get Upvotes

api.
getUpvotes(pageNumb, auth, id)
This function is used to get you upvotes per page. THIS REQUIRES YOUR BOT KEY, NOT TOKEN.
Request
Response
Path Parameters
id
required
string
Your bot's id.
pageNumb
optional
string
Page number, defaults to 1.
Headers
auth
required
string
Your bot's key from your page. NOT BOT TOKEN.
200: OK
Click here for more info.
{
"success": true, // Boolean
"page": 2, // Number
"page_count": 6, // Number
"upvotes": [ // ??Array<Object>
{
"user": {
"id": "507329700402561045", // String
"username": "PassTheMayo", // String
"discriminator": "1281", // String
"avatar": "...", // String
"short_description": "..." // ?String
},
"timestamp": 1546208945017 // Number
},
...
]
}

get
Get All Bots

api.
getAllBots(pageNumb)
This function is used to get all bots on a per page basis.
Request
Response
Path Parameters
pageNumb
required
string
Number of page.
200: OK
{
"success": true, // Boolean
"page": 1, // Number
"page_count": 20, // Number
"bots": [ // Array<Object>
{ ... },
{ ... },
{ ... }
]
}