npm i serverseekerapi
const srv = require("serverseekerapi");
Click Here and copy the value of api_key
In your code define a constant variable called ServerSeekerAPI
and input your API_KEY
const ServerSeekerAPI = new srv.ServerSeekerAPI("API_KEY_GOES_HERE");
Allows you to see your Discord data, alongside your current ratelimit status.
const res = await ServerSeekerAPI.getUserInfo();
console.log(res);
{
"discord_avatar_url": null,
"discord_id": "xxxxxxxxxxxxxxxxxx",
"discord_username": "xxxxxxxx",
"requests_made_server_info": 0,
"requests_made_servers": 8,
"requests_made_whereis": 14,
"requests_per_day_server_info": 200,
"requests_per_day_servers": 25,
"requests_per_day_whereis": 200
}
Allows you to find a Minecraft user based on their UUID / Username.
ServerSeekerAPI.WHEREIS_MODE.UUID; // Use this when passing a UUID as the 2nd parameter
ServerSeekerAPI.WHEREIS_MODE.NAME; // Use this when passing a Username as the 2nd parameter
const res = await ServerSeekerAPI.whereIs(ServerSeekerAPI.WHEREIS_MODE.NAME, "DAMCraft");
console.log(res);
[
...,
{
"last_seen": 1684873448,
"name": "DAMcraft",
"server": "193.35.18.165:14682",
"uuid": "68af4d98-24a2-41b6-96bc-a9c2ef9b397b"
},
...
]
Allows you to filter through servers to find specific ones.
DOES NOT CONTAIN PLAYER LIST INFO
const res = await ServerSeekerAPI.servers({ cracked: true, software: "paper", online_players: 5 });
console.log(res);
[
...,
{
"cracked": true,
"description": "§rsample description",
"last_seen": 1695830091,
"max_players": 100,
"online_players": 5,
"protocol": 763,
"server": "199.127.60.223:25565",
"version": "Paper 1.20.1"
},
...
]
Allows you to see info AND player history of a server.
const res = await ServerSeekerAPI.serverInfo("199.127.60.223", 25565); // 2nd parameter defaults to 25565
console.log(res);
{
"cracked": true,
"description": "§rsample description",
"last_seen": 1695831549,
"max_players": 100,
"online_players": 4,
"players": [
{
"last_seen": 1695831549,
"name": ".david99L",
"uuid": "00000000-0000-0000-0009-01f17a03d9f4"
},
{
"last_seen": 1695831549,
"name": ".Julieta_2327607",
"uuid": "00000000-0000-0000-0009-01febc1c4707"
}
],
"protocol": 763,
"server": "199.127.60.223:25565",
"version": "Paper 1.20.1"
}