Getting Started with the Xbox Live API
Everything you need to know to make your first API call and fetch player profiles.
Building an app that integrates with Xbox Live? You're in the right place. This guide walks through the basics of authenticating and making your first API calls to fetch player data.
Getting Your API Key
First things first: you need an API key. Sign up at xbl.io, verify your phone number, and grab your key from the dashboard. The free tier gives you 150 requests per hour, which is plenty for development and testing.
Your First Request
The simplest call you can make is fetching your own profile. Here's how it looks with curl:
curl -X GET "https://xbl.io/api/v2/account" \
-H "X-Authorization: YOUR_API_KEY"This returns your gamertag, XUID (Xbox User ID), gamerscore, and profile picture URL. The XUID is what you'll use for most other endpoints.
Looking Up Other Players
Want to fetch someone else's profile? Use the gamertag lookup endpoint:
curl -X GET "https://xbl.io/api/v2/friends/search?gt=SomeGamertag" \
-H "X-Authorization: YOUR_API_KEY"This gives you their XUID, which you can then use to fetch their achievements, game clips, or activity feed.
Handling Rate Limits
The API returns rate limit info in response headers. Keep an eye on X-RateLimit-Remaining. If you hit the limit, you'll get a 429 response. Just back off and retry after the reset window.
For production apps with higher traffic, check out our paid plans starting at $5/month for 500 requests per hour.
What's Next?
Now that you've got the basics down, explore specific endpoints for achievements, friends lists, game clips, or real-time activity. Each has its own quirks, which we cover in dedicated guides.