ValorantAPI is a wrapper library for the unofficial Valorant API. It provides easy-to-use methods to interact with various endpoints of the Valorant API.
npm install @ivanoliverfabra/valorant-api
pnpm add @ivanoliverfabra/valorant-api
yarn add @ivanoliverfabra/valorant-api
bun add @ivanoliverfabra/valorant-api
import ValorantAPI from "@ivanoliverfabra/valorant-api";
const api = new ValorantAPI({ apiKey: "HDEV-..." });
const api = new ValorantAPI(); // If you set the environment variable HDEV_API_KEY
fetchGameData
generateCrosshairImage
getAccountDataV1
getAccountDataV2
getLeaderboardV1
getLeaderboardV3
getMatchDetailsV2
getMatchDetailsV4
getMatchHistoryV3
getMatchHistoryV4
getMMRDataV2
getMMRDataV3
getMMRHistoryV1
getPremierConferences
getPremierLeaderboard
getPremierSeasonsV1
getPremierTeamDetailsV1
getPremierTeamHistoryV1
searchPremierTeamsV1
getQueueStatus
getRegionStatusV1
getStoredMatchesV1
getStoreFeaturedV1
getStoreFeaturedV2
getStoreOffersV1
getStoreOffersV2
getUpcomingMatches
getValorantVersionV1
import ValorantAPI from "@ivanoliverfabra/valorant-api";
const apiKey = "HDEV-..."; // Optional if you set the environment variable HDEV_API_KEY
const api = new ValorantAPI({ apiKey });
const data = await api.accounts.v1.byName("fabra", "olivr"); // With Name and Tag
const data = await api.accounts.v1.byPuuid(
"79bed427-e691-573d-9bc1-046d8f817de8"
); // With PUUID
import { getAccountDataV1 } from "@ivanoliverfabra/valorant-api";
import { getAccountDataV1 } from "@ivanoliverfabra/valorant-api/test"; // Recieve mock data
const apiKey = "HDEV-..."; // Optional if you set the environment variable HDEV_API_KEY
const data = await getAccountDataV1("fabra", "olivr", apiKey); // With Name and Tag
const data = await getAccountDataV1(
"79bed427-e691-573d-9bc1-046d8f817de8",
apiKey
); // With PUUID
HDEV_API_KEY=YOUR_API_KEY
If you set the environment variable HDEV_API_KEY
to your API key, you can use the library without passing the API key as a parameter to the functions.