Clan Lookup API
A free API to check if a user is in a public clan. API key is required for search endpoints.
API Endpoints
| Endpoint | Description |
|---|---|
| GET /api/members/search | Search for a user by username, display name, or user ID |
| GET /api/clans | Get all public clans (guilds) with metadata |
GET /api/members/search
Search for a user by username, display name, or user ID. An API key is required for this endpoint.
Parameters
- apiKey (required): The same key you use for searching at the home page.
- text (required): Username, display name, or user ID to search for.
Example Request
GET https://clan.ctsfd.com/api/members/search?apiKey=your_api_key&text=example Example Response
{
"found": true,
"matches": [
{
"member": {
"user": {
"id": "123456789012345678",
"username": "sampleuser",
"discriminator": "1234",
"tag": "sampleuser#1234",
"avatar": "sampleavatarhash",
"avatarURL": "https://cdn.discordapp.com/avatars/123456789012345678/sampleavatarhash.webp",
"bot": false,
"system": false,
"bannerURL": null,
"flags": 0,
"createdAt": "2020-01-01T00:00:00.000Z",
"createdTimestamp": 1577836800000
},
"member": {
"nickname": "SampleNick",
"displayName": "SampleDisplay",
"joinedAt": "2022-01-01T12:00:00.000Z",
"joinedTimestamp": 1641038400000,
"premiumSince": null,
"premiumSinceTimestamp": null,
"roles": [
{
"id": "111111111111111111",
"name": "Sample Role",
"color": 1234567,
"hoist": true,
"position": 10
},
{
"id": "222222222222222222",
"name": "@everyone",
"color": 0,
"hoist": false,
"position": 0
}
],
"permissions": [
"SEND_MESSAGES",
"VIEW_CHANNEL"
],
"communicationDisabledUntil": null,
"communicationDisabledUntilTimestamp": null,
"pending": false,
"deaf": null,
"mute": null,
"selfDeaf": null,
"selfMute": null
}
},
"guild": "Sample Guild",
"iconURL": "https://cdn.discordapp.com/icons/123456789012345678/sampleguildicon.webp"
}
]
}
Error Response
"error": "User not found"
GET /api/clans
Get all public clans (guilds) with their metadata and icon URLs.
Example Request
curl https://clan.ctsfd.com/api/clans
Example Response
{
"clans": [
{
"name": "Sample Guild",
"guildId": "123456789012345678",
"iconURL": "https://cdn.discordapp.com/icons/123456789012345678/sampleguildicon.webp",
"memberCount": 42
},
{
"name": "Another Guild",
"guildId": "987654321098765432",
"iconURL": null,
"memberCount": 17
}
]
}