SAMP-API.TK


REST API for San Andreas Multiplayer servers

How to use the API?

Simply just hit an endpoint with yours SA:MP server IP and port (if it is not 7777).
https://samp-api.tk/server/{yours server ip here}{:port}
E.g. https://samp-api.tk/server/127.0.0.1:7778
You can also use domains https://samp-api.tk/server/play.domain.com:7776
If server uses port 7777, you don't have to put it in request https://samp-api.tk/server/127.0.0.1
Else if it uses other port remember to put : between ip and port

You still don't know how to use it? Scroll down to the bottom of the page (to test section) and type your ip. You will get a response and a link.

What can I get from response?

If server is online...

*All responses from online servers are cached for 2 minutes.
  • cache: (bool) if true resposne comes from cache
  • online: (bool) true
  • ip: (string) given ip
  • port: (string) server port if given, if not 7777
  • password: (bool) true or false
  • players: (int) number of players online
  • maxplayers: (int) number of slots
  • hostname: (string) hostname of the server
  • gamemode: (string) name of the gamemode
  • language: (string) languages of server
  • artwork: (string) Yes or No - defines if server is using custom objects and skins [only 0.3.DL]
  • lagcomp: (string) On or Off
  • mapname: (string) map that server uses
  • version: (string) version of samp server
  • weather: (string) weather id
  • weburl:(string) server's website url
  • worldtime: (string) world time
  • list: (array) contains informations about each online player - 'playerid', 'nickname', 'score' and 'ping' [if number of online players is greater than 100, array will be empty]

If server is offline...

  • online: (bool) false
  • ip: (string) given ip
  • port: (string) server port if given, if not 7777

Let's test this API

Response will show up here
Created with by Pudlisz