IMPORTANT: Active updates are ending! For more information, please visit our Discord server.

Skip to main content

Getting Started

Last updated March 12, 2026

Learn how to use the Krx.gg Public API safely and consistently. Note: The public API is still in active development. Additional endpoints and capabilities will be added soon.

Overview

The Krx.gg Public API provides read-only endpoints for public integrations. Use it to query product metadata such as the current version without requiring authentication.

Base URL

All API requests are made to:

1https://krx.gg/api/v1

Authentication

The public API endpoints do not require authentication. However, they are rate-limited to ensure fair usage.

Rate Limiting

To ensure quality of service, the public API enforces rate limits:

  • Limit: 4 requests per 60 seconds per IP address
  • Headers: Each response includes rate limit information in headers

Rate limit headers returned with each response:

1X-RateLimit-Limit: 5
X-RateLimit-Remaining: 4
X-RateLimit-Reset: 2026-03-01T12:34:56.789Z

If you exceed the rate limit, you'll receive a 429 Too Many Requests response:

1{
    "error": "Too Many Requests",
    "message": "Rate limit exceeded. Please try again later.",
    "retryAfter": 45
}

Request & Response Format

  • All requests must use HTTPS.
  • All responses are JSON.
  • Errors use a consistent structure:
1{
    "error": "Error Type",
    "message": "Human-readable error description"
}

Error Handling

The API uses standard HTTP status codes:

Status CodeMeaning
200Success - Request completed successfully
400Bad Request - Invalid or missing parameters
404Not Found - Product or version not found
429Too Many Requests - Rate limit exceeded
500Internal Server Error - Something went wrong on our end

Quick Start Example

Here is a minimal JavaScript template for calling public endpoints:

1async function callPublicApi(path) {
    try {
        const response = await fetch(`https://krx.gg/api/public/${path}`);

        const remaining = response.headers.get("X-RateLimit-Remaining") ?? "?";
        console.log(`Requests remaining: ${remaining}`);

        if (!response.ok) {
            const error = await response.json();
            throw new Error(error.message);
        }

        return await response.json();
    } catch (error) {
        console.error("API call failed:", error.message);
        return null;
    }
}

// Example usage
const result = await callPublicApi("products/reflex/version");
console.log(result);

Best Practices

  1. Respect Rate Limits: Monitor the rate limit headers and implement backoff strategies
  2. Cache Responses: Cache responses to reduce API calls
  3. Handle Errors Gracefully: Always implement proper error handling
  4. Use Stable Identifiers: Prefer slugs over display names where available
  5. Check Headers: Use rate limit headers for retry and backoff logic

Have questions? Reach out to us on Discord.

Contents