REST API v1

API Reference

Integrate Rank.top features into your applications with our comprehensive REST API. Manage bot listings, track analytics, handle votes, and build powerful Discord integrations.

7
API Endpoints
REST
Architecture
JSON
Data Format
24/7
Availability

Try Our Interactive API Explorer

Test endpoints directly from your browser

No setup required! Test our API endpoints with real data, see live responses, and generate code examples. Perfect for exploring our API before integration.

Getting Started

Base URL

https://rank.top/api

All API requests should be made to this base URL. HTTPS is required for all requests.

Quick Example

curl -H "Authorization: Bearer YOUR_API_KEY"
https://rank.top/api/bots/123456789/details

Most endpoints require authentication. Get your API key from your dashboard.

Authentication

API Key Authentication

Most endpoints require an API key in the Authorization header

Authorization: Bearer your_api_key_here

Webhook Authentication

Webhooks use a custom authorization token for security

Authorization: your_webhook_token

Public Endpoints

Some read-only endpoints are publicly accessible

No authentication required

Getting Your API Key

You can generate and manage your API keys from your dashboard. Keep your API keys secure and never share them publicly.

API Endpoints

Bots

Manage Discord bot listings, stats, and configurations

GET/bots/{id}/detailsRetrieve detailed information about a specific Discord bot.
GET/bots/{id}/statsGet current statistics and analytics for a bot.
POST/bots/{id}/postUpdate your bot's server count, user count, and other statistics.
GET/bots/searchSearch for Discord bots with advanced filtering and sorting options.
View Bots Documentation4 endpoints available

Servers

Manage Discord server listings and community features

GET/servers/{id}/detailsRetrieve detailed information about a Discord server.
GET/servers/searchSearch for Discord servers with advanced filtering and sorting options.
View Servers Documentation2 endpoints available

Users

User profiles, authentication, and account management

GET/users/{id}/getRetrieve public profile information for a user.
View Users Documentation1 endpoints available

Analytics

Vote tracking, page views, and performance metrics

View Analytics Documentation0 endpoints available

Campaigns

Advertising campaigns and promotions

View Campaigns Documentation0 endpoints available

Utility

Image processing, backgrounds, and miscellaneous features

View Utility Documentation0 endpoints available

Response Examples

Bot Details Response

{
  "id": "123456789012345678",
  "name": "Example Bot",
  "avatar": "https://cdn.discordapp.com/avatars/...",
  "short_desc": "A powerful Discord bot for your server",
  "long_desc": "Detailed description with markdown support...",
  "invite": "https://discord.com/oauth2/authorize?...",
  "categories": [1, 5, 8],
  "prefix": ["!", "?"],
  "verified": true,
  "nsfw": false,
  "server_count": 1500,
  "user_count": 45000,
  "votes": 2840,
  "votestotal": 15632,
  "owner": "987654321098765432",
  "support_server": "https://discord.gg/example"
}

Stats Update Response

{
  "server_count": 1500,
  "user_count": 45000,
  "ping": 45,
  "memory": 256,
  "commands": [
    {
      "id": "1234567890",
      "name": "help",
      "description": "Show help information",
      "options": []
    }
  ],
  "last_update": "2024-01-15T10:30:00Z"
}

Error Response

{
  "error": "Bot not found",
  "code": "BOT_NOT_FOUND",
  "status": 404
}

Common HTTP Status Codes

200 OKRequest successful
400 Bad RequestInvalid request data
401 UnauthorizedInvalid or missing API key
404 Not FoundResource not found
429 Too Many RequestsRate limit exceeded

Rate Limits

Our API implements rate limiting to ensure fair usage and maintain service quality. Rate limits are applied per API key and reset every minute.

General Endpoints60/min

Most GET and POST operations

Search Operations30/min

Search bots, servers, and users

Stats Updates12/hour

Bot statistics posting

Vote Operations10/min

Voting and vote history

Authentication5/min

API key generation and validation

Public Endpoints120/min

Public data without auth

Rate Limit Headers

All responses include rate limit headers: X-RateLimit-Limit,X-RateLimit-Remaining, andX-RateLimit-Reset.

Error Handling

All errors follow a consistent format with descriptive messages and appropriate HTTP status codes.

Error Response Format

{
  "error": "Error description",
  "code": "ERROR_CODE",
  "status": 400,
  "details": {
    "field": "Additional context"
  }
}

Common Error Codes

INVALID_API_KEY
The provided API key is invalid or expired
BOT_NOT_FOUND
The specified bot ID does not exist
RATE_LIMIT_EXCEEDED
Too many requests, please slow down
VALIDATION_ERROR
Request data failed validation

SDKs & Libraries

JS

JavaScript/Node.js

Coming Soon

Official JavaScript SDK for easy integration with Node.js applications and Discord bots.

PY

Python

Coming Soon

Python wrapper for discord.py and other Python Discord libraries.

C#

C# / .NET

Coming Soon

.NET library for Discord.Net and DSharpPlus applications.

Support & Community

Need Help?

Our developer community and support team are here to help you integrate with Rank.top.