Building a Deterministic PPR, Half-PPR & Standard Fantasy Football Scoring Engine
Use OpenPigskin's /v1/games/{id}/fantasy-points endpoint, published scoring weights, raw stat counts and cross-platform IDs to build auditable NFL fantasy apps.
Why opaque fantasy points erode user trust
Every fantasy football commissioner has fielded the same Sunday-night complaint: why does our app show 17.6 points for a quarterback when another platform shows 19.6? When an API returns a single pre-baked fantasy_points float without exposing the underlying weights or stat counts, your users cannot verify how interceptions, lost fumbles, sacks or two-point conversions were scored.
OpenPigskin's GET /v1/games/{id}/fantasy-points endpoint (Developer plan and above) computes every player's score deterministically from official play-by-play box scores — excluding nullified no_play penalties — and embeds the exact scoring table inside meta.rules alongside every player's category breakdown and raw stat counts.
Exact published weights for PPR, Half-PPR and Standard
Pass ?ruleset=ppr (the default), ?ruleset=half_ppr or ?ruleset=standard. All three rulesets share identical yardage, touchdown, turnover and kicking weights and differ strictly on points per reception (1.0 for PPR, 0.5 for Half-PPR and 0 for Standard):
Passing: 0.04 per passing yard, 4 per passing TD, -2 per interception. Rushing: 0.1 per rushing yard, 6 per rushing TD. Receiving: 1 / 0.5 / 0 per reception, 0.1 per receiving yard, 6 per receiving TD. Kicking: 3 per field goal made, 1 per extra point made. Misc: -2 per fumble lost, 2 per two-point conversion. Each sub-category is rounded to two decimal places before summing so floating-point drift never appears in your UI.
curl "https://openpigskinapi.com/v1/games/game_nfl_2025_22_SEA_NE/fantasy-points?ruleset=ppr" \
-H "Authorization: Bearer op_live_YOUR_KEY"
curl "https://openpigskinapi.com/v1/games/game_nfl_2025_22_SEA_NE/fantasy-points?ruleset=half_ppr" \
-H "Authorization: Bearer op_live_YOUR_KEY"
curl "https://openpigskinapi.com/v1/games/game_nfl_2025_22_SEA_NE/fantasy-points?ruleset=standard" \
-H "Authorization: Bearer op_live_YOUR_KEY"How PPR vs. Half-PPR vs. Standard shifts real Super Bowl LX rankings
Running all three rulesets against Super Bowl LX (game_nfl_2025_22_SEA_NE, Seattle 29, New England 13) shows why exposing raw stats alongside points matters. Kenneth Walker III (player_nfl_00-0038134) led the game in all three formats with 27 rushes for 135 yards and 2 catches for 26 yards: 18.1 PPR, 17.1 Half-PPR and 16.1 Standard.
Behind him, reception volume reshuffled the leaderboard dramatically. Mack Hollins (4 receptions, 78 yards, 1 TD) finished second in PPR at 17.8 (15.8 Half-PPR, 13.8 Standard), while Drake Maye (27/44 for 295 yards, 2 TDs, 2 INTs, 38 rushing yards and 1 lost fumble) scored 17.6 across every format (15.8 passing + 3.8 rushing - 2.0 misc), overtaking Hollins in Half-PPR and Standard. Rhamondre Stevenson's 5 catches swung him from 17.3 PPR down to 12.3 Standard, Cooper Kupp's 6-for-61 line moved from 12.1 PPR to 6.1 Standard, and kicker Jason Myers went 5/5 on field goals and 2/2 on extra points for 17.0 in every format.
{
"data": [
{
"player_id": "player_nfl_00-0038134",
"name": "Kenneth Walker III",
"position": "RB",
"team": "SEA",
"team_id": "team_nfl_sea",
"points": 18.1,
"breakdown": { "passing": 0, "rushing": 13.5, "receiving": 4.6, "kicking": 0, "misc": 0 },
"stats": {
"pass_cmp": 0, "pass_att": 0, "pass_yds": 0, "pass_td": 0, "int": 0,
"rush_att": 27, "rush_yds": 135, "rush_td": 0,
"targets": 4, "rec": 2, "rec_yds": 26, "rec_td": 0,
"fumbles_lost": 0, "two_pt": 0, "fg_made": 0, "xp_made": 0
}
},
{
"player_id": "player_nfl_00-0039851",
"name": "Drake Maye",
"position": "QB",
"team": "NE",
"team_id": "team_nfl_ne",
"points": 17.6,
"breakdown": { "passing": 15.8, "rushing": 3.8, "receiving": 0, "kicking": 0, "misc": -2 },
"stats": {
"pass_cmp": 27, "pass_att": 44, "pass_yds": 295, "pass_td": 2, "int": 2,
"rush_att": 4, "rush_yds": 38, "rush_td": 0,
"targets": 0, "rec": 0, "rec_yds": 0, "rec_td": 0,
"fumbles_lost": 1, "two_pt": 0, "fg_made": 0, "xp_made": 0
}
}
],
"meta": {
"game_id": "game_nfl_2025_22_SEA_NE",
"ruleset": "ppr",
"rules": {
"passing_yard": 0.04, "passing_td": 4, "interception": -2,
"rushing_yard": 0.1, "rushing_td": 6,
"reception": 1, "receiving_yard": 0.1, "receiving_td": 6,
"fumble_lost": -2, "two_point_conversion": 2,
"field_goal_made": 3, "extra_point_made": 1
},
"source": "nflverse",
"licence": "CC BY 4.0"
}
}Support custom league rules (6-pt pass TD, TE premium) from the same response
Because every row in /v1/games/{id}/fantasy-points includes the raw stats object and position, supporting custom dynasty or best-ball scoring (such as 6-point passing touchdowns, -1 interceptions or 1.5 PPR tight-end premium) takes a pure function on the client or server without making extra API calls.
type FantasyRow = {
player_id: string;
name: string;
position: string | null;
stats: {
pass_yds: number; pass_td: number; int: number;
rush_yds: number; rush_td: number;
rec: number; rec_yds: number; rec_td: number;
fumbles_lost: number; two_pt: number;
fg_made: number; xp_made: number;
};
};
export function scoreTePremiumSixPtPass(row: FantasyRow): number {
const s = row.stats;
const recWeight = row.position === "TE" ? 1.5 : 1.0;
const total =
s.pass_yds * 0.04 +
s.pass_td * 6 +
s.int * -2 +
s.rush_yds * 0.1 +
s.rush_td * 6 +
s.rec * recWeight +
s.rec_yds * 0.1 +
s.rec_td * 6 +
s.fumbles_lost * -2 +
s.two_pt * 2 +
s.fg_made * 3 +
s.xp_made * 1;
return Math.round(total * 100) / 100;
}Season leaderboards, stat corrections and roster joins
For full-season fantasy rankings, pair per-game scoring with GET /v1/seasons/{id}/leaders?category=fantasy_ppr (available on the Starter plan), which aggregates regular-season PPR totals across every qualified player.
When the NFL issues official mid-week stat corrections and nflverse publishes an updated play-by-play file, re-fetching /v1/games/{id}/fantasy-points recomputes deterministic totals straight from the corrected snap ledger. Because every player row carries a canonical player_nfl_* ID backed by the Sleeper/ESPN/Yahoo crosswalk, your league database can upsert corrected weekly scores idempotently without duplicate rows.