Skip to content

Instantly share code, notes, and snippets.

@bartku
Last active January 31, 2024 01:05
Show Gist options
  • Star 18 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save bartku/4271798 to your computer and use it in GitHub Desktop.
Save bartku/4271798 to your computer and use it in GitHub Desktop.
Unofficial description of unofficial World of Tanks API

World of Tanks unofficial API

World of Tanks, popular MMO game about tanks from time around WWII, has some nice mobile application called Wot Assistant (available also at AppStore and MS Marketplace). With simple packet sniffing you can guess how it retrieves players' statistics.

Surprisingly, mobile application uses quite simple API over HTTP which serves data in JSON, which is great help for people interested in creating own applications handling statistical data in game.

At this moment here is list of API features that has been discovered:

  • searching players by names
  • searching clans by names
  • showing current player statistics
  • showing current clan information
  • showing player stats from given time
  • showing player stats of particular property
  • logging in (uses HTTPS)
  • receiving notifications
  • global map (clan wars)

Most of methods require appropriate API version, as well as token. So far every token I have found fits into every method.

http://api.worldoftanks.eu/community/...

can be replaced with

http://api.worldoftanks.eu/uc/...

List of methods

Searching players

http://api.worldoftanks.eu/community/accounts/api/%API_VER%/?source_token=%TOKEN%&search=%NAME%&offset=%OFFSET%&limit=%LIMIT%

API version: 1.0, 1.1

Example:

http://api.worldoftanks.eu/community/accounts/api/1.1/?source_token=WG-WoT_Assistant-1.3.2&search=bristol&offset=8&limit=3

Returns:

{
  "status": "ok", 
  "status_code": "NO_ERROR", 
  "data": {
    "items": [
      {
        "clan": null, 
        "stats": {
          "wins": 0, 
          "exp": 0, 
          "battles": 0
        }, 
        "name": "Bristolboy", 
        "url": "/community/accounts/500886192-Bristolboy/", 
        "created_at": 1308943273.0, 
        "id": 500886192
      }, 
...
      {
        "clan": null, 
        "stats": {
          "wins": 1, 
          "exp": 65, 
          "battles": 1
        }, 
        "name": "bristolcity", 
        "url": "/community/accounts/504220640-bristolcity/", 
        "created_at": 1342381045.0, 
        "id": 504220640
      }
    ], 
    "offset": 8, 
    "filtered_count": 19
  }
}

Description:

  • data.items[].created_at contains UNIX timestamp of account creation
  • data.filtered_count shows number of accounts fitting searched name

Parameters:

  • NAME - name of searched players
  • OFFSET - offset
  • LIMIT - limit of shown players

Showing player's stats

http://api.worldoftanks.eu/community/accounts/%PLAYER_ID%/api/%API_VER%/?source_token=%TOKEN%

API version: 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8

Example:

http://api.worldoftanks.eu/uc/accounts/500032519/api/1.8/?source_token=WG-WoT_Assistant-1.3.2

Returns:

{
  "status": "ok", 
  "status_code": "NO_ERROR", 
  "data": {
    "achievements": {
      "medalCarius": 3, 
... 
      "lumberjack": 0, 
... 
      "medalKnispel": 3
    }, 
    "ratings": {
      "spotted": {
        "place": 453554, 
        "value": 1279
      }, 
      "dropped_ctf_points": {
        "place": 719367, 
        "value": 370
      }, 
      "battle_avg_xp": {
        "place": 4917, 
        "value": 696
      }, 
      "xp": {
        "place": 479876, 
        "value": 345250
      }, 
      "battles": {
        "place": 818353, 
        "value": 496
      }, 
      "damage_dealt": {
        "place": 422188, 
        "value": 524350
      }, 
      "ctf_points": {
        "place": 652538, 
        "value": 1230
      }, 
      "integrated_rating": {
        "place": 16310, 
        "value": 184
      }, 
      "battle_avg_performance": {
        "place": 17928, 
        "value": 56
      }, 
      "frags": {
        "place": 513289, 
        "value": 706
      }, 
      "battle_wins": {
        "place": 766043, 
        "value": 279
      }
    }, 
    "name": "Schperling", 
    "created_at": 1302624328.0, 
    "vehicles": [
      {
        "spotted": 0, 
        "localized_name": "Löwe", 
        "name": "Lowe", 
        "level": 8, 
        "damageDealt": 0, 
        "survivedBattles": 0, 
        "battle_count": 174, 
        "nation": "germany", 
        "image_url": "/static/2.1.2/encyclopedia/tankopedia/vehicle/small/germany-lowe.png", 
        "frags": 0, 
        "win_count": 82, 
        "class": "heavyTank"
      },  
      ... 
      {
        "spotted": 0, 
        "localized_name": "PzKpfw II", 
        "name": "PzII", 
        "level": 2, 
        "damageDealt": 0, 
        "survivedBattles": 0, 
        "battle_count": 1, 
        "nation": "germany", 
        "image_url": "/static/2.1.2/encyclopedia/tankopedia/vehicle/small/germany-pzii.png", 
        "frags": 0, 
        "win_count": 0, 
        "class": "lightTank"
      }
    ], 
    "updated_at": 1352997598.0, 
    "battles": {
      "spotted": 1279, 
      "hits_percents": 62, 
      "capture_points": 1230, 
      "damage_dealt": 524350, 
      "frags": 706, 
      "dropped_capture_points": 370
    }, 
    "summary": {
      "wins": 279, 
      "losses": 211, 
      "battles_count": 496, 
      "survived_battles": 137
    }, 
    "experience": {
      "xp": 345250, 
      "battle_avg_xp": 696, 
      "max_xp": 2464
    }, 
    "clan": {
      "member": {
        "since": 1300632431.0, 
        "role": "soldier"
      }, 
      "clan": {
        "abbreviation": "WG", 
        "color": "#4c9674", 
        "id": 500000001, 
        "emblems_urls": {
          "small": "/dcont/clans/emblems/clans_5/500000001/emblem_24x24.png", 
          "large": "/dcont/clans/emblems/clans_5/500000001/emblem_64x64.png", 
          "bw_tank": "/dcont/clans/emblems/clans_5/500000001/emblem_64x64_tank.png", 
          "medium": "/dcont/clans/emblems/clans_5/500000001/emblem_32x32.png"
        }, 
        "name": "Wargaming.net"
      }, 
      "clan_ext": {}
    }
  }
}

Description:

  • Amount of information differs between API versions - depends on new medals or statistics added in particular game versions. In general, the higher API version, the more statistics.
  • data.vehicles[].localized_name contains localized name of vehicle. Local language is detected by Accept-Language HTTP header send by client (browser, application).
  • data.clan.member.role contains localized name of role in clan. Local language is detected by Accept-Language HTTP header send by client (browser, application).
  • data.updated_at contains UNIX timestamp of data update. At the moment player stats (via this API and on WoT website) aren't updated if player is in game but after he quits game client.
  • data.clan.member.since contains UNIX timestamp of player's join to the clan.
  • data.clan.clan.emblems_urls contains list of clan emblems used in game. They are not resized automatically by the server, clan leader uploads every size of emblem separately. data.clan.clan.emblems_urls.bw_tank is used on tanks, rest of them are used in service records or website/forum profile.
  • data.battles.damage_dealt may differ from sum of damageDealt of every tank in data.vehicles (data.vehicles[].damageDealt is updated after few hours).

Showing player's stats from past

http://dava2.worldoftanks.com/userstats/2/stats/slice/?platform=android&server=eu&account_id=%PLAYER_ID%&hours_ago=24&hours_ago=168&hours_ago=336

Description:

  • Gets stats up to 336 hours in past

Showing particular part of stats from player:

http://dava2.worldoftanks.com/userstats/2/stats/?server=eu&platform=android&account_id=%PLAYER_ID%&from_date=2012-11-06T10%3A24%3A44&to_date=2012-11-20T10%3A24%3A44&interval=24&field=summary.battles_count&field=summary.wins&field=summary.survived_battles&field=experience.max_xp

Description:

  • Dunno why but works only for some accounts, I guess it has something to do with dates

Notifications

http://dava2.worldoftanks.com/notify/messages/?server=ru&device_platform=android&device_id=331929b195b91010&app_company=WG&app_product=WoT_Assistant&app_version=1.3.2&from_id=0

Searching clans

http://api.worldoftanks.eu/community/clans/api/%API_VER%/?source_token=%TOKEN%&search=%CLAN_NAME%&offset=0&limit=1

Optional: &order_by=name

API version: 1.0, 1.1

Description:

  • In version 1.0 added data.items[].id showing ID of clan. Previously you had to parse url in data.items[].clan_emblem_url to get clan ID.
  • &order_by= gives possibility to sort by given value

Showing clan's stats

http://api.worldoftanks.eu/community/clans/%CLAN_ID%/api/%API_VER%/?source_token=%TOKEN%

API version: 1.0, 1.1

Personal stats (after logging in via API)

http://api.worldoftanks.eu/personal/api/%API_VER%/?source_token=%TOKEN%

API version: 1.0

Login request

https://api.worldoftanks.eu/auth/create/api/%API_VER%/?source_token=%TOKEN%
https://api.worldoftanks.eu/utils/csrf/api/%API_VER%/?source_token=%TOKEN%

Global map

Region 1 (Northern Europe)

http://api.worldoftanks.eu/uc/clanwars/provinces/regions/5/?ct=json
http://cw.worldoftanks.eu/clanwars/maps/provinces/regions/5/?ct=json

Region 2 (Mediterranean)

http://api.worldoftanks.eu/uc/clanwars/provinces/regions/4/?ct=json
http://cw.worldoftanks.eu/clanwars/maps/provinces/regions/4/?ct=json

Region 3 (Africa)

http://api.worldoftanks.eu/uc/clanwars/provinces/regions/3/?ct=json
http://cw.worldoftanks.eu/clanwars/maps/provinces/regions/3/?ct=json

Map layout

http://cw.worldoftanks.eu/static/wgcw/regions/reg_01/map.js
http://cw.worldoftanks.eu/static/wgcw/regions/reg_02/map.js
http://cw.worldoftanks.eu/static/wgcw/regions/reg_03/map.js

Provinces names

http://cw.worldoftanks.eu/static/wgcw/js/i18n/en_earth_map.js

Events on map

http://cw.worldoftanks.eu/clanwars/maps/events/?action_filter=all

API versions

MethodAccepted API version
Searching players1.0, 1.1
Searching clans1.0, 1.1
Showing player stats1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8
Personal info1.0
Logging in1.0

Tokens:

  • WG-WoT_Assistant-1.1.2
  • WG-WoT_Assistant-1.2.2
  • WG-WoT_Assistant-1.3.2
  • Intellect_Soft-WoT_Mobile-site
  • Intellect_Soft-WoT_Mobile
  • WG-WoT_Assistant-test
  • Intellect_Soft-WoT_Mobile-unofficial_stats
@rglos
Copy link

rglos commented Apr 20, 2013

Awesome work. Too bad the data coming back is not correct.

@sushiguru
Copy link

Just to let you know - since 0.8.5 the api URL was changed - you'll need to add api. to the start of the url; ie:

http://worldoftanks.eu/uc/accounts/500032519/api/1.8/?source_token=WG-WoT_Assistant-1.3.2

should now be:

http://api.worldoftanks.eu/uc/accounts/500032519/api/1.8/?source_token=WG-WoT_Assistant-1.3.2

or you'll get an error.

@Eagle77
Copy link

Eagle77 commented May 2, 2013

Great work!
url chang is commited, as well there are new api versions for playerstats:
API Vers: 1.9
Token: WG-WoT_Assistant-1.4.1
I still wanted to ask, for url, where i can get all WOT news, like in the app?
maybee someone knows the correct url to get the news from World of Tanks Assistant App.

@gertjanvg
Copy link

I'm working on this, now there's an issue. On some accounts the detailed information like tank specific damage done by a tank, on others none. I'm wondering what's the reason why this is. When it would be all updated it would be very good for efficiency ratings etc.

@gflamino
Copy link

Is there an API call to collect Clan performance in clan wars and company battles?

@tig3ro
Copy link

tig3ro commented Oct 22, 2013

Great work! However it's been some time and WoT API changed to 2.0. Can I ask you for an update here? Especially how to log in using the new API.

BTW What tools do you use to inspect the WoT Assistant traffic? I tried WireShark and it's nice, but part of the traffic is encrypted (https).

@Rayman223
Copy link

It's seem not working anymore.
Any chance to get an update ?
thx !

@bartku
Copy link
Author

bartku commented Mar 6, 2022

It's seem not working anymore. Any chance to get an update ? thx !

@Rayman223
Sorry but no. Stopped playing WoT a couple years ago.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment