XBox live achievements API

Based on your comments, then the Xbox API would be the most suited API for your app.

You can check the users recent games with an HTTP GET request:

https://xboxapi.com/profile/Focus+Jar

This will return a JSON array, where you can check if they have the game you would like to track their achievements on with this GET request:

https://xboxapi.com/achievements/1096157387/Focus+Jar

Using this method, you can use JavaScript or PHP and it's rather effective. I've used it before in an app. The only downside to this is that the XBOX API can sometimes be rather slow and for this I'd suggest caching some data form the GET Requests.

Hope this helps you more.

Update You now need an account to use this API.


As far as I remember, there isn't much information given with the Xbox Community Developer Program. I originally wanted access to this information, but the application process takes a looooong time and they still haven't gotten back to me. I applied a few years back. I don't know if they're including anyone else in the program at this time. Therefore, I took matters into my own hands and started reverse engineering different ways to get the information I wanted.

I started off with writing a scraper in PhantomJS that sends all required fields to the login form and downloads the HTML/JSON once logged in. This worked for a while, but the way I built it, it was downloading an entire profile and storing the entire thing into an XML or JSON file. For people with 100+ games, this was very slow. I began looking for other methods of getting into xbox.com shortly after that.

The developer of xboxapi.com, djekl, and I are good friends since a few years back. Scraping is effective, but it's also daunting because if something changes in the HTML/JSON, things break. I have gone through several redesigns of my Xbox scraping library.

You'll need an HTTP library capable of capturing cookies from responses and sending them back in the next request. In PHP, cURL is quite good at doing this. I've noticed that in C#, the built-in HTTP library doesn't properly store the cookies between requests so you need to either manually manage the cookie header or use a .NET wrapper for libcurl such as LibCurl.Net.

I wish you best of luck on your project. It's a shame that we can't get an open API for this data from Microsoft. Maybe even a subscription based model would work if they were concerned about costs incurred by thousands of requests an hour to the API from different applications.

Tags:

Xbox