API Doc

How To Use

You can use the public-facing Valorant Strat Roulette API to retrieve strats and use them in Twitch chat, with Nightbot or other streaming service chatbots, Discord or IRC bots, and even embed them in other webpages.

Examples:

https://api.diah.info/valorant/roulette.php?map=bind&side=atk
Request for a strat appropriate for the Attackers side of Bind
https://api.diah.info/valorant/roulette.php?agents=sage,breach,reyna,phoenix,sova&player=Carlos
Request for a strat appropriate for Carlos and his four one-tricking squadmates.
https://api.diah.info/valorant/roulette.php?id=69&format=json
Request for a JSON-encoded description of a specific strat. Nice.

API Reference

By default, the Strat Roulette API only returns strats that are applicable to all scenarios -- any map, any hero, and any side. Parameters can be added to the query to enable the selection of strats tailored to specific situations.

Selectors

QueryUsageLegal valuesExample
cid Select a strat based on its ID. Note: this overrides all other selectors. You WILL get the strat you requested via its ID. Integers > 0 roulette.php?cid=12
side Enable the selection of strats associated with attacking or defending. If side is not specified or left blank, only strats appropriate for both attacking and defending will be selected. 'any', 'atk', and 'def' roulette.php?side=atk
agents Enable the selection of strats associated with specific agents. If agents is not specified or left blank, only strats appropriate for all agents will be selected. Agent names, case insensitive: 'jett', 'Cypher', and 'OmEn' are all valid. Multiple names may separated by commas (,) and up to the first 5 will be used. roulette.php?agents=brimstoneORroulette.php?agents=jett,raze,viper
map Enable the selection of strats associated with specific maps. If side is not specified or left blank, only strats appropriate for all maps will be selected. Map names, case insensitive: 'haven', 'Ascent', and 'SpLiT' are all valid. Multiple map names may separated by commas (,) but how much sense does that really make? roulette.php?map=bind

Also by default, the Strat Roulette API returns only the text of the strat itself (unlike the website, which gives the strat name, difficulty, and scoring). Options for tweaking the format of the response are given below.

Formatters

QueryUsageLegal valuesExample
player Overrides the instruction to "choose a player at random" for strats that single an agent out. For example, given the value mike, a strat might specify Mike must buy 8 classics and arrange them in a circle. Any URI-safe string. Useful values might include streamer names, agent names ('Sage'), and specifiers like 'top frag' or 'richest player'. roulette.php?player=MariaORroulette.php?player=Chuck%20E%20Cheese
showid If true, includes the strat ID number in the response. For example, 69. All players must constantly say 'nice' in a sleazy voice. true or 1 to enable. roulette.php?showid=true
showname If true, includes the strat's name in the response. For example, The Legal Department - All callouts must be made in triplicate. true or 1 to enable. roulette.php?showname=true
format If set to json, the response will be returned as type application/json instead of text/plain. The showid and showname formatters will be ignored. See next section for more info. json roulette.php?format=json

JSON Mode

By including the query format=json in an API request, you can retrieve a strat encoded as a JSON object. JSON-encoded strats contain ALL related information, including information not available in plain text such as difficulty and scoring.

The JSON object format


{
    "cid" : "911",
    "name" : "The Swift Response",
    "description" : "Players must dial Emergency Services and remain in spawn until the call is answered.",
    "scoring" : "2 points for each player charged with a misdemeanor.",
    "difficulty" : "11",
    "side" : "atk"
}