B
BattleMetrics•16mo ago
East

battle metrics api

hello im wondering if theres a way to use the battlemetrics api to search for servers and find the population of it and make that into a discord bot ive been struggling to get mine to work 😄
20 Replies
East
EastOP•16mo ago
this is for ark^
Hordicus
Hordicus•16mo ago
If you have a specific server in mind you can make a simple request like this: https://api.battlemetrics.com/servers/2522768 If you need to actually search for the server, then use the search filter like so: https://api.battlemetrics.com/servers?filter[game]=ark&filter[search]=genesis
East
EastOP•16mo ago
is there a wat to get all servers online for ark? instead of searching them server by server?
[MIG] EOC LongBarrel
[MIG] EOC LongBarrel•16mo ago
Not at once, you would have to use the next page. This can take alot of time due to the amount of servers. Just remove the search filter. & run game filter only
East
EastOP•16mo ago
There's a official ark json file for xbox and PlayStation I've been trying to find something similar for pc but bm is the closest I've got to finding servers then extracting the server names and such Another question I want to ask is there somewhere I can search for a user using a gamertag and pull the servers they have played and the playtime of each server?
[MIG] EOC LongBarrel
[MIG] EOC LongBarrel•16mo ago
Have you reviewed the API Documentation?
East
EastOP•16mo ago
Yes but I find it confusing It goes on about banning players ect
[MIG] EOC LongBarrel
[MIG] EOC LongBarrel•16mo ago
Yeah that's part of the RCON Stuff. https://www.battlemetrics.com/developers/documentation The top section has lists, like player list, player Info, player sessions.
[MIG] EOC LongBarrel
[MIG] EOC LongBarrel•16mo ago
No description
East
EastOP•16mo ago
Ahh okay thank you!
[MIG] EOC LongBarrel
[MIG] EOC LongBarrel•16mo ago
Possibly cause PC servers are slightly different. They use what Is known as a master server list, which just contains server IPs & query ports. Then you have to manually query every server (this is what BM does for most games)
East
EastOP•16mo ago
So there's no way to get every server and info into 1 json or into 1 file? Withought having to go page by page
[MIG] EOC LongBarrel
[MIG] EOC LongBarrel•16mo ago
No, you need to use pages
East
EastOP•16mo ago
Ahh okay
[MIG] EOC LongBarrel
[MIG] EOC LongBarrel•16mo ago
Battlemetrics isn't designed for commercial use, API is designed for personal use.
East
EastOP•16mo ago
Ah I'm just makeing a fun little project
[MIG] EOC LongBarrel
[MIG] EOC LongBarrel•16mo ago
If you use it for commercial & charge for it. Battlemetrics can take legal actions under terms of use/service.
East
EastOP•16mo ago
Nah I'm not paying people to use it
[MIG] EOC LongBarrel
[MIG] EOC LongBarrel•16mo ago
You will have to live with the same constraints everyone else has.
East
EastOP•16mo ago
Just seeing my capabilities of coding goes Yeah
Want results from more Discord servers?
Add your server