25 OctBF3 Stats Paths – JSON Format
I have located some stats pages formatted in JSON that can be parsed and used to make your own BF3 stats pages. Blake Harley has a great API written in PHP that works great for parsing the overview stats. Unfortunately the URL used in the above API only accesses the overview stats, basically the information on the Stats and Progression page of your BF3 profile. What if you want more stats, like ribbon counts, weapons and equipment, vehicles … well here you go:
Stats and Progression
http://battlelog.battlefield.com/bf3/overviewPopulateStats/123456789/None/1/
Weapons and Equipment
http://battlelog.battlefield.com/bf3/weaponsPopulateStats/123456789/1/
Vehicals
http://battlelog.battlefield.com/bf3/vehiclesPopulateStats/123456789/1/
Awards
http://battlelog.battlefield.com/bf3/awardsPopulateStats/123456789/1/
Note: Replace 123456789 with a valid BF3 Player ID
How do you parse this data? I tried to paste it in this url: http://shivasoft.in/blog/wp-content/uploads/2011/05/OnlineJSONParser.html
to find out how the item names are, but it wont give any data.
You actually need to be logged into Battlelog in order to query those pages. That’s where the API mentioned above is handy. If you log into Battlelog and open a new tab in your browser, go to one of the above links (using your player ID) it should return at least the JSON so you can see what it looks like. Accessing that data from another script on another computer won’t work unless you are using something like Blake’s PHP API.
I haven’t seen a public stats page yet that you can query without using a Battlelog account, if there is one I’m all ears :).
Is there any way to get a JSON output of a specific Battle Report?
like http://battlelog.battlefield.com/bf3/battlereport/show/5524821/1/241820778/
I haven’t figured that out yet, but based on what I’ve been reading, it can be done. Here’s a great article that goes over how Battlelog works (http://lucumr.pocoo.org/2011/11/15/modern-web-applications-are-here/). It sounds like all data is returned in JSON and it’s just a matter of finding the correct URL. If you come across anything let me know, I’m currently throwing together a new version of the BFCW website and will take all the features I can get.
I would love to find out so I could build a tool to keep a list of my clans match battle report URL’s and to get various stats for the matches using the JSON.
Since battlelog sends JSON, is there a browser extension that can be used to capture the source URL of the JSON data when loading a battle report page?
I know you could use something like WireShark to monitor network traffic, but that might be a bit too low level. I’m sure it’s buried somewhere on the Battlelog page in one of the included javascript files, I haven’t had a chance to dig through those and figure it out. I’ll post something if I stumble across anything.
Yeah, use chrome and put this: chrome://net-internals/#events in the address bar
hi, i have a problem with URL.
I can not parse PS3 player stats !!
is this normal ?
The above URL is for PC stats, the PS3 and XBox links are slightly different. At the end of the URL you’ll see the number one, replace that with the number two (2) for XBox or the number four (4) for PS3.
So to retrieve stats for a PS3 player, use:
http://battlelog.battlefield.com/bf3/awardsPopulateStats/123456789/4/
123456789, should be replaced with a valid PS3 user.