NFL Fantasy x402 API
Pay-per-call NFL/fantasy analytics for AI agents. Payment via x402 (USDC on Base) — no accounts, no API keys.
Endpoints
| Endpoint | Price | Description | Params |
|---|---|---|---|
GET /api/player/stats | $0.01 | Weekly or season fantasy stats (2015-2025) scored to any custom scoring config. | player_id | name, seasons, weeks, season_type, preset, scoring, agg |
GET /api/player/usage | $0.02 | Usage/opportunity metrics (target share, WOPR, NGS) with last-N-week trend deltas. | player_id | name, season, last_n |
GET /api/meta/scoring-presets | FREE | Inspect available scoring presets before paying for a scored endpoint. | (none) |
GET /api/meta/health | FREE | Row count, latest season/week, uptime — for monitoring service health. | (none) |
POST /api/draft/value-board | $0.10 | Draft value board ranked by marginal value to YOUR roster (not BPA), with survival-weighted urgency. | league (required), scoring, my_roster, drafted, pick, adp, projections, bench_weights, candidates |
GET /api/meta/data-sources | FREE | Orchestration manual: where to fetch ADP/projections yourself and how to submit them to the value board. | (none) |
Try it — curl (unpaid, shows the 402 payment requirements)
curl -i "https://nfl-x402-api.vercel.app/api/player/stats?name=Ja'Marr+Chase&seasons=2024&weeks=1-4"
Try it — paid request (x402-fetch)
import { wrapFetchWithPaymentFromConfig } from "@x402/fetch";
import { ExactEvmScheme } from "@x402/evm";
import { privateKeyToAccount } from "viem/accounts";
const account = privateKeyToAccount(process.env.EVM_PRIVATE_KEY);
const fetchWithPayment = wrapFetchWithPaymentFromConfig(fetch, {
schemes: [{ network: "eip155:8453", client: new ExactEvmScheme(account) }],
});
const res = await fetchWithPayment(
"https://nfl-x402-api.vercel.app/api/player/stats?name=Ja'Marr+Chase&seasons=2024&weeks=1-4"
);
console.log(await res.json());Custom scoring example
?name=Justin+Fields&seasons=2024&preset=ppr&scoring={"pass_td":6,"rec":0.5,"bonus_rush_100":3}Draft value board
Ranks draft candidates by marginal value to your specific roster — not best-player-available. Two-call recipe:
1. GET https://nfl-x402-api.vercel.app/api/meta/data-sources (free — where to fetch ADP/projections yourself) 2. Fetch ADP (and optionally projections) from a listed source under your own access. 3. POST the raw responses to /api/draft/value-board with adp_format/projections_format set.
curl -i -X POST "https://nfl-x402-api.vercel.app/api/draft/value-board" \
-H "content-type: application/json" \
-d '{"league":{"teams":12,"roster":{"QB":1,"RB":2,"WR":2,"TE":1,"K":1,"DEF":1}}}'import { wrapFetchWithPaymentFromConfig } from "@x402/fetch";
import { ExactEvmScheme } from "@x402/evm";
import { privateKeyToAccount } from "viem/accounts";
const account = privateKeyToAccount(process.env.EVM_PRIVATE_KEY);
const fetchWithPayment = wrapFetchWithPaymentFromConfig(fetch, {
schemes: [{ network: "eip155:8453", client: new ExactEvmScheme(account) }],
});
const res = await fetchWithPayment("https://nfl-x402-api.vercel.app/api/draft/value-board", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({
league: { teams: 12, roster: { QB: 1, RB: 2, WR: 2, TE: 1, K: 1, DEF: 1 } },
my_roster: ["Ja'Marr Chase"],
pick: { overall: 24 },
}),
});
console.log(await res.json());Data derived from nflverse (CC BY 4.0). Modified for scoring/aggregation. See llms.txt for the agent-readable summary.