Full Guide:
Getting Started

Wargaming.net Public API is a set of API methods that provide access to Wargaming.net content, including in-game and game-related content, as well as player statistics.

Before you start using WG Public API, explore Terms of Use and documentation sections.

To view the values returned by APIs, use API Explorer.
For example, API Explorer can emulate method functions of searching for players by specified criteria and viewing player profile.

To see the visualizations returned by APIs, check out World of Tanks Assistant application for Android and iOS.

Developer Room

Developer Room provides necessary information to develop your own services and applications using the API methods.

To log in to Developer Room, use your Wargaming.net account.

Registering Application

Once you logged in to Developer Room, to start using API, you need to register your application.

To register an application:

  • Log in to Developer Room.
  • Go to My applications.
  • Click Add application. The placeholder fields for application name and type are displayed.
  • Select application type. See Application Types.
  • Enter the application name. Once a user signed in to the application, its name will be visible on user's "Account Management" -> "Sessions" page.
  • Click Add application. The list of all added applications is displayed.
  • Once registered, the application is assigned with an application_id. The application_id is used as a key to identify your application when calling API.

To receive WG Public API content, registration is required. See Using application_id for details.

Using application_id

application_id is an application identification key used to send requests to API. The access to Wargaming.net content is granted only if your application has application_id.

Demo access to API is terminated. For test requests to API have to use personal application_id, obtained in My applications page.

The API always returns data in JSON format.

The request per second limit is set for each application_id.

Request Format

A user communicates with a domain/subdomain, which represents the game cluster, via HTTP(S) and API returns values.

The part of domain name indicating a cluster is denoted as <server>.

Two HTTP(S) methods to transfer the parameters:

  1. GET: methods: specified in the URL request.
    Example: ?<param_name>=<param_value>
  2. POST: methods: specified in HTTP request.
    Example: ?<param_name>=<param_value>

The format of all URL requests:

http(s)://<server>/<API_name>/<method block>/<method name>/?<get params>

Where:

  • <server> — URI for a game server on the corresponding cluster
  • <API_name> — API version
  • <method block> — name of the method group
  • <method name> — method name
  • <get params> — method name

All text parameters should be transferred in UTF-8 encoding.

Each time you call API, the following parameters are transferred:

Parameter Purpose Description
application_id Required parameter for all methods. Application identification key used to send requests to API.
access_token

Used for:

  • Methods that require authentication.
  • Public methods that transfer the extended information to the authenticated user.
Access key generated upon application authentication. The key expires in two weeks.
fields Optional parameter.
Used for all methods that do not support authentication.

The list of response fields. The fields are separated by commas. The nested fields are separated by dots. See example.

To specify the fields that should be excluded from the response, "-" sign before the field name is used . See example.

If the parameter is not specified, all response fields are returned.

For security reasons, the requests with access_token should be sent via HTTPS.

Several methods use extra input parameter. It is intended to list extra fields to be included in the response. Extra fields are excluded by default. You can find a list of available extra fields for each method in the API reference. See example.

Response Format

The API methods always return data in JSON format.

The response format has the following fields:

Parameter Type Description
status string ‘ok’ — request was processed successfully; 
‘error’ — error occurred while processing the request.
error dict

Once an error occurred, the following values are returned:

code: "code"
message: "message"
field: "field"
value: "value"
data dict Block that contains the requested data. Response format depends on the request. See documentation for details.

ETag Header Field

Response header may contain ETag header field, that allows a client to perform conditional requests. Conditional GET request asks the server for a document considering a specific parameter to reduce data transfer overhead. See w3 documentation.

Common API errors

Code Message Description
402 %FIELD%_NOT_SPECIFIED Required field %FIELD% (will be replaced with the name of the field) is not specified.
404 %FIELD%_NOT_FOUND Data not found.
404 METHOD_NOT_FOUND Invalid API method.
405 METHOD_DISABLED Specified method is disabled.
407 %FIELD%_LIST_LIMIT_EXCEEDED Limit of passed-in identifiers in the %FIELD% (will be replaced with the name of the field) exceeded.
407 APPLICATION_IS_BLOCKED Application is blocked by the administration.
407 INVALID_%FIELD% Specified field value %FIELD% (will be replaced with the name of the field) is not valid.
407 INVALID_APPLICATION_ID Invalid application_id.
407 INVALID_IP_ADDRESS Invalid IP-address for the server application.
407 REQUEST_LIMIT_EXCEEDED Request limit is exceeded.
504 SOURCE_NOT_AVAILABLE Data source is not available.