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.
Try our interactive API explorer
You can test our API endpoints directly from your browser and get real-time data!
Getting started#
Base URL
https://rank.top/apiAll 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/detailsMost 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_hereWebhook authentication
Webhooks use a custom authorization token for security
Authorization: your_webhook_tokenPublic endpoints
Some read-only endpoints are publicly accessible
No authentication requiredGetting 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#
Each endpoint opens in the explorer, where you can send a real request.
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.
Try bots endpoints in the explorer4 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.
Try servers endpoints in the explorer2 endpoints available
Users
User profiles, authentication, and account management
Try users endpoints in the explorer1 endpoint available
Response examples#
Common HTTP status codes
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.
Rate limit headers
All responses include rate limit headers:X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset.Error handling#
All errors follow a consistent format with descriptive messages and appropriate HTTP status codes.
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 and libraries#
JavaScript/Node.js
Coming soonOfficial JavaScript SDK for easy integration with Node.js applications and Discord bots.
Python
Coming soonPython wrapper for discord.py and other Python Discord libraries.
C# / .NET
Coming soon.NET library for Discord.Net and DSharpPlus applications.