smogon

/formats

The formats API provides a mapping from Pokémon Showdown "id" to "Display Name" for cases when the display name cannot programmatically deduced. There is a single valid resource which can be fetched: /formats/index.json.

The correct way to determine the name of current formats is to rely on the information from Pokémon Showdown's config/formats.ts, a version of which is included with the @pkmn/sim package.

The data provided here is only required to support legacy formats - i.e., formats that existed at one point in time and have data present on www.smogon.com/stats. Unless you are building an historical usage stats viewer you probably do not need this information.

The following transformations are required to properly display the data: