> **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/invites-code>
- **Markdown (.mdx) URL:** <https://www.socialfetch.dev/platforms/discord/invites-code.mdx>

---

# Discord Invite API

One invite code in, the server behind it out, with live member and online counts.

`GET /v1/discord/invites/{code}` takes the code from a `discord.gg` link. Vanity codes are case-insensitive, so `python` and `PYTHON` return the same invite; temporary codes are case-sensitive. On `found`, `data.invite` carries the `code`, `type`, `expiresAt` and the landing `channel`, and `data.server` carries the server with its name, description, icon and banner URLs, `members`, `online`, `countsAsOf`, `boosts`, `vanityCode`, `tag`, `tagBadge`, `traits`, `games`, `features`, categories and creation date.

Because the invite answer is live, `countsAsOf` is `live` here, not `index`. An unknown or expired code returns `lookupStatus: not_found` with `reason: unknown_or_expired`; the response uses the same reason for both.

## Request

- **Endpoint:** `GET /v1/discord/invites/{code}`
- **Credits:** 1 credit
Failed requests are free
- **Input:** by invite code
- **Full reference:** [docs](https://www.socialfetch.dev/docs/api/v1/discord/invites/code/get)
- **Platform page:** [/platforms/discord](https://www.socialfetch.dev/platforms/discord)

## FAQ

### Are invite codes case-sensitive?

Vanity codes are case-insensitive, so python and PYTHON return the same invite. Temporary codes are case-sensitive. The response returns the canonical code Discord answered with.

### Are the member and online counts live?

Yes. countsAsOf is live on an invite response. Directory rows and server pages use indexed counts, so the same server can show a slightly different number there.

### What happens for an unknown or expired invite?

You get HTTP 200 with lookupStatus not_found and reason unknown_or_expired. The response uses the same reason for a code that never existed and one that expired.

### How many credits does an invite lookup cost?

Pricing is documented on the operation in the API registry (shown on this page). Confirm on every response with meta.creditsCharged: that field is the billing source of truth.
