API documentation

CraftServers.net provides an API to allow you to see if a player has voted for your server on our website.

In order to use this API, you need your server's API key, which can be found by visiting your server's edit page from your servers page.

Note: When looking up if a user has voted (for checking and claiming), we use UTC time.

Limitations

In order to ensure CraftServers.net is available for all players, we apply a rate limit of 30 calls per minute per IP address (that is, you should wait 2 seconds between each request to this API). If you exceed this limit regularly, please contact [email protected] to discuss your needs.

In a similar vain, you are highly encouraged to supply a useful User-Agent with your website or email address.

Check for a vote

GET https://www.craftservers.net/api/vrc?key=<API KEY>&check=<USERNAME>

You will receive a JSON object such as:

{"voted": true, "claimed": false}

If voted is false (implying claimed is false), that user did not vote today. If voted is true, but claimed is not, the vote is unclaimed. Otherwise, the user voted and the vote was claimed.

Check a player's voting history

GET https://www.craftservers.net/api/vrc?key=<API KEY>&check_extended=<USERNAME>

You will receive a JSON object such as:

{"votes": [{"claimed": false, "id": 6, "vote_date": "2017-04-05", "claim_date": null}]}

All votes are sorted in descending order from the date the vote was sent. Only the 50 most recent votes will be returned.

Claim a vote

GET https://www.craftservers.net/api/vrc?key=<API KEY>&claim=<USERNAME>

You will receive a JSON object such as:

{"voted": true, "claimed": true}

If voted is false (implying claimed is false), that user did not vote today. Otherwise, the vote will be claimed.