Public APIs
Lanyard favicon

Lanyard

Social

Retrieve your presence on Discord through an HTTP REST API or WebSocket.

Lanyard's website screenshot

About Lanyard

Lanyard is a service that exposes a user's live Discord presence and activity data through a RESTful API and WebSocket. Once a user joins the associated Discord server, their presence becomes available at an API endpoint keyed to their Discord user ID, returning data such as online status, current activities, and Spotify listening information (track, artist, album, timestamps).

The service also functions as a globally accessible realtime key-value store, which can be updated via the Lanyard Discord bot or the Lanyard API. Users can consume the hosted API without deploying anything themselves, or self-host it using the provided Docker setup, which requires some configuration.

Lanyard is aimed at developers who want to display Discord presence or activity data on personal websites, GitHub profiles, or other applications. A community ecosystem of wrapper libraries and integrations exists for multiple languages and frameworks, including React, Vue, Svelte, Go, Python, Dart, and Deno, along with tools such as a GraphQL port and an MCP server.

Key features

  • Exposes live Discord presence and activity data via a REST API endpoint
  • Provides a WebSocket for real-time presence updates
  • Acts as a globally-accessible realtime key-value (KV) store
  • KV store updatable via the Lanyard Discord bot or the Lanyard API
  • No self-hosting required to use the API, but Docker self-hosting is supported
  • Supports subscribing to a single user, multiple users, or every user's presence over the socket

Frequently asked questions

Is Lanyard free to use?

Yes, you can use Lanyard's hosted API for free by joining the Lanyard Discord server, with no deployment required.

Can I self-host Lanyard?

Yes, Lanyard can be self-hosted with Docker if you want to run your own instance instead of using the hosted API.

What languages and frameworks have Lanyard integrations?

Community libraries exist for React, Vue, Svelte, Go, Python, Dart, and Deno, among others.

Who is Lanyard for?

It is aimed at developers who want to display their live Discord presence, such as Spotify listening activity, on personal websites or apps.

How do I get a user's presence data?

Send a GET request to api.lanyard.rest/v1/users/:user_id to receive a JSON response with Discord status, activities, and KV data.

Advertise here

Featured products

  • SerpApi - Search API favicon
  • Screenshot Scout favicon
  • TalorData favicon
  • CoreClaw favicon

Show your product to thousands of developers

· 100k monthly pageviews
· 7k newsletter subscribers

Advertise your product