Welcome to the VAPI docs
Below is a list of all the properties of the API including all properties and methods. If you need any help, join the Discord server
Table of contents
Constructors
Properties
Methods
- getAccount
- getAccountByPUUID
- getAnnouncements
- getContent
- getCrosshair
- getFeaturedItems
- getLeaderboard
- getMMR
- getMMRByPUUID
- getMMRHistory
- getMMRHistoryByPUUID
- getMatch
- getMatches
- getMatchesByPUUID
- getOffers
- getRawCompetitiveUpdates
- getRawData
- getRawMMR
- getRawMatchDetails
- getRawMatchHistory
- getStatus
- getTranslations
- getVersion
- getWebsite
- initUtils
Constructors
constructor
• new default(token?
)
Create a new instance of the main API. All API calls are in this class
Example
Create a new instance
import _VAPI from "unofficial-valorant-api"
const VAPI = new _VAPI("my super secret token")
Parameters
Name | Type | Description |
---|---|---|
token? |
string |
(optional) The token, if you have one. Get one from the Discord server (https://discord.gg/wXNMnqzvAD) |
Defined in
Properties
mapImages
• Optional
mapImages: Object
Images for every Valorant map
Remarks
You must call initUtils before using this!
Type declaration
Name | Type |
---|---|
Ascent |
{ landscape : string ; minimap : string ; splash : string } |
Bind |
{ landscape : string ; minimap : string ; splash : string } |
Breeze |
{ landscape : string ; minimap : string ; splash : string } |
Fracture |
{ landscape : string ; minimap : string ; splash : string } |
Haven |
{ landscape : string ; minimap : string ; splash : string } |
Icebox |
{ landscape : string ; minimap : string ; splash : string } |
Pearl |
{ landscape : string ; minimap : string ; splash : string } |
Split |
{ landscape : string ; minimap : string ; splash : string } |
The Range |
{ landscape : string ; minimap : string ; splash : string } |
Defined in
rankImages
• Optional
rankImages: Object
Images for every Rank
Remarks
You must call initUtils before using this!
Type declaration
Name | Type |
---|---|
Ascendant 1 |
{ large : string ; small : string ; triangleDown : string ; triangleUp : string } |
Ascendant 2 |
{ large : string ; small : string ; triangleDown : string ; triangleUp : string } |
Ascendant 3 |
{ large : string ; small : string ; triangleDown : string ; triangleUp : string } |
Bronze 1 |
{ large : string ; small : string ; triangleDown : string ; triangleUp : string } |
Bronze 2 |
{ large : string ; small : string ; triangleDown : string ; triangleUp : string } |
Bronze 3 |
{ large : string ; small : string ; triangleDown : string ; triangleUp : string } |
Diamond 1 |
{ large : string ; small : string ; triangleDown : string ; triangleUp : string } |
Diamond 2 |
{ large : string ; small : string ; triangleDown : string ; triangleUp : string } |
Diamond 3 |
{ large : string ; small : string ; triangleDown : string ; triangleUp : string } |
Gold 1 |
{ large : string ; small : string ; triangleDown : string ; triangleUp : string } |
Gold 2 |
{ large : string ; small : string ; triangleDown : string ; triangleUp : string } |
Gold 3 |
{ large : string ; small : string ; triangleDown : string ; triangleUp : string } |
Immortal 1 |
{ large : string ; small : string ; triangleDown : string ; triangleUp : string } |
Immortal 2 |
{ large : string ; small : string ; triangleDown : string ; triangleUp : string } |
Immortal 3 |
{ large : string ; small : string ; triangleDown : string ; triangleUp : string } |
Iron 1 |
{ large : string ; small : string ; triangleDown : string ; triangleUp : string } |
Iron 2 |
{ large : string ; small : string ; triangleDown : string ; triangleUp : string } |
Iron 3 |
{ large : string ; small : string ; triangleDown : string ; triangleUp : string } |
Platinum 1 |
{ large : string ; small : string ; triangleDown : string ; triangleUp : string } |
Platinum 2 |
{ large : string ; small : string ; triangleDown : string ; triangleUp : string } |
Platinum 3 |
{ large : string ; small : string ; triangleDown : string ; triangleUp : string } |
Radiant |
{ large : string ; small : string ; triangleDown : string ; triangleUp : string } |
Silver 1 |
{ large : string ; small : string ; triangleDown : string ; triangleUp : string } |
Silver 2 |
{ large : string ; small : string ; triangleDown : string ; triangleUp : string } |
Silver 3 |
{ large : string ; small : string ; triangleDown : string ; triangleUp : string } |
Unrated |
{ large : string ; small : string ; triangleDown : string ; triangleUp : string } |
Defined in
Methods
getAccount
▸ getAccount(__namedParameters
): Promise
<APIResponse
<V1AccountResponse
>>
Get general information about a player from their Riot ID
Remarks
Returns:
- Their PUUID
- Their region
- Their account level
- Their current card
Parameters
Name | Type |
---|---|
__namedParameters |
Object |
__namedParameters.force? |
boolean |
__namedParameters.name |
string |
__namedParameters.tag |
string |
Returns
Promise
<APIResponse
<V1AccountResponse
>>
General information on a players profile
Defined in
getAccountByPUUID
▸ getAccountByPUUID(__namedParameters
): Promise
<APIResponse
<V1AccountResponse
>>
Get general information about a player from their PUUID
Remarks
Returns:
- Their PUUID
- Their region
- Their account level
- Their current card
Parameters
Name | Type |
---|---|
__namedParameters |
Object |
__namedParameters.force? |
boolean |
__namedParameters.puuid |
string |
Returns
Promise
<APIResponse
<V1AccountResponse
>>
General information on a players profile
Defined in
getAnnouncements
▸ getAnnouncements(__namedParameters
): Promise
<APIResponse
<V1WebsiteResponse
>>
Get all announcements from the valorant website of a country
Parameters
Name | Type |
---|---|
__namedParameters |
Object |
__namedParameters.countryCode |
"en-us" | "en-gb" | "de-de" | "es-es" | "es-mx" | "fr-fr" | "it-it" | "ja-jp" | "ko-kr" | "pt-br" | "ru-ru" | "tr-tr" | "vi-vn" |
Returns
Promise
<APIResponse
<V1WebsiteResponse
>>
List of announcements from the valorant website
Defined in
getContent
▸ getContent(__namedParameters?
): Promise
<APIResponse
<V1ContentResponse
>>
Get all translations for every character, skin, map, ability, spray, charm, player card, player title, and more in the game
Depreciated
Use the new getTranslations instead
Parameters
Name | Type |
---|---|
__namedParameters |
Object |
__namedParameters.locale? |
Locale |
Returns
Promise
<APIResponse
<V1ContentResponse
>>
Defined in
getCrosshair
▸ getCrosshair(__namedParameters
): Promise
<APIResponse
<Buffer
>>
Get an image of a valorant crosshair by its code
Example
Load and write a crosshair to crosshair.png
import { writeFileSync } from "fs"
const crosshair = await default.getCrosshair("0;s;1;P;c;5;o;1;d;1;z;3;0b;0;1b;0;S;c;4;o;1")
writeFileSync("crosshair.png", crosshair.data)
Parameters
Name | Type |
---|---|
__namedParameters |
Object |
__namedParameters.code |
string |
__namedParameters.size? |
number |
Returns
Promise
<APIResponse
<Buffer
>>
The image of the crosshair as a Buffer
Defined in
getFeaturedItems
▸ getFeaturedItems<T
>(__namedParameters?
): Promise
<APIResponse
<StoreFeaturedResponse
<T
>>>
Get all of the featured items in the current valorant store
Type parameters
Name | Type |
---|---|
T |
extends "v1" | "v2" |
Parameters
Name | Type |
---|---|
__namedParameters |
Object |
__namedParameters.version? |
T |
Returns
Promise
<APIResponse
<StoreFeaturedResponse
<T
>>>
Featured items in the current valorant store
Defined in
getLeaderboard
▸ getLeaderboard<T
>(__namedParameters
): Promise
<APIResponse
<LeaderboardResponse
<T
>>>
Get the leaderboard of a region
Remarks
In order for player filtering to work, they must be Immortal or higher
Throws
TypeError - If both a riotID and puuid are supplied
Type parameters
Name | Type |
---|---|
T |
extends "v1" | "v2" |
Parameters
Name | Type |
---|---|
__namedParameters |
Object |
__namedParameters.end? |
number |
__namedParameters.puuid? |
string |
__namedParameters.region |
Region |
__namedParameters.riotID? |
Object |
__namedParameters.riotID.name |
string |
__namedParameters.riotID.tag |
string |
__namedParameters.season? |
`e${number}a1` | `e${number}a2` | `e${number}a3` |
__namedParameters.start? |
number |
__namedParameters.version? |
T |
Returns
Promise
<APIResponse
<LeaderboardResponse
<T
>>>
Descending order of the highest ranked players. (Immortal and up)
Defined in
getMMR
▸ getMMR<T
>(__namedParameters
): Promise
<APIResponse
<MMRResponse
<T
>>>
Gets general info about a players rank by their Riot ID
Remarks
Returns:
- Current rank and info about their rank
- RR change on their last game
- Their PUUID
- Their peak rank from every season
Throws
TypeError - If both filter and seasonFilter are set
Type parameters
Name | Type |
---|---|
T |
extends "v1" | "v2" |
Parameters
Name | Type |
---|---|
__namedParameters |
Object |
__namedParameters.filter? |
`e${number}a1` | `e${number}a2` | `e${number}a3` |
__namedParameters.name |
string |
__namedParameters.region |
Region |
__namedParameters.seasonFilter? |
`e${number}a1` | `e${number}a2` | `e${number}a3` |
__namedParameters.tag |
string |
__namedParameters.version? |
T |
Returns
Promise
<APIResponse
<MMRResponse
<T
>>>
Information about a players mmr/rank
Defined in
getMMRByPUUID
▸ getMMRByPUUID<T
>(__namedParameters
): Promise
<APIResponse
<MMRResponse
<T
>>>
Gets general info about a players rank by their PUUID
Remarks
Returns:
- Current rank and info about their rank
- RR change on their last game
- Their PUUID
- Their peak rank from every season
Throws
TypeError - If both filter and seasonFilter are set
Type parameters
Name | Type |
---|---|
T |
extends "v1" | "v2" |
Parameters
Name | Type |
---|---|
__namedParameters |
Object |
__namedParameters.filter? |
`e${number}a1` | `e${number}a2` | `e${number}a3` |
__namedParameters.puuid |
string |
__namedParameters.region |
Region |
__namedParameters.seasonFilter? |
`e${number}a1` | `e${number}a2` | `e${number}a3` |
__namedParameters.version? |
T |
Returns
Promise
<APIResponse
<MMRResponse
<T
>>>
Information about a players mmr/rank
Defined in
getMMRHistory
▸ getMMRHistory(__namedParameters
): Promise
<APIResponse
<V2MMRHistoryResponse
>>
Get a list of rr changes of a player by their Riot ID
Parameters
Name | Type |
---|---|
__namedParameters |
Object |
__namedParameters.name |
string |
__namedParameters.region |
Region |
__namedParameters.tag |
string |
Returns
Promise
<APIResponse
<V2MMRHistoryResponse
>>
List of rr changes (recent competitive games)
Defined in
getMMRHistoryByPUUID
▸ getMMRHistoryByPUUID(__namedParameters
): Promise
<APIResponse
<V2MMRHistoryResponse
>>
Get a list of rr changes of a player by their PUUID
Parameters
Name | Type |
---|---|
__namedParameters |
Object |
__namedParameters.puuid |
string |
__namedParameters.region |
Region |
Returns
Promise
<APIResponse
<V2MMRHistoryResponse
>>
List of rr changes (recent competitive games)
Defined in
getMatch
▸ getMatch(__namedParameters
): Promise
<APIResponse
<Match
>>
Get information about a match
Parameters
Name | Type |
---|---|
__namedParameters |
Object |
__namedParameters.matchID |
string |
Returns
Promise
<APIResponse
<Match
>>
Information about the match
Defined in
getMatches
▸ getMatches(__namedParameters
): Promise
<APIResponse
<V3MatchesResponse
>>
Gets the most recent 5 matches by a players Riot ID
Remarks
Returns:
- Info about most recent 5 matches including:
- Metadata info about the match such as length, time, map, score, etc
- Information about every player including their PUUID, Riot ID, kills, ability usage, etc
- Information about every round in the match such as plant/defuse info, etc
- Information about every kill in the game including killer, victim, assist, etc
Throws
TypeError - Only if the size parameter is set and not between 1-10
Parameters
Name | Type |
---|---|
__namedParameters |
Object |
__namedParameters.gamemodeFilter? |
Mode |
__namedParameters.mapFilter? |
ValorantMap |
__namedParameters.name |
string |
__namedParameters.region |
Region |
__namedParameters.size? |
number |
__namedParameters.tag |
string |
Returns
Promise
<APIResponse
<V3MatchesResponse
>>
Info about a players last 5 matches
Defined in
getMatchesByPUUID
▸ getMatchesByPUUID(__namedParameters
): Promise
<APIResponse
<V3MatchesResponse
>>
Gets the most recent 5 matches by a players PUUID
Remarks
Returns:
- Info about most recent 5 matches including:
- Metadata info about the match such as length, time, map, score, etc
- Information about every player including their PUUID, Riot ID, kills, ability usage, etc
- Information about every round in the match such as plant/defuse info, etc
- Information about every kill in the game including killer, victim, assist, etc
Throws
TypeError - Only if the size parameter is set and not between 1-10
Parameters
Name | Type |
---|---|
__namedParameters |
Object |
__namedParameters.gamemodeFilter? |
Mode |
__namedParameters.mapFilter? |
ValorantMap |
__namedParameters.puuid |
string |
__namedParameters.region |
Region |
__namedParameters.size? |
number |
Returns
Promise
<APIResponse
<V3MatchesResponse
>>
Info about a players last 5 matches
Defined in
getOffers
▸ getOffers(): Promise
<APIResponse
<V1StoreOffersResponse
>>
Get a list of all the prices of every skin in the game
Returns
Promise
<APIResponse
<V1StoreOffersResponse
>>
List of skin prices
Defined in
getRawCompetitiveUpdates
▸ getRawCompetitiveUpdates(__namedParameters
): Promise
<APIResponse
<RawCompetitiveUpdatesResponse
>>
Gets raw data for a players competitive updates (rr changes) from the valorant API. (Not formatted, use only if you know what you are doing)
See
getMMRHistory for an easier response to use
Parameters
Name | Type |
---|---|
__namedParameters |
Object |
__namedParameters.puuid |
string |
__namedParameters.queries? |
any |
__namedParameters.region |
Region |
Returns
Promise
<APIResponse
<RawCompetitiveUpdatesResponse
>>
Information about the players rr history
Defined in
getRawData
▸ getRawData<T
>(__namedParameters
): Promise
<APIResponse
<RawResponse
<T
>>>
Gets raw data from the valorant API. (Not formatted, use only if you know what you are doing)
Depreciated
Use getRawCompetitiveUpdates getRawMatchDetails getRawMatchHistory getRawMMR instead
Type parameters
Name | Type |
---|---|
T |
extends "matchdetails" | "matchhistory" | "mmr" | "competitiveupdates" |
Parameters
Name | Type |
---|---|
__namedParameters |
Object |
__namedParameters.queries |
any |
__namedParameters.region |
Region |
__namedParameters.type |
T |
__namedParameters.value |
string |
Returns
Promise
<APIResponse
<RawResponse
<T
>>>
Either match details, a users patch history, a users mmr, or a users past rr changes
Defined in
getRawMMR
▸ getRawMMR(__namedParameters
): Promise
<APIResponse
<RawMMRResponse
>>
Gets raw data for a players mmr from the valorant API. (Not formatted, use only if you know what you are doing)
See
getMMR for an easier response to use
Parameters
Name | Type |
---|---|
__namedParameters |
Object |
__namedParameters.puuid |
string |
__namedParameters.queries? |
any |
__namedParameters.region |
Region |
Returns
Promise
<APIResponse
<RawMMRResponse
>>
Information about the players mmr
Defined in
getRawMatchDetails
▸ getRawMatchDetails(__namedParameters
): Promise
<APIResponse
<RawMatchDetailsResponse
>>
Gets raw data for a match from the valorant API. (Not formatted, use only if you know what you are doing)
See
getMatch for an easier response to use
Parameters
Name | Type |
---|---|
__namedParameters |
Object |
__namedParameters.matchID |
string |
__namedParameters.queries? |
any |
__namedParameters.region |
Region |
Returns
Promise
<APIResponse
<RawMatchDetailsResponse
>>
Information about the match
Defined in
getRawMatchHistory
▸ getRawMatchHistory(__namedParameters
): Promise
<APIResponse
<RawMatchHistoryResponse
>>
Gets raw data for a players match history from the valorant API. (Not formatted, use only if you know what you are doing)
See
getMatches for an easier response to use
Parameters
Name | Type |
---|---|
__namedParameters |
Object |
__namedParameters.puuid |
string |
__namedParameters.queries? |
any |
__namedParameters.region |
Region |
Returns
Promise
<APIResponse
<RawMatchHistoryResponse
>>
Information about the players match history
Defined in
getStatus
▸ getStatus(__namedParameters
): Promise
<APIResponse
<V1StatusResponse
>>
Will get information about the current maintenances and incidents about a region
Parameters
Name | Type |
---|---|
__namedParameters |
Object |
__namedParameters.region |
Region |
Returns
Promise
<APIResponse
<V1StatusResponse
>>
Info about undergoing maintenances and incidents in a region of valorant
Defined in
getTranslations
▸ getTranslations(__namedParameters?
): Promise
<APIResponse
<V1ContentResponse
>>
Get all translations for every character, skin, map, ability, spray, charm, player card, player title, and more in the game
Parameters
Name | Type |
---|---|
__namedParameters |
Object |
__namedParameters.locale? |
Locale |
Returns
Promise
<APIResponse
<V1ContentResponse
>>
Defined in
getVersion
▸ getVersion(__namedParameters
): Promise
<APIResponse
<V1VersionResponse
>>
Get information about valorant in a region, such as the client version, branch, and server version
Parameters
Name | Type |
---|---|
__namedParameters |
Object |
__namedParameters.region |
Region |
Returns
Promise
<APIResponse
<V1VersionResponse
>>
Information about a regions valorant
Defined in
getWebsite
▸ getWebsite(__namedParameters
): Promise
<APIResponse
<V1WebsiteResponse
>>
Get all announcements from the valorant website of a country
Depreciated
Use getAnnouncements instead
Parameters
Name | Type |
---|---|
__namedParameters |
Object |
__namedParameters.countryCode |
"en-us" | "en-gb" | "de-de" | "es-es" | "es-mx" | "fr-fr" | "it-it" | "ja-jp" | "ko-kr" | "pt-br" | "ru-ru" | "tr-tr" | "vi-vn" |
Returns
Promise
<APIResponse
<V1WebsiteResponse
>>
List of announcements from the valorant website
Defined in
initUtils
▸ initUtils(): Promise
<void
>
Creates rankImages and mapImages by pulling the images from https://valorant-api.com
Remarks
Must be called before using rankImages and mapImages
Returns
Promise
<void
>