Using the API coudn't be simpler. The difference with our new API is that it requires Xbox LIVE authentication to get the data using your Xbox account. This means YOUR friends that have their privacy settings set to friends only can be seen by the API. It also means that we can get your exact data from the API.
Documentation
Authentication
To connect to the API we need an Authentication header. This is sent as X-AUTH
An example of this is below. Note that if you're logged in we will display your API Key. This means you can copy it straight into your terminal
curl -s -H "X-AUTH: YOUR_AUTH_KEY_HERE" https://xapi.us/v2/accountxuid
Rate Limiting
API requests are limited on a per API Key basis.
When making a request to the API, your limit information will be returned in the headers. Below is an example of this; (If your logged in while viewing this, these are your live stats.)
curl -i -H "X-AUTH: YOUR_AUTH_KEY_HERE" https://xapi.us/v2/accountxuid
HTTP/1.1 200 OK
Date: Wed, 3 March 2021 10:55:12 UTC
Cache-Control: no-cache
Access-Control-Allow-Origin: *
Content-Type: application/json
X-RateLimit-Limit: 0
X-RateLimit-Remaining: 0
X-RateLimit-Reset: 288
{"xuid":2533274813081462,"gamerTag":"djekl","gamertag":"djekl"}
Requesting data in a different language
The API has a default language of en-GB. If you wish to change this to your locale then simply send the correct language header for you using Accept-Language
.
For example, if we wanted a users games in German (de-DE
), we would send the following request.
curl -s -H "X-AUTH: YOUR_AUTH_KEY_HERE" -H "Accept-Language: de-DE" https://xapi.us/v2/2533274813081462/xboxonegames
Your current language header (sent via your browser) is en-US
.
Sending Messages (Paid Subscription Required)
The message sending has been built into the api since the very start, however due to spam I initially had this locked to a few whitelisted users. I am happy to finally document this and allow all users to find out how to send messages, as promoted on the homepage.
Note:
Abuse of the messaging endpoint of the API will result in a perminant ban of your account, and xbox live email address on this system. Any users caught sending spam messages will not be given warning before a ban.
An example of this can be done by sending the following JSON POST data.
{
"to": [
"2533274813081462"
],
"message": "This is an example message sent via X API 😃"
}
With the following headers:
X-Auth: YOUR_AUTH_KEY_HERE
Content-Type: application/json
To the following endpoint: https://xapi.us/v2/messages
This will send me (djekl) a test message.
Posting to your Activity Feed
You can now post directly to your activity feed! This is just like you would inside the Xbox Applications, or on the Dashboard.
An example of this can be done by sending the following JSON POST data.
{
"message": "This is an example message sent via X API 😃"
}
With the following headers:
X-Auth: YOUR_AUTH_KEY_HERE
Content-Type: application/json
To the following endpoint: https://xapi.us/v2/activity-feed
Pagination (continuationToken
)
Looking to get more from a request apart from the initial results? Then what you are looking for is the continuationToken
, this can be found in the response headers if its available.
An example of this can be done by looking at a users screenshots.
curl -H "X-AUTH: YOUR_AUTH_KEY_HERE" https://xapi.us/v2/2533274813081462/screenshots
You will see the following header (if the continuationToken
is available):
X-Continuation-Token: abcde_vwxyzZAAAAA2
You can then do put that into the URI to get the next set of results like so:
curl -H "X-AUTH: YOUR_AUTH_KEY_HERE" https://xapi.us/v2/2533274813081462/screenshots?continuationToken=abcde_vwxyzZAAAAA2
Available Endpoints
Below you will find a list of available endpoints with some example links too. If you're logged in you can click on them and see the response data available.
# | Endpoint | Name | Short Description |
---|---|---|---|
1 | /v2/profile | Account Profile | This is your profile information |
2 | /v2/accountXuid | Account XUID | This is your account XUID (Xbox Account User ID) |
3 | /v2/messages | Account Messages | These are your message with full preview… |
4 | /v2/conversations | Account Conversations | These are your conversations with full preview of the last message sent/recieved… |
5 | /v2/xuid/{gamertag} | Gamertag XUID | This is the XUID for a specified Gamertag (Xbox Account User ID) |
6 | /v2/gamertag/{xuid} | XUID Gamertag | This is the Gamertag for a specified XUID (Xbox Account User ID) |
7 | /v2/{xuid}/profile | Profile | This is the Profile for a specified XUID |
8 | /v2/{xuid}/new-profile | [NEW] Profile | This is the NEW Profile endpoint for a specified XUID. This gives you the new unique gamertag information etc. |
9 | /v2/{xuid}/gamercard | Gamercard | This is the Gamercard information for a specified XUID |
10 | /v2/{xuid}/presence | Presence | This is the current presence information for a specified XUID |
11 | /v2/{xuid}/activity | Activity | This is the current activity information for a specified XUID |
12 | /v2/{xuid}/activity/recent | Recent Activity | This is the recent activity information for a specified XUID |
13 | /v2/{xuid}/friends | Friends | This is the friends information for a specified XUID |
14 | /v2/{xuid}/followers | Followers | This is the followers information for a specified XUID |
15 | /v2/recent-players | Recent Players | This is accounts recent players information |
16 | /v2/{xuid}/friends-playing/{titleId} | Friends Playing Specified Game | This is the friends information for a specified XUID, playing a specified game |
17 | /v2/{xuid}/game-clips | Users Game Clips | This is the game clips for a specified XUID |
18 | /v2/{xuid}/game-clips/saved | Users Saved Game Clips | This is the saved game clips for a specified XUID |
19 | /v2/{xuid}/game-clips/{titleId} | Users Game Clips For Specified Game | This is the saved game clips for a specified XUID, and Game (titleId) |
20 | /v2/game-clips/{titleId} | Game Clips For Specified Game | This is the saved game clips for a specified Game (titleId) |
21 | /v2/{xuid}/screenshots | Users Screenshots | This is the screenshots for a specified XUID |
22 | /v2/{xuid}/screenshots/{titleId} | Users Screenshots For Specified Game | This is the saved screenshots for a specified XUID, and Game (titleId) |
23 | /v2/screenshots/{titleId} | Screenshots For Specified Game | This is the saved screenshots for a specified Game (titleId) |
24 | /v2/{xuid}/game-stats/{titleId} | Game Stats | This is the game stats for a specified XUID, on a specified game. (i.e. Driver Level on Forza etc.) |
25 | /v2/{xuid}/xbox360games | Xbox 360 Games | This is the Xbox 360 Games List for a specified XUID |
26 | /v2/{xuid}/xboxonegames | Xbox ONE Games | This is the Xbox One Games List for a specified XUID |
27 | /v2/{xuid}/achievements/{titleId} | Xbox Game Achievements | This is the Xbox Games Achievements for a specified XUID |
28 | /v2/game-details-hex/{game_id} | Xbox Game Information (Game ID in HEX) | This is the Xbox Game Information (using the game id in hex format) |
29 | /v2/game-details/{product_id} | Xbox Game Information (Product ID) | This is the Xbox Game Information (using the product id) |
30 | /v2/game-details/{product_id}/addons/1 | Xbox Game Addon (DLC) Information (Product ID) | This is the Xbox Game Information (using the product id) |
31 | /v2/game-details/{product_id}/related | Xbox Related Game Information (Product ID) | This is the Xbox Game Information (using the product id) |
32 | /v2/latest-xbox360-games | Latest Xbox 360 Games | This gets the latest Xbox 360 Games from the Xbox LIVE marketplace |
33 | /v2/latest-xboxone-games | Latest Xbox One Games | This gets the latest Xbox One Games from the Xbox LIVE marketplace |
34 | /v2/latest-xboxone-apps | Latest Xbox One Apps | This gets the latest Xbox One Apps from the Xbox LIVE marketplace |
35 | /v2/xboxone-gold-lounge | Xbox One Gold Lounge | These are the free "Games with Gold", and "Deals with Gold" from the Xbox LIVE marketplace |
36 | /v2/browse-marketplace/xbox360/1?sort=releaseDate | Browse Xbox 360 Marketplace | Browse the Xbox LIVE marketplace for Xbox 360 content. |
37 | /v2/browse-marketplace/games/1?sort=releaseDate | Browse Xbox One Marketplace | Browse the Xbox LIVE marketplace for Xbox One Game content. |
38 | /v2/browse-marketplace/apps/1?sort=releaseDate | Browse Xbox One Marketplace Apps | Browse the Xbox LIVE marketplace for Xbox One App content. |
39 | /v2/activity-feed | Activity Feed | Show your activity feed. |
40 | /v2/{xuid}/titlehub-achievement-list | TitleHub Achievements List | Show your achievements list by game with friends who also play. (New TitleHub endpoint) |
41 | /v2/clubs/owned | Clubs I Own | Show clubs that you are an owner of |
42 | /v2/clubs/joined/{xuid} | Clubs I Have Joined | Show clubs that you have joined - Note that the XUID is optional |
43 | /v2/clubs/details/{club_id} | Club Details | Show all information about a club |
44 | /v2/clubs/search/name/{search_query} | Search For Club By Name | You search for clubs by name |
45 | /v2/clubs/search/titles/{search_query} | Search For Club By Titles | You search for clubs by title id's (comma seperated for multiple) |
46 | /v2/clubs/search/tags/{search_query} | Search For Club By Tags | You search for clubs by tag's (comma seperated for multiple) - Note that not all tags are known |
47 | /v2/xbox-activity-feed | Xbox Sponsored Activity Feed | This is the Xbox sponsored activity feed |
48 | /v2/{xuid}/add-as-friend | Add Friend | This XUID will be added as a friend (NOTE: This is a GET request, and will add djekl as a friend) |
49 | /v2/{xuid}/add-as-favourite | Add Favourite Friend | This XUID will be added as a favourite (NOTE: This is a GET request, and will add djekl as a favourite) |
50 | /v2/{xuid}/remove-friend | Remove Friend | This XUID will be removed as a friend (NOTE: This is a DELETE request, and will remove djekl as a friend) |
51 | /v2/{xuid}/title-history | Profile Title History | Use this endpoint with an XUID to find the title history of a user |
52 | /v2/{xuid}/alternative-game-clips | Alternative Game Clips | This is a new endpoint for game clips, however the data structure is different, and can be used instead of the existing one |
53 | /v2/{xuid}/alternative-screenshots | Alternative Screenshots | This is a new endpoint for screenshots, however the data structure is different, and can be used instead of the existing one |
54 | /v2/marketplace/search/{query} | [NEW] Marketplace Search | Search the latest Xbox Marketplace |
55 | /v2/marketplace/show/{id} | [NEW] Marketplace Show (title id) | Show product details from the latest Xbox Marketplace. It takes either a Title ID (integer), Legacy Xbox Product ID (looks like a UUID), or the new Big ID (9NBLGGH537BL) |
56 | /v2/marketplace/show/{id} | [NEW] Marketplace Show (legacy xbox product id) | Show product details from the latest Xbox Marketplace. It takes either a Title ID (integer), Legacy Xbox Product ID (looks like a UUID), or the new Big ID (9NBLGGH537BL) |
57 | /v2/marketplace/show/{id} | [NEW] Marketplace Show (Big ID) | Show product details from the latest Xbox Marketplace. It takes either a Title ID (integer), Legacy Xbox Product ID (looks like a UUID), or the new Big ID (9NBLGGH537BL) |
58 | /v2/marketplace/games-with-gold | [NEW] Marketplace Games With Gold | Show the latest Games With Gold on the latest Xbox Marketplace |
59 | /v2/marketplace/deals-with-gold | [NEW] Marketplace Deals With Gold | Show the latest Deals With Gold on the latest Xbox Marketplace |
60 | /v2/marketplace/latest-games | [NEW] Latest Games in the Marketplace | Get the latest Games on the latest Xbox Marketplace |
61 | /v2/marketplace/featured-games | [NEW] Featured Games in the Marketplace | Get the currently featured Games on the latest Xbox Marketplace |
62 | /v2/marketplace/games-coming-soon | [NEW] Games Coming Soon to the Marketplace | Get the Games that are coming soon to the latest Xbox Marketplace |
63 | /v2/marketplace/most-played-games | [NEW] Most Played Games in the Marketplace | Get the Most Played Games that are in the latest Xbox Marketplace |