Xbox does not provide an official API for anyone to use. Their are a few sites that provide an API one of which is https://xboxapi.com/v1 xboxapi makes it very easy to pull your Xbox API data.
In this tutorial I'll show you how to display your Xbox Live data and then cache it, this will enable the page to load faster and avoid going over xboxapi's API Limit which is set to 350 requests an hour.
These files acompany the tutorial: Display Xbox live data with xboxapi and cache it