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.

Quick start
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

MethodEndpointDescription
GET/api/v1/serversPaginated list of discoverable servers. Query: page, limit, category, sort, order.
GET/api/v1/server/:identifierSingle server by guild ID or vanity code.
GET/api/v1/categoriesAll categories with server counts (cached 1h).
GET/api/v1/servers/searchFull-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

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

GET /api/v1/servers
Response will appear here.
GET /api/v1/server/:identifier
Response will appear here.
GET /api/v1/categories
Response will appear here.
GET /api/v1/servers/search

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.

ParameterTypeRequiredDefaultDescription
pageintegerNo1Page number (1-based)
limitintegerNo20Items per page (max 100)
categorystringNoFilter by category (e.g. Gaming, Community, Creative)
sortstringNorankScoreSort field: rankScore, name, createdAt, averageRating
orderstringNodescSort 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.

ParameterTypeRequiredDescription
identifierstring (path)YesDiscord 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.

ParameterTypeRequiredDefaultDescription
qstringYesSearch query
pageintegerNo1Page number
limitintegerNo10Items per page (max 50)
categorystringNoFilter by category
nsfwbooleanNotrueInclude 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:

FieldTypeDescription
idstringDiscord guild ID
namestringServer name
descriptionstringShort description
categorystringCategory (Gaming, Community, etc.)
tagsarrayList of tags
memberCountnumberMember count
averageRatingnumber | nullAverage rating
totalReviewsnumberNumber of reviews
totalClicksnumberOnly present when your key’s user has Manage Server for that guild
vanityCodestring | nullVanity URL slug
inviteUrlstring | nullDiscord invite URL
iconUrlstring | nullServer icon URL
bannerUrlstring | nullBanner URL (currently null)
createdAtstring | nullISO 8601 date when first listed

Error reference

StatusCodeWhen
400BAD_REQUESTInvalid parameters (e.g. missing required query, invalid format)
401UNAUTHORIZEDMissing API key
403FORBIDDENInvalid, revoked, or expired key; invalid format
404SERVER_NOT_FOUNDServer not found or not discoverable
429RATE_LIMIT_EXCEEDEDToo many requests; use Retry-After header
500INTERNAL_ERRORServer 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:

All responses include rate limit headers:

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.