Converts between Steam ID64, Steam2, Steam3 and vanity IDs. Based on the SteamID library by xPaw.

convert_steamid simply converts a vector of Steam IDs while lookup_steamid compiles all types of Steam IDs for all input IDs.

lookup_steamid(ids, include_vanity = TRUE, vanity_type = "profile")

convert_steamid(ids, to, vanity_type = "profile")

parse_steam64(ids, resolve = FALSE)

parse_steam2(ids, resolve = FALSE)

parse_steam3(ids, resolve = FALSE)

Arguments

ids

String of a Steam ID. Can be ID64, Steam2, Steam3, or a vanity ID. The format is automatically detected. If not format can be identified, assumes vanity.

include_vanity

Whether to include vanity IDs in the output of lookup_steamid. Useful to prevent Web API lookups.

vanity_type

Type of profile identified by the vanity ID. Passed to resolve_vanity. Ignored if ids does not contain vanity IDs.

to

Steam ID format to convert to. Must be one of steam64, steam2, steam3, or vanity. Conversions from or to vanity require a Steam API key to be set.

resolve

If TRUE, resolves the codes parsed by the parse_* functions to descriptive factors.

Details

Steam knows four types of IDs (excluding invite codes):

  • ID64 is largely used by the Steam Web API and storefront API. It is a 64-bit representation of a profile that can also be used in steamcommunity URLs.

  • Steam2 is a textual representation of a profile that consists of descriptive components: the universe, authentication server, and account number.

  • Steam3 is a newer textual format that is used by many games. It consists of account type, universe, account number, and account instance.

  • Vanity IDs are the self-chosen account names of an individual or group. They can be found in steamcommunity URLs. To resolve or convert them, access to Steam's Web API is required.

Each Steam ID explicitly or implicitly consists of several components:

  • The authentication server (0 or 1)

  • The account number

  • The account instance (number between 0 and 4)

  • The account type (number between 0 and 10)

  • The universe (number between 0 and 5)

The parse_* functions are able to parse the individual components of Steam64, Steam2, and Steam3 IDs. The meaning of each number is finely documented in the source code of the https://github.com/xPaw/SteamID.php/blob/master/SteamID.php

Note

This function is not perfect, but should suffice for most use cases. Special cases and older profiles sometimes return the wrong account number or universe.

Steam ID components

A Steam ID consists of five components. The auth server (auth) can be either 0 or 1. The account number (number) is a unique identifier for the account.

Instance values correspond to the following meanings:

InstanceDescription
0All instances
1Desktop instance
2Console instance
4Web instance

Types values correspond to the following meanings:

TypeDescription
0Invalid
1Individual
2Multiseat
3Game server
4Anonymous game server
5Pending
6Content server
7Clan
8Chat
9P2P super seeder
10Anonymous user

Universe values correspond to the following meanings:

UniverseDescription
0Invalid
1Public
2Beta
3Internal
4Dev

Examples

if (FALSE) { # \dontrun{
convert_steamid("vgenkin", "steam64") |>
  convert_steamid("steam2") |>
  convert_steamid("steam3") |>
  convert_steamid("vanity")

lookup_steamid("vgenkin")
} # }