Skip to content
This repository has been archived by the owner on Jul 20, 2020. It is now read-only.

Latest commit

 

History

History
428 lines (329 loc) · 12.9 KB

README-API-1.x.md

File metadata and controls

428 lines (329 loc) · 12.9 KB

You can "thanks" me here: wotapi.ru/en/donate/

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:

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.ru/community/...

can be replaced with

http://api.worldoftanks.ru/uc/...

Also, here is the list of api servers:

http://api.worldoftanks.ru
http://api.worldoftanks.eu
http://api.worldoftanks.com
http://api.worldoftanks-sea.com
http://api.worldoftanks.kr

If you want to get news from site:

http://game.worldoftanks.ru/rss
http://game.worldoftanks.eu/rss
http://game.worldoftanks.com/rss
http://worldoftanks-sea.com/news/rss/en/
http://worldoftanks.kr/news/rss/ko/

Some time ago I've created project WoT/WoWP News RSS Export for all servers and all languages availabe on sites for that moment: http://api.wot-blackdeath.ru/en/projects/wot-wowp-rss

List of methods

Searching players

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

API version: 1.0, 1.1

Example:

http://api.worldoftanks.ru/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.ru/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, 1.9

Example:

http://api.worldoftanks.ru/uc/accounts/500032519/api/1.9/?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://http://dvstats.wargaming.net/userstats/2/stats/slice/?platform=android&server=ru&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://http://dvstats.wargaming.net/userstats/2/stats/?server=ru&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

Getting all actual tanks in game

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

API version: 1.0

Tokens: see at the end of file

Example:

http://api.worldoftanks.eu/encyclopedia/vehicles/api/1.0/?source_token=WG-WoT_Assistant-1.3.2

Detailed tank data

http://api.worldoftanks.eu/encyclopedia/vehicles/%NATION%/%TANK_ID%/api/%API_VER%/?source_token=%TOKEN%

Nations: ussr, uk, usa, germany, france, china

Tank IDs: look at the all tanks list

API version: 1.0

Tokens: look at the end of file

Example:

http://api.worldoftanks.eu/encyclopedia/vehicles/ussr/MS-1/api/1.0/?source_token=WG-WoT_Assistant-1.3.2

Notifications

http://dvstats.wargaming.net/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.ru/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.ru/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.ru/personal/api/%API_VER%/?source_token=%TOKEN%

API version: 1.0

Login request

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

Global map

At least in russian cluster these link were changed!

Region 1 (Northern Europe)

http://cw.worldoftanks.ru/clanwars/maps/provinces/regions/1/?ct=json

Region 2 (Mediterranean)

http://cw.worldoftanks.ru/clanwars/maps/provinces/regions/2/?ct=json

Region 3 (West Africa)

http://cw.worldoftanks.ru/clanwars/maps/provinces/regions/3/?ct=json

Region 4 (East Africa)

http://cw.worldoftanks.ru/clanwars/maps/provinces/regions/4/?ct=json

Region 5 (Ural)

http://cw.worldoftanks.ru/clanwars/maps/provinces/regions/5/?ct=json

Region 6 (Siberia and Far East)

http://cw.worldoftanks.ru/clanwars/maps/provinces/regions/6/?ct=json

Region 7 (Asia)

http://cw.worldoftanks.ru/clanwars/maps/provinces/regions/7/?ct=json

Region 11 (South Africa)

http://cw.worldoftanks.ru/clanwars/maps/provinces/regions/11/?ct=json

Existing, but not active for now (on russian cluster):

Region 8 (East Coast USA)

http://cw.worldoftanks.ru/clanwars/maps/provinces/regions/8/?ct=json

Region 9 (Atlantida)

http://cw.worldoftanks.ru/clanwars/maps/provinces/regions/9/?ct=json

Region 10 (Canada and Alaska)

http://cw.worldoftanks.ru/clanwars/maps/provinces/regions/10/?ct=json

To get ClanWars info

http://worldoftanks.ru/community/clans/%CLAN_ID%/battles/list/?id=js-battles-table

To make such request you need to setup some addditional options in request header (example for cURL):

        curl_setopt($ch, CURLOPT_HTTPHEADER,
            array(
                'Accept: application/json, text/javascript, text/html, */*',
                'X-Requested-With: XMLHttpRequest'
            )
        );

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, 1.9
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
  • WG-WoT_Assistant-1.4
  • WG-WoT_Assistant-1.4.1
  • Intellect_Soft-WoT_Mobile-site
  • Intellect_Soft-WoT_Mobile
  • WG-WoT_Assistant-test
  • Intellect_Soft-WoT_Mobile-unofficial_stats

Thanks:

  • Racy for providing tanks list