Skip to content

Valorant API methodes

Alexander Kögel edited this page Sep 28, 2022 · 5 revisions

A list of all methodes that are provided by the ValorantAPI class

api is the declaration of the constructor so modify it with your own declaration


getContent()

Get content optionally filtered by locale

const content = await api.getContent()

You can also use

const {Locale} = require("sage.js")
api.locale = Locale.de_DE
const localeizedContent = await api.getContent()

to only get the content with localized names. If you want to get all content again youst do

api.locale = false

Match endpoints

Please note that all match endpoints can only be used wit a production API key

getByID()

Get Match by Match ID

required parameter: matchID - The ID of the Match you want to get

const matchData = await api.match.getByID("matchID")

getListbyPuuid()

Get Matchlist by PUUID

required parameter: puuid - The PUUID of the Player you want to get the Matchlist from

const matchList = await api.match.getListbyPuuid("puuid")

getbyQueueID()

Get UUIDs of recently played matches in a given region by a queue ID use the Queue object to use the official queue IDs

Note: Returns a list of match ids that have completed in the last 10 minutes for live regions and 12 hours for the esports routing value. NA/LATAM/BR share a match history deployment. As such, recent matches will return a combined list of matches from those three regions. Requests are load balanced so you may see some inconsistencies as matches are added/removed from the list.

required parameter: queueID - You can use the Build in Queue object of the libary to provide a valid queueID

const recentMatches = await api.match.getbyQueueID(Queue.competetive)

getCompetitiveLeaderboard()

Get the competitive leaderbord for the given region from a past act ID

required parameter: actID - The ID of the Act you want to get the Leaderboard from (You can get the Act ID from the Content Endpoint). Please note the current Act is not available in the Leaderboard Endpoint

optional paramters:

  • size - The size of the Leaderboard you want to get (Defaults to 200. Valid values: 1 to 200.)
  • startIndex - The start index of the Leaderboard you want to get (Defaults to 0.)
const leaderbord = await api.getCompetitiveLeaderboard("actID")

getStatus()

Get the curent status of the Game in the given region

const status = await getStatus()

If you have any questions or whant to report a bug please open an issue

Clone this wiki locally