> **For coding agents and LLMs:** This is one Social Fetch marketing page (markdown export). For API orientation start with [`/llms.txt`](https://www.socialfetch.dev/llms.txt); for auth and crawl rules use [`/agents.txt`](https://www.socialfetch.dev/agents.txt); for every operation use [`/llms-endpoints.txt`](https://www.socialfetch.dev/llms-endpoints.txt).

## This page

- **On-site (HTML):** <https://www.socialfetch.dev/platforms/discord>
- **Markdown (.mdx) URL:** <https://www.socialfetch.dev/platforms/discord.mdx>

---

# Discord API. Servers, games and apps as JSON.

Invites, public server pages, directory search, trending games, applications, templates, widgets and announcements. One envelope, typed lookup status, cursor paging.

- 17 routes
- Typed lookupStatus
- 1 credit per request

Social Fetch exposes seventeen routes under `/v1/discord`. They cover an invite and the server behind it, a server's public directory page or subscription store page, directory browse and search, server, game and announcement indexes, a server's public widget, weekly trending games, a game page, application records with the app directory's similar and curated lists, guild templates, and public announcement channels and posts.

Every response uses the `{ data, meta }` envelope with `data.lookupStatus`. A missing invite, server, game, application, template, channel or post comes back as a typed `not_found`, and a widget its owner has switched off comes back as `restricted`, so you branch on a field instead of parsing error pages. Lists page with an opaque `page.nextCursor`.

The routes report their real depth. Directory browse stops at 3,000 rows, server search stops at six pages, the server index returns 500 ids and slugs a page up to 200 pages, and the similar-applications route pages with `page` and a cursor. Announcement channels return their latest public posts with `truncated: true` because older posts are not available.

## What you can get

- Resolve an invite code to the server behind it, with live `members` and `online` counts, boosts, vanity code, tag and games.
- Read a public server page by id, including its directory details, categories, keywords, reasons to join, social links, about text and announcement channels, or its subscription store tiers.
- Browse the server directory by category or search it by relevance, both cursor-paged.
- Enumerate server ids and slugs from the public directory list when browse depth is not enough, and game and application ids from their own catalogues.
- List the ten weekly trending games and the published week list, read a game page, and get application records, paged similar applications and curated app collections.
- Read guild templates with their serialized roles and channels, and public announcement channels and single posts.

## Discord endpoints

| Endpoint | Request | Credits | Docs |
| --- | --- | --- | --- |
| Invite | GET /v1/discord/invites/{code} | 1 credit Failed requests are free | [docs](https://www.socialfetch.dev/docs/api/v1/discord/invites/code/get) |
| Server | GET /v1/discord/servers/{serverId} | 1 credit Failed requests are free | [docs](https://www.socialfetch.dev/docs/api/v1/discord/servers/serverid/get) |
| Servers | GET /v1/discord/servers | 1 credit Failed requests are free | [docs](https://www.socialfetch.dev/docs/api/v1/discord/servers/get) |
| Server search | GET /v1/discord/servers/search | 1 credit Failed requests are free | [docs](https://www.socialfetch.dev/docs/api/v1/discord/servers/search/get) |
| Server widget | GET /v1/discord/servers/{serverId}/widget | 1 credit Failed requests are free | [docs](https://www.socialfetch.dev/docs/api/v1/discord/servers/serverid/widget/get) |
| Server index | GET /v1/discord/servers/index | 1 credit Failed requests are free | [docs](https://www.socialfetch.dev/docs/api/v1/discord/servers/index/get) |
| Game index | GET /v1/discord/games/index | 1 credit Failed requests are free | [docs](https://www.socialfetch.dev/docs/api/v1/discord/games/index/get) |
| Trending games | GET /v1/discord/games/trending | 1 credit Failed requests are free | [docs](https://www.socialfetch.dev/docs/api/v1/discord/games/trending/get) |
| Game | GET /v1/discord/games/{applicationId} | 1 credit Failed requests are free | [docs](https://www.socialfetch.dev/docs/api/v1/discord/games/applicationid/get) |
| Application | GET /v1/discord/applications/{applicationId} | 1 credit Failed requests are free | [docs](https://www.socialfetch.dev/docs/api/v1/discord/applications/applicationid/get) |
| Similar applications | GET /v1/discord/applications/{applicationId}/similar | 1 credit Failed requests are free | [docs](https://www.socialfetch.dev/docs/api/v1/discord/applications/applicationid/similar/get) |
| Application index | GET /v1/discord/applications/index | 1 credit Failed requests are free | [docs](https://www.socialfetch.dev/docs/api/v1/discord/applications/index/get) |
| Application collections | GET /v1/discord/applications/collections | 1 credit Failed requests are free | [docs](https://www.socialfetch.dev/docs/api/v1/discord/applications/collections/get) |
| Template | GET /v1/discord/templates/{code} | 1 credit Failed requests are free | [docs](https://www.socialfetch.dev/docs/api/v1/discord/templates/code/get) |
| Announcement channel | GET /v1/discord/announcement-channels/{channelId} | 1 credit Failed requests are free | [docs](https://www.socialfetch.dev/docs/api/v1/discord/announcement-channels/channelid/get) |
| Announcement index | GET /v1/discord/announcements/index | 1 credit Failed requests are free | [docs](https://www.socialfetch.dev/docs/api/v1/discord/announcements/index/get) |
| Announcement | GET /v1/discord/announcement-channels/{channelId}/posts/{messageId} | 1 credit Failed requests are free | [docs](https://www.socialfetch.dev/docs/api/v1/discord/announcement-channels/channelid/posts/messageid/get) |

## How to start

1. **Create an API key.** Sign up at Social Fetch and copy a key (`sfk_...`). New accounts get 100 free credits, enough to try every Discord route.
2. **Pick a route and start with an id.** Use a real invite code or server id, for example `GET /v1/discord/invites/python` or `GET /v1/discord/servers/267624335836053506`. Send `x-api-key` on every request.
3. **Branch on lookupStatus, then page.** Check `data.lookupStatus` before you store a row. For a list, keep sending the returned `page.nextCursor` while `page.hasMore` is true, and bill from `meta.creditsCharged`.

## Pricing

Each Discord route charges 1 credit per completed request, shown on every endpoint page. Each page of a list is its own request. Credits never expire on pay-as-you-go packs, and `meta.creditsCharged` on every response is the billing source of truth.

## Compared with the official API

Public server, directory, app and announcement data comes in different shapes, each with its own fields and paging rules. Social Fetch returns one JSON envelope and one pagination contract across all seventeen routes: typed `lookupStatus` values, `page.nextCursor`, stable field names, and one credit per request. That makes it practical to join a server page, its widget, its games and its applications in one pipeline.

## FAQ

### Is there a Discord API for public server data?

Yes. Social Fetch has seventeen routes under /v1/discord: invite, server page, server widget, directory browse, directory search, server index, game index, application index, announcement index, trending games, game page, application, similar applications, application collections, template, announcement channel, and announcement post. Authenticate with your Social Fetch API key in x-api-key.

### How do I look up an invite?

Call GET /v1/discord/invites/{code} with the code from a discord.gg link. Vanity codes are case-insensitive; temporary codes are case-sensitive. A found response includes the invite type, expiry, the landing channel, and the server with its live members and online counts, boosts, tag and traits.

### What does lookupStatus mean?

found means the item was returned. not_found means Discord says it does not exist, or the id has no public page. restricted means the item exists but is not public, which is the normal answer for a server widget that its owner has switched off. HTTP 200 only means the request finished, so always branch on lookupStatus.

### How deep can I page the directory and search?

Browse returns 12 servers a page and stops at the directory's 3,000-row depth, with limitReached true when the walk reaches it. The directory reorders between requests, so numbered pages can repeat servers; follow page.nextCursor to skip ones already returned. Search returns up to 12 results a page on pages 1 to 6, and limitReached is true on page 6 when more rows were reported than those pages returned. A numbered page past 6 is a 400. Follow page.nextCursor while page.hasMore is true.

### How do I enumerate every server id?

Call GET /v1/discord/servers/index. It returns 500 ids and their slugs a page, up to 200 pages, and reports generatedAt, totalIds and limitReached. Game and application ids come from GET /v1/discord/games/index and GET /v1/discord/applications/index, and announcement channel and post ids from GET /v1/discord/announcements/index.

### Why is a widget restricted?

A server owner can switch the public widget off. The widget route then returns lookupStatus restricted with that server id, not an error. The server route accepts include=widget to add the same summary, and a disabled widget is reported there as enabled false.

### Can I get every announcement from a channel?

GET /v1/discord/announcement-channels/{channelId} returns the latest public posts, newest first, with text, attachments and reactions. The page carries truncated: true because no working cursor was found, so use the single-post route with a message id when you need a specific post.

### What game and application data is available?

The trending route lists ten games for a published week, optionally by category. A game page carries genres, platforms, publishers, links, media, trailers, review scores and the official server. Application records include tags, verification, the install link, slug, subscription SKU, the bot user with its banner, and, when the app is in the directory, its categories, install count and support server.

### How do I page similar applications?

Add page, or follow page.nextCursor while page.hasMore is true. The response also reports numPages, so you can see how many pages Discord reports. Use the collections route for curated groups of applications.

### Can I use the Discord routes from agents or MCP?

Yes. Every Discord route is a typed MCP tool and is reachable through Ask (POST /v1/ask) in plain English. Use the typed routes for production jobs.

## Related

- [Discord Invite API](https://www.socialfetch.dev/platforms/discord/invites-code): Live member counts and the server behind an invite (`GET /v1/discord/invites/{code}`).
- [Discord Server API](https://www.socialfetch.dev/platforms/discord/servers-serverid): A public server page or subscription store page (`GET /v1/discord/servers/{serverId}`).
- [Discord Server Search API](https://www.socialfetch.dev/platforms/discord/servers-search): Search the public server directory by relevance (`GET /v1/discord/servers/search`).
- [Discord Trending Games API](https://www.socialfetch.dev/platforms/discord/games-trending): The ten trending games for a published week (`GET /v1/discord/games/trending`).
- [Ask in plain English](https://www.socialfetch.dev/ask): Route a natural-language Discord question to the matching operation.
- [Hosted MCP](https://www.socialfetch.dev/mcp): Call Discord tools from Cursor or Claude with the same credit metering as REST.
