Getting Started

Welcome to the Between Worlds API documentation! This API provides read-only access to game data, user information, and leaderboards.

Base URL

All API endpoints are prefixed with:

https://api.betweenworlds.net/v2

Authentication

All API requests require an HTTP header:

  • X-API-Key: Your API key

This header must be included in every request to the API.

Example Request

curl -H "X-API-Key: YOUR_API_KEY" \
     https://api.betweenworlds.net/v2/items

Rate Limiting

API requests are rate-limited to 100 requests per 15 minutes per IP address.

Response Format

All responses are in JSON format. Successful responses return the requested data, while errors return an appropriate HTTP status code and message.

Success Response

{
  "name": "Basic Sword",
  "description": "A simple sword",
  "value": 100
}

Error Response

400 Bad Request

Available Endpoints

The API provides the following endpoints:

  • Users - /v2/users - Access user profiles and statistics
  • Items - /v2/items - Retrieve item data
  • Skills - /v2/skills - Get skill information
  • NPCs - /v2/npcs - Access NPC data
  • Leaderboards - /v2/leaderboards - View game leaderboards

Quick Example

Here's a complete example of fetching all items:

const apiKey = 'YOUR_API_KEY';

fetch('https://api.betweenworlds.net/v2/items', {
  headers: {
    'X-API-Key': apiKey,
  },
})
  .then((response) => response.json())
  .then((data) => console.log(data))
  .catch((error) => console.error('Error:', error));

Next Steps