Sleeper, ESPN and Yahoo fantasy APIs: what they include and what they don't
Quick answer: Sleeper's and Yahoo's APIs are built for league data: leagues, rosters, matchups and transactions. Sleeper's documented API has no projections or stats endpoint; Yahoo's documents player stats and team-level projected points inside matchups. ESPN has published no public developer API since 2014. None of them document player projections by week with snap share, actual-vs-projected deviations, an injury-change feed or prop probabilities. GridIron Data adds those, and its rows carry an ESPN athlete id you can join to Sleeper's player map.
- Sleeper API
- Read-only
- Yahoo API
- OAuth 2.0
- ESPN public API
- Retired 2014
- Join key
- ESPN id
What does each platform API cover?
| Sleeper | Yahoo | ESPN | GridIron Data | |
|---|---|---|---|---|
| Official public docs | Yes | Yes, access by application | No (public API retired 2014) | Yes, plus OpenAPI spec |
| Auth | None | OAuth 2.0 | — | x-api-key header |
| Leagues, rosters, matchups | Yes | Yes | — | No (bring your league) |
| Write (lineups, add/drop) | No, read-only | Yes | — | No |
| Player weekly projections | Not documented | Team totals in matchups only | — | Yes, PPR, half and standard |
| Player stats | Not documented | Yes | — | Yes, 2020 to now |
| Snap share, deviations | No | No | — | Yes (Basic) |
| Injury change feed, webhooks | Not documented | Not documented | — | Yes (Pro) |
| Prop probabilities, betting lines | No | No | — | Yes (Pro) |
| Price | Free for non-commercial use | Not listed; access by application | — | Free plan; Basic $45/year |
"Not documented" means the platform's official docs don't list it. Some apps call undocumented endpoints, which can change without notice.
Sleeper API
Sleeper's API is read-only, needs no token, and is free for non-commercial use; commercial use needs a license from Sleeper. Its docs ask you to stay under 1,000 calls a minute. It returns users, leagues, rosters, weekly matchups, transactions, drafts, a trending adds/drops list and a full NFL player map, which the docs ask you to fetch at most once a day.
The documented API has no projections or stats endpoint. Its player map does carry other services' ids, including espn_id, which is how you join it to GridIron below.
Yahoo Fantasy Sports API
Yahoo's API uses OAuth 2.0, and access now starts with an application that Yahoo reviews. It covers games, leagues, teams, rosters, players, transactions and users, and it can write: set lineups, add and drop players, and propose trades. Player resources include stats and ownership. Projections appear as a team's projected points inside a matchup; the docs list no player-level projection resource. Yahoo asks apps to credit "Fantasy data provided by Yahoo Fantasy".
ESPN
ESPN stopped issuing public API keys in 2014 and has no public developer docs today. Tools that read ESPN leagues rely on undocumented endpoints that can change without notice. GridIron rows carry espn_player_id, and /players?espn_id= looks a player up by it, so ESPN athlete ids still work as a join key.
How do I add projections to a Sleeper league?
Read the roster from Sleeper, map each Sleeper player id to its espn_id, and match it to espn_player_id on GridIron's projections. Five GridIron requests cover every rostered player, so this runs on the free plan for the current week.
import os
import requests
GI = "https://api.gridirondata.com/api/v1"
gi = requests.Session()
gi.headers["x-api-key"] = os.environ["GRIDIRON_API_KEY"]
LEAGUE_ID = "123456789012345678" # your Sleeper league id
WEEK = 8
# 1. Sleeper: rosters and the player map (call /players/nfl at most once a day; cache it).
rosters = requests.get(f"https://api.sleeper.app/v1/league/{LEAGUE_ID}/rosters", timeout=10).json()
sleeper_players = requests.get("https://api.sleeper.app/v1/players/nfl", timeout=60).json()
# 2. GridIron: one projections call per position, keyed by ESPN athlete id.
by_espn = {}
for pos in ("QB", "RB", "WR", "TE", "K"):
r = gi.get(f"{GI}/projections/{WEEK}", params={"position": pos}, timeout=10)
r.raise_for_status()
for row in r.json()["projections"]:
if row.get("espn_player_id"):
by_espn[str(row["espn_player_id"])] = row
# 3. Join each rostered player on espn_id.
for roster in rosters:
for sleeper_id in roster["players"] or []:
p = sleeper_players.get(sleeper_id, {})
row = by_espn.get(str(p.get("espn_id") or ""))
if row:
print(roster["roster_id"], row["player_name"], row["projected_points"], row["injury_status"])
Some players in Sleeper's map have an empty espn_id; for those, fall back to name and position with /players?name=&position=. GridIron player ids look like CeeDee Lamb#WR.
A GridIron projections row looks like this:
{
"player_id": "Josh Allen#QB",
"player_name": "Josh Allen",
"position": "QB",
"team": "BUF",
"week": "8",
"projected_points": 24.5,
"espn_player_id": 3918298,
"injury_status": "ACTIVE",
"available": true
}
What does GridIron add on top of league data?
- Free: player lookups and this week's projections.
- Basic, $45 a year: every week and season, actuals from 2020, snap share (
/snaps), actual-vs-projected deviations (/deviations), matchup history, news, rest-of-season projections, the schedule and byes. - Pro, $29 a month: an injury changes feed (
/injuries/changes) and signed webhooks, prop probabilities (/props), defense vs position, betting lines and per-stat projections.
Frequently asked questions
Does the Sleeper API have projections?
Not in its documented API. Sleeper's official docs cover users, leagues, rosters, matchups, transactions, drafts, trending players and a player map, with no projections or stats endpoint.
Is there an official ESPN fantasy football API?
ESPN retired its public API in 2014 and publishes no developer docs today. Tools that read ESPN leagues use undocumented endpoints.
How do I match GridIron players to Sleeper players?
Sleeper's player map includes an espn_id for most players, and every GridIron projections row and player record carries espn_player_id. Join on that, and fall back to name and position when espn_id is empty.
Can GridIron set my lineup or make waiver claims?
No. GridIron is a read-only data API. Use your platform for league actions; Yahoo's API supports lineup and transaction writes, Sleeper's is read-only.