Riftcast Developer API
League of Legends esports data and machine-learning match predictions over a simple REST API. List teams, players and tournaments, pull detailed stats, and get calibrated win probabilities with expected value — the same models that power riftcast.gg.
Get an API key →You'll need a free Riftcast account to generate a key — create one or sign in, then open the Developer API tab on your account page.
Base URL
https://riftcast.gg/v1
All responses are JSON. Every charged response includes an
X-Credits-Remaining header.
Authentication
Pass your key on every request, via either header:
Authorization: Bearer YOUR_KEY # or X-Api-Key: YOUR_KEY
Create and manage keys, and see your balance, on your account page. A key is shown only once at creation. Every account gets 20 free credits per month — claim them, or subscribe to a credit plan / top up, on your account page.
Credits & cost
Calls are billed from a prepaid credit pool shared across all your keys. Discovery and usage calls are free; data and predictions cost credits:
| Call | Cost |
|---|---|
Discovery lists & /usage | Free |
| Stats detail (team / player / tournament) | 1 credit |
| Prediction — FastTree | 2 credits |
| Prediction — LightGBM or PCA Sweep | 5 credits |
| Prediction — Consensus (all 3 models + blend) | 10 credits |
Failed calls are never charged: a 404 (unknown id),
400 (bad request) or 500 (prediction error) costs nothing.
When your balance is too low you get 402 Payment Required —
top up and retry.
Every account gets 20 free credits per month. For more, subscribe to a credit plan (best value per credit) or buy one-time top-ups on your account page.
Fair use: credits are per account. Creating multiple accounts to farm the free allowance isn't allowed — using the API from more than one account on the same IP address will get those accounts banned.
Discovery free
Fetch the valid IDs to use in stats and prediction calls. These change rarely — cache them.
- GET
/v1/teams— all teams (id, name, region, logo) - GET
/v1/players— all players (id, name, role, team) - GET
/v1/champions— all champions - GET
/v1/tournaments— all tournaments
curl https://riftcast.gg/v1/teams -H "Authorization: Bearer YOUR_KEY"
{
"count": 420,
"teams": [
{ "id": 279, "name": "100 Thieves", "region": null, "logoUrl": "https://..." },
...
]
}Stats 1 credit
- GET
/v1/teams/{id}— record, win rate, GPM, side win rates, champion pool - GET
/v1/players/{id}— KDA, CS/min, gold share, kill participation, champion pool - GET
/v1/tournaments/{id}— side win rates, first-objective rates, leaders
curl https://riftcast.gg/v1/teams/279 -H "Authorization: Bearer YOUR_KEY"
{
"id": 279,
"name": "100 Thieves",
"record": "5W - 1L",
"winRate": 83.3,
"stats": { "gpm": 2000, "csPerMin": 32.2, "kda": 5.68, ... },
"sideWinRate": { "blue": 1.0, "red": 0.75 },
"championPool": [ ... ]
}Predictions
Win probabilities for any matchup. Provide team IDs (from
/v1/teams) — names also work but IDs are unambiguous. Optionally pass
decimal oddsBlue / oddsRed to get expected value (EV) back.
POST /v1/predict
| Field | Type | Notes |
|---|---|---|
blueTeamId / redTeamId | int | Required (or blueTeam / redTeam names) |
model | string | fasttree · lightgbm · pcasweep · consensus |
oddsBlue / oddsRed | number | Optional decimal odds → EV in response |
curl -X POST https://riftcast.gg/v1/predict \
-H "Authorization: Bearer YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"blueTeamId":279,"redTeamId":110,"oddsBlue":2.0,"oddsRed":1.8,"model":"consensus"}'
{
"blueTeam": { "id": 279, "name": "100 Thieves" },
"redTeam": { "id": 110, "name": "3BL Esports" },
"model": "consensus",
"blueWinProbability": 0.8105,
"redWinProbability": 0.1895,
"winner": "blue",
"odds": { "blue": 2.0, "red": 1.8, "blueEv": 0.621, "redEv": -0.659 },
"models": [
{ "model": "fasttree", "blueWinProbability": 0.79, "redWinProbability": 0.21, "winner": "blue" },
{ "model": "lightgbm", "blueWinProbability": 0.83, "redWinProbability": 0.17, "winner": "blue" },
{ "model": "pcasweep", "blueWinProbability": 0.81, "redWinProbability": 0.19, "winner": "blue" }
]
}
A consensus call runs all three base models and returns them in
models alongside the blended top-level probability — one call, the full picture.
POST /v1/predict-draft
As /v1/predict, plus bluePicks and redPicks —
lists of { "role": "TOP", "champion": "Aatrox" } (roles: TOP, JUNGLE, MID,
BOT, SUPPORT). Champion names come from /v1/champions.
Errors
Errors are JSON: { "error": "code", "message": "..." }.
| Status | Meaning |
|---|---|
401 | Missing or invalid/revoked key |
402 | Not enough credits — top up |
404 | Unknown id (not charged) |
429 | Rate limit exceeded (120 req/min per key) |
400 | Bad request (not charged) |