Solving the NFL Player ID Nightmare: GSIS, Sleeper, ESPN, Yahoo & PFR in One Lookup
Stop maintaining fragile name-matching scripts between Sleeper, ESPN, Yahoo Fantasy, Pro Football Reference and nflverse GSIS IDs.
Why display-name matching breaks on NFL Sunday
Every major NFL platform assigns its own player primary key: nflverse uses GSIS IDs (such as 00-0033873), Sleeper uses numeric strings (4046), ESPN uses athlete IDs (3139477), Yahoo uses league-wide integers (30123) and Pro Football Reference uses slug codes (MahoPa00).
Joining datasets on player display names fails in production as soon as you encounter suffixes (Kenneth Walker vs. Kenneth Walker III), punctuation (A.J. vs. AJ, D'Andre vs. DAndre), shared names across positions or rookies traded mid-season. Once a silent mismatch slips into a fantasy lineup optimizer or prop model, downstream stats corrupt without throwing an error.
OpenPigskin solves this at ingest time by merging nflverse players.csv with the DynastyProcess db_playerids.csv crosswalk across 24,872 indexed players, anchoring every record to a stable player_nfl_{gsis_id} primary key.
Resolve any external ID directly through /v1/search
You do not need to download a lookup table to resolve a Sleeper, ESPN, Yahoo, PFR, PFF, Rotowire, FantasyPros or MFL ID. OpenPigskin maintains a dedicated player_keys index queried first by GET /v1/search whenever q matches a prefixed external key.
Passing q=sleeper:4046 or q=espn:3139477 returns an exact single match with meta.matched_by set to external_id — available on the free Starter plan as well as every paid tier.
# Sleeper ID -> OpenPigskin player_nfl_* ID
curl "https://openpigskinapi.com/v1/search?q=sleeper:4046&type=player" \
-H "Authorization: Bearer op_live_YOUR_KEY"
# Same player via ESPN athlete ID or PFR slug
curl "https://openpigskinapi.com/v1/search?q=espn:3139477&type=player" \
-H "Authorization: Bearer op_live_YOUR_KEY"
curl "https://openpigskinapi.com/v1/search?q=pfr:MahoPa00&type=player" \
-H "Authorization: Bearer op_live_YOUR_KEY"Inspect the full external_ids map on /v1/players/{id}
Once you have a player_nfl_* ID, GET /v1/players/{id} returns bio fields, draft metadata, season-by-season stats and the complete external_ids object. One call lets you link the same player out to Sleeper, ESPN, Yahoo, Pro Football Reference, PFF, Rotowire, FantasyPros, MFL and NFL.com.
The exact same crosswalk works for newer classes too: Drake Maye resolves as player_nfl_00-0039851 (sleeper: 11564, espn: 4431452, pfr: MayeDr00), and Kenneth Walker III resolves as player_nfl_00-0038134 (sleeper: 8151, espn: 4567048, pfr: WalkKe00).
{
"data": {
"id": "player_nfl_00-0033873",
"gsis_id": "00-0033873",
"name": "Patrick Mahomes",
"position": "QB",
"latest_team": "KC",
"latest_team_id": "team_nfl_kc",
"external_ids": {
"gsis": "00-0033873",
"espn": "3139477",
"pfr": "MahoPa00",
"pff": "11765",
"nfl": "44822",
"sleeper": "4046",
"yahoo": "30123",
"rotowire": "11839",
"fantasypros": "16413",
"mfl": "13116"
}
},
"meta": {
"source": "nflverse",
"licence": "CC BY 4.0"
}
}Sync a Sleeper roster to OpenPigskin IDs with a local cache
Because OpenPigskin player IDs are permanent and never renamed, you only need to resolve each external ID once and persist the mapping in your own database or KV store. The TypeScript helper below resolves a batch of Sleeper roster IDs cleanly, skipping unmapped defense/team slots instead of falling back to risky fuzzy name matching.
type SearchHit = { type: string; id: string; name: string };
export async function resolveSleeperIds(
sleeperIds: string[],
apiKey: string,
cache: Map<string, string | null>,
): Promise<Record<string, string | null>> {
const out: Record<string, string | null> = {};
for (const sleeperId of sleeperIds) {
// Sleeper team defenses use 2-3 letter codes (e.g. "SEA"); players are numeric.
if (!/^[0-9]+$/.test(sleeperId)) {
out[sleeperId] = null;
continue;
}
if (cache.has(sleeperId)) {
out[sleeperId] = cache.get(sleeperId) ?? null;
continue;
}
const url = `https://openpigskinapi.com/v1/search?q=sleeper:${encodeURIComponent(sleeperId)}&type=player`;
const res = await fetch(url, {
headers: { Authorization: `Bearer ${apiKey}` },
});
if (!res.ok) throw new Error(`Lookup failed for sleeper:${sleeperId} (HTTP ${res.status})`);
const json = (await res.json()) as {
data: SearchHit[];
meta: { matched_by?: string };
};
const match = json.meta.matched_by === "external_id" ? json.data[0]?.id ?? null : null;
cache.set(sleeperId, match);
out[sleeperId] = match;
}
return out;
}Canonical franchise and game IDs across live and historical data
Player IDs are only half the join problem. OpenPigskin also normalizes all 32 franchises to stable team_nfl_{abbr} keys (mapping historical OAK to LV, SD to LAC, STL/LAR to LA, WSH to WAS and JAC to JAX) across both nflverse archive endpoints and live ESPN endpoints.
For games, historical records use game_nfl_{nflverse_game_id} (for instance game_nfl_2025_22_SEA_NE) and store their upstream crosswalk inside external_ids (nflverse: 2025_22_SEA_NE, espn: 401772988, pfr: 202602080nwe), making it straightforward to link a Sunday game_espn_401772988 live feed to the postgame nflverse archive.