Overview
Lanyard is a free, open-source API that exposes your real-time Discord presence such as what you are playing or listening to via a simple REST API or WebSocket. No API key is required — you just need to join the Lanyard Discord server and the API automatically tracks your status. It is a popular choice for adding live Discord status to personal portfolio websites.
Beginner Tip
To use Lanyard, join the official Lanyard Discord server at discord.gg/lanyard and your Discord presence will automatically be tracked. Then fetch your status by replacing the user ID in the URL with your own Discord user ID.
Available Data
The kind of data this API exposes, based on its documentation. We could not call the endpoint to confirm the exact field names.
Example Response
Illustrative shape only — we were not able to call this endpoint (it requires credentials or exposes no public sample URL), so the fields below show the kind of data this API returns rather than a recorded response.
{
"status": "success",
"data": {
"result": "Data from Lanyard",
"description": "Retrieve your presence on Discord through an HTTP REST API or WebSocket",
"timestamp": "2025-01-15T10:00:00Z"
}
} Field Reference
data.discord_status User current Discord status: online, idle, dnd (do not disturb), or offline data.discord_user.username The Discord username of the tracked user data.activities List of current activities including games, Spotify, and custom statuses data.listening_to_spotify True if the user is currently listening to Spotify data.spotify Current Spotify track details including song, artist, album, and album art URL data.active_on_discord_desktop True if the user is currently active on a desktop Discord client Implementation Example
Calls a real endpoint of this API. Replace any placeholder credentials with your own key.
const url = "https://api.lanyard.rest/v1/users/794103463082729472";
const response = await fetch(url);
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data); What Can You Build?
Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.
Common Errors & Troubleshooting
Generated guidance based on this API's documentation, not observed by us. Treat it as a starting point and check against the provider's own error reference.
Metadata Score Breakdown
Estimated from metadata — endpoint not independently tested
Metadata estimate · endpoint not independently tested
Technical Specifications
Related Tags
Similar APIs
View All →4chan
⭐ Beginner's PickThe 4chan API provides read-only, public access to boards, threads, and posts on 4chan with no authentication required.
Fuck Off as a Service
⭐ Beginner's PickFuck Off as a Service (FOAAS) is a humorous REST API that returns creative dismissal messages in various formats.
HackerNews
⭐ Beginner's PickThe Hacker News API gives you free, real-time access to the stories, comments, jobs, and polls from the popular tech news community.
Ayrshare
⭐ Beginner's PickAyrshare is a social media API platform that lets you publish posts, retrieve analytics, and manage multiple social media accounts across platforms like Twitter, Instagram, Facebook, and LinkedIn from a single API.
Hashnode
⭐ Beginner's PickHashnode is a developer blogging platform whose public GraphQL API lets you query posts, publications, and author profiles without any authentication.