XBOX One API
This is a Python wrapper for the unofficial Xbox API
For now you will have to install manually, as I didn't upload the initial version to pypi (
- Clone this repo
- Place the
xboxapidirectory in your project
The only dependency is requests library.
This is a basic example of how to create a client and fetch a gamers profile information from their gamertag.
from xboxapi import Client
client = Client(api_key=<api_key>)
gamer = client.gamer('voidpirate')
profile = gamer.get('profile')
Client class constructor takes the following optional arguments except
|api token from Xbox API
|how long until the request times out (seconds)
|country language code (e.g. for German (
Client class public methods.
|gamertag to lookup
|Return headers about api rate limits
A note about the gamer method. If you already know the gamers xuid you can use that instead to avoid an additional api call when using only a gamertag.
Gamer class public methods, returned from gamer method in
|Send a message to gamer
|Update your activity feed with a message
Pagination is supported in this client and all handled through
get method. It works by detecting the response header for pagination, any subsequent calls to the same api endpoint will return paged data. If another api call is made to a different endpoint, the pagination token will be cleared and results will not be paged.
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.