uCord Public API
Build integrations with Discord server listing data. List servers, search by name or description, get categories, and fetch individual server details programmatically.
curl -H "X-API-Key: YOUR_KEY" "https://ucord.cc/api/v1/servers?page=1&limit=20"
Replace YOUR_KEY with your API key. Create one in your Dashboard → API (or Admin → API Keys if you have admin access).
All endpoints
All endpoints require API key authentication. Base URL: https://ucord.cc/api/v1
| Method | Endpoint | Description |
|---|---|---|
GET | /api/v1/servers | Paginated list of discoverable servers. Query: page, limit, category, sort, order. |
GET | /api/v1/server/:identifier | Single server by guild ID or vanity code. |
GET | /api/v1/categories | All categories with server counts (cached 1h). |
GET | /api/v1/servers/search | Full-text search. Query: q (required), page, limit, category. |
Authentication
All requests to /api/v1/* require an API key. Keys use the format ucordAPI_ + 32 hex characters.
Supported methods
- Header (recommended):
X-API-Key: ucordAPI_your_key_here - Bearer:
Authorization: Bearer ucordAPI_your_key_here - Query (fallback):
?api-key=ucordAPI_your_key_here
Never expose API keys in client-side code or public repositories. Use headers in server-side requests.
Response format
All responses use a standard JSON envelope:
{
"success": true,
"data": { ... } | [ ... ],
"meta": { "page": 1, "limit": 20, "total": 150, "totalPages": 8 }
}
Paginated endpoints include meta. Errors use success: false and an error object with code and message.
Try it now
Response will appear here.
Response will appear here.
Response will appear here.
Response will appear here.
Endpoint reference
GET /api/v1/servers
Returns a paginated list of discoverable servers. Results can be filtered by category and sorted by rank, name, date, or rating.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
page | integer | No | 1 | Page number (1-based) |
limit | integer | No | 20 | Items per page (max 100) |
category | string | No | — | Filter by category (e.g. Gaming, Community, Creative) |
sort | string | No | rankScore | Sort field: rankScore, name, createdAt, averageRating |
order | string | No | desc | Sort order: asc or desc |
Example request
curl -H "X-API-Key: YOUR_KEY" "https://ucord.cc/api/v1/servers?page=1&limit=20&sort=rankScore&order=desc&category=Gaming"
Example response (200 OK)
{
"success": true,
"data": [
{
"id": "123456789",
"name": "Gaming Community",
"description": "A fun gaming server...",
"category": "Gaming",
"tags": ["FPS", "Competitive"],
"memberCount": 5000,
"averageRating": 4.5,
"totalReviews": 42,
"vanityCode": "gaming-hub",
"inviteUrl": "https://discord.gg/abc123",
"iconUrl": "https://cdn.discordapp.com/icons/...",
"bannerUrl": null,
"createdAt": "2024-01-15T10:30:00.000Z"
}
],
"meta": { "page": 1, "limit": 20, "total": 150, "totalPages": 8 }
}
GET /api/v1/server/:identifier
Returns a single server by guild ID or vanity code.
| Parameter | Type | Required | Description |
|---|---|---|---|
identifier | string (path) | Yes | Discord guild ID (17–19 digits) or vanity code (e.g. ucord) |
Example by vanity
curl -H "X-API-Key: YOUR_KEY" "https://ucord.cc/api/v1/server/ucord"
Example by guild ID
curl -H "X-API-Key: YOUR_KEY" "https://ucord.cc/api/v1/server/123456789012345678"
Error response (404 Not Found)
{
"success": false,
"error": {
"code": "SERVER_NOT_FOUND",
"message": "Server not found or not discoverable."
}
}
GET /api/v1/categories
Returns all available categories with server counts. Cached for 1 hour.
Example request
curl -H "X-API-Key: YOUR_KEY" "https://ucord.cc/api/v1/categories"
Example response
{
"success": true,
"data": [
{ "name": "Gaming", "count": 45, "description": "Gaming communities" },
{ "name": "Community", "count": 32, "description": "Community communities" }
]
}
GET /api/v1/servers/search
Full-text search across server names, descriptions, tags, guild ID, vanity code, and owner. Includes NSFW servers by default; use ?nsfw=false to exclude.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
q | string | Yes | — | Search query |
page | integer | No | 1 | Page number |
limit | integer | No | 10 | Items per page (max 50) |
category | string | No | — | Filter by category |
nsfw | boolean | No | true | Include NSFW servers; use false to exclude |
Example
curl -H "X-API-Key: YOUR_KEY" "https://ucord.cc/api/v1/servers/search?q=gaming&limit=10&nsfw=false"
Server object
Each server in responses includes these fields:
| Field | Type | Description |
|---|---|---|
id | string | Discord guild ID |
name | string | Server name |
description | string | Short description |
category | string | Category (Gaming, Community, etc.) |
tags | array | List of tags |
memberCount | number | Member count |
averageRating | number | null | Average rating |
totalReviews | number | Number of reviews |
totalClicks | number | Only present when your key’s user has Manage Server for that guild |
vanityCode | string | null | Vanity URL slug |
inviteUrl | string | null | Discord invite URL |
iconUrl | string | null | Server icon URL |
bannerUrl | string | null | Banner URL (currently null) |
createdAt | string | null | ISO 8601 date when first listed |
Error reference
| Status | Code | When |
|---|---|---|
| 400 | BAD_REQUEST | Invalid parameters (e.g. missing required query, invalid format) |
| 401 | UNAUTHORIZED | Missing API key |
| 403 | FORBIDDEN | Invalid, revoked, or expired key; invalid format |
| 404 | SERVER_NOT_FOUND | Server not found or not discoverable |
| 429 | RATE_LIMIT_EXCEEDED | Too many requests; use Retry-After header |
| 500 | INTERNAL_ERROR | Server error |
Example error JSON (all errors follow this shape):
{
"success": false,
"error": {
"code": "UNAUTHORIZED",
"message": "Missing API key. Provide X-API-Key header, Authorization: Bearer , or api-key query parameter."
}
}
Rate limiting
Per key, per endpoint limits:
- 100 req/min for
/servers,/server/:identifier,/categories - 30 req/min for
/servers/search
All responses include rate limit headers:
X-RateLimit-Limit— Max requests per windowX-RateLimit-Remaining— Remaining requestsX-RateLimit-Reset— Unix timestamp when the window resets
On 429, use the Retry-After header (seconds). Implement exponential backoff and cache responses on the client where appropriate.
Code examples
JavaScript (Fetch)
const res = await fetch('https://ucord.cc/api/v1/servers?page=1&limit=20', {
headers: { 'X-API-Key': 'YOUR_KEY' }
});
const data = await res.json();
if (data.success) console.log(data.data);
else console.error(data.error);
Node.js (Axios)
const axios = require('axios');
const res = await axios.get('https://ucord.cc/api/v1/servers', {
headers: { 'X-API-Key': 'YOUR_KEY' },
params: { page: 1, limit: 20 }
});
console.log(res.data.data);
Python (requests)
import requests
r = requests.get('https://ucord.cc/api/v1/servers', headers={'X-API-Key': 'YOUR_KEY'}, params={'page': 1, 'limit': 20})
data = r.json()
print(data['data'] if data.get('success') else data.get('error'))
cURL
curl -H "X-API-Key: YOUR_KEY" "https://ucord.cc/api/v1/servers?page=1&limit=20"
PHP
$ch = curl_init('https://ucord.cc/api/v1/servers?page=1&limit=20');
curl_setopt_array($ch, [
CURLOPT_HTTPHEADER => ['X-API-Key: YOUR_KEY'],
CURLOPT_RETURNTRANSFER => true
]);
$response = curl_exec($ch);
$data = json_decode($response, true);
print_r($data['data'] ?? $data['error']);
Permission-scoped data
The totalClicks field (and other analytics) is only returned when your API key belongs to a user who has Manage Server permission for that Discord server. Otherwise it is omitted. This prevents partners from seeing other servers’ analytics.
Changelog
v1 (initial) — Servers list, single server, categories, full-text search. API key auth, per-key rate limits, permission-scoped analytics, CORS enabled.