API Documentation
Access ASA Server List data programmatically with our public REST API
Getting Started
Our public API is free to use and does not require authentication for basic endpoints. Rate limiting is applied to prevent abuse.
Base URL:
https://asaservers.net/api/publicEndpoints
GET /api/public/servers
Retrieve a list of all servers with pagination and filtering.
Query Parameters:
page (optional) - Page number (default: 1)limit (optional) - Items per page (default: 20, max: 100)search (optional) - Search by server namemap (optional) - Filter by map nameExample Request:
GET https://asaservers.net/api/public/servers?page=1&limit=20Example Response:
{
"servers": [
{
"id": "server-id",
"name": "Server Name",
"ipAddress": "127.0.0.1",
"gamePort": 7777,
"currentPlayers": 20,
"maxPlayers": 70,
"isOnline": true,
"map": "TheIsland",
"description": "Server description",
"totalVotes": 150,
"createdAt": "2026-01-01T00:00:00.000Z"
}
],
"pagination": {
"page": 1,
"limit": 20,
"total": 100,
"totalPages": 5
}
}GET /api/public/servers/:id
Get detailed information about a specific server.
URL Parameters:
id - Server IDExample Request:
GET https://asaservers.net/api/public/servers/server-idExample Response:
{
"id": "server-id",
"name": "Server Name",
"ipAddress": "127.0.0.1",
"gamePort": 7777,
"queryPort": 7778,
"currentPlayers": 20,
"maxPlayers": 70,
"isOnline": true,
"map": "TheIsland",
"description": "Detailed server description",
"rates": "xp:2,harvest:3,taming:5",
"mods": "mod1,mod2",
"discordUrl": "https://discord.gg/...",
"website": "https://example.com",
"totalVotes": 150,
"version": "1.0.0",
"createdAt": "2026-01-01T00:00:00.000Z",
"updatedAt": "2026-01-20T00:00:00.000Z"
}GET /api/public/stats
Get overall platform statistics.
Example Request:
GET https://asaservers.net/api/public/statsExample Response:
{
"totalServers": 250,
"onlineServers": 230,
"totalPlayers": 5420,
"totalVotes": 125000
}POST /api/billing/checkout
Create a Stripe checkout session for subscription upgrades. Requires authentication.
Request Body:
tier - Subscription tier (standard, premium, enterprise)Example Request:
POST https://asaservers.net/api/billing/checkout
Content-Type: application/json
{
"tier": "premium"
}Example Response:
{
"sessionId": "cs_test_...",
"url": "https://checkout.stripe.com/..."
}GET /api/auctions
Get list of active auctions for featured placements.
Query Parameters:
status (optional) - active, completed, canceledtier (optional) - standard, premium, enterpriseExample Request:
GET https://asaservers.net/api/auctions?status=activePOST /api/auctions/:id/bid
Place a bid on an active auction. Requires authentication.
Request Body:
bidAmount - Bid amount in cents (must be higher than current highest bid)Example Request:
POST https://asaservers.net/api/auctions/auction-id/bid
Content-Type: application/json
{
"bidAmount": 10000
}POST /api/servers/:id/vote
Submit a vote for a server. No authentication required.
Request Body:
visitorId - Unique visitor identifier (10-100 chars)username (optional) - Voter usernamesteamId (optional) - Steam IDExample Request:
POST https://asaservers.net/api/servers/server-id/vote
Content-Type: application/json
{
"visitorId": "visitor-abc123xyz",
"username": "PlayerName",
"steamId": "76561198000000000"
}Note:
Votes have a 24-hour cooldown per visitor. Check vote status with GET /api/servers/:id/vote?visitorId=visitor-id
POST /api/servers/:id/favorite
Add a server to your favorites. Requires authentication.
Example Request:
POST https://asaservers.net/api/servers/server-id/favoriteDELETE /api/servers/:id/favorite
Remove a server from your favorites. Requires authentication.
Example Request:
DELETE https://asaservers.net/api/servers/server-id/favoriteGET /api/user/profile
Get current user profile information. Requires authentication.
Example Request:
GET https://asaservers.net/api/user/profileExample Response:
{
"id": "user-id",
"email": "user@example.com",
"username": "username",
"avatarUrl": "https://...",
"steamId": "76561198000000000",
"discordId": "123456789",
"isAdmin": false,
"createdAt": "2026-01-01T00:00:00.000Z",
"_count": {
"ownedServers": 5,
"votes": 42
}
}GET /api/user/servers
Get servers owned by the current user. Requires authentication.
Query Parameters:
page (optional) - Page number (default: 1)limit (optional) - Items per page (default: 10)Example Request:
GET https://asaservers.net/api/user/servers?page=1&limit=10GET /api/user/favorites
Get your favorite servers. Requires authentication.
Example Request:
GET https://asaservers.net/api/user/favoritesGET /api/user/api-keys
List your API keys. Requires authentication.
Example Request:
GET https://asaservers.net/api/user/api-keysPOST /api/user/api-keys
Create a new API key. Requires authentication.
Request Body:
name - Name for your API keyExample Request:
POST https://asaservers.net/api/user/api-keys
Content-Type: application/json
{
"name": "My App"
}Authentication
Some endpoints require authentication via NextAuth session. To authenticate:
- Log in with email/password, Discord, or Steam
- Your session will be maintained automatically
- Unauthenticated requests to protected endpoints will receive a 401 Unauthorized response
API keys can be created at /api/user/api-keys for programmatic access with custom rate limits.
Rate Limiting
To ensure fair usage and prevent abuse, the following rate limits apply:
- 100 requests per minute per IP address
- 1000 requests per hour per IP address
- Vote cooldown: 24 hours per visitor per server
- Contact form: 5 submissions per hour per IP
If you exceed these limits, you will receive a 429 (Too Many Requests) response. Please implement appropriate caching and retry logic in your applications.
Response Codes
200Success - Request completed successfully400Bad Request - Invalid parameters404Not Found - Resource does not exist429Too Many Requests - Rate limit exceeded500Internal Server Error - Something went wrongCommon Use Cases
Voting for a Server
// Generate a unique visitor ID (e.g., from browser fingerprint)
const visitorId = generateUniqueId();
const response = await fetch('https://asaservers.net/api/servers/server-id/vote', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
visitorId: visitorId,
username: 'PlayerName'
})
});
const result = await response.json();
if (response.status === 429) {
console.log('Vote cooldown active:', result.nextVoteAt);
}Getting User Profile (Authenticated)
// After user is logged in
const response = await fetch('https://asaservers.net/api/user/profile');
const user = await response.json();
console.log(user.username, user.ownedServers);Filtering Servers
// Get PvP servers with high multipliers
const params = new URLSearchParams({
gameMode: 'PvP',
minMultiplier: '5',
onlineOnly: 'true',
sortBy: 'totalVotes',
limit: '20'
});
const response = await fetch('https://asaservers.net/api/servers?' + params);
const data = await response.json();Code Examples
JavaScript / Node.js
const response = await fetch('https://asaservers.net/api/public/servers?page=1&limit=20');
const data = await response.json();
console.log(data.servers);Python
import requests
response = requests.get('https://asaservers.net/api/public/servers', params={'page': 1, 'limit': 20})
data = response.json()
print(data['servers'])cURL
curl "https://asaservers.net/api/public/servers?page=1&limit=20"Server Filtering Parameters
The /api/servers endpoint supports advanced filtering:
gameModeFilter by game mode: PvP, PvE, or PvPvEmapFilter by map name (e.g., TheIsland, Ragnarok)regionFilter by server regiontagsFilter by comma-separated tagsonlineOnlyShow only online servers (true/false)justWipedShow recently wiped servers (true/false)minMultiplierMinimum XP/Taming/Harvest multipliermaxMultiplierMaximum XP/Taming/Harvest multipliersortBySort field: totalVotes, monthlyVotes, currentPlayers, createdAtsortOrderSort direction: asc or desc