Eight fictional basketball teams with rosters, per-game stats, a scoreboard, live games advanced quarter by quarter, play-by-play, standings and leaders — for polling, caching and filtering practice.
Base URL: https://funapi.dev/api/basketball-league/v1 · 11 endpoints · OpenAPI 3.1 spec and Postman collection available. New here? Read the getting started guide.
teams and rosters
GET /basketball-league/v1/teams — List the 8 teams · Responds with 200 Link to this endpointGET /basketball-league/v1/teams/{id} — One team with its record · Responds with 200 404 Link to this endpointGET /basketball-league/v1/teams/{id}/roster — A team's roster with season stats · Responds with 200 404 Link to this endpointplayers and stats
GET /basketball-league/v1/players — Search and page through players · Responds with 200 400 Link to this endpointGET /basketball-league/v1/players/{id} — One player and their season stats · Responds with 200 404 Link to this endpointscoreboard and live games
GET /basketball-league/v1/games — Scoreboard: filter by week, team or status · Responds with 200 400 Link to this endpointGET /basketball-league/v1/games/{id} — One game — ETag changes when the score does; poll with If-None-Match for 304 · Responds with 200 304 404 Link to this endpointGET /basketball-league/v1/games/{id}/plays — Play-by-play; pass after=<last id> to read only new plays · Responds with 200 404 Link to this endpointPOST /basketball-league/v1/games/{id}/advance — Play the next quarter of a game (admin) — then watch the ETag change (requires Bearer auth) · Responds with 200 401 403 404 409 422 Link to this endpointstandings and leaders
GET /basketball-league/v1/standings — Standings computed from final games · Responds with 200 Link to this endpointGET /basketball-league/v1/leaders — Stat leaders · Responds with 200 400 Link to this endpointThe Pro Basketball API models a fictional league with eight teams, per-game player averages, a scoreboard, quarter-by-quarter scoring and leaders for points, rebounds, assists and field-goal percentage. It is built for the tests sports and fantasy apps actually need: filters that must combine correctly, leaderboards that must sort the right way, and a live game whose data changes underneath the client.
GET https://funapi.dev/api/basketball-league/v1/teams — List the 8 teams. No token, no signup:
curl -i https://funapi.dev/api/basketball-league/v1/teams
Response: 200 OK
{
"league": "Fun Pro Basketball League",
"data": [
{
"id": 1,
"city": "Lakeshore",
"name": "Herons",
"fullName": "Lakeshore Herons",
"abbreviation": "LKH",
"conference": "East",
"venue": "Lakeshore Stadium"
},
{
"id": 2,
"city": "Granite City",
"name": "Rockets",
"fullName": "Granite City Rockets",
"abbreviation": "GCR",
"conference": "East",
"venue": "Granite City Arena"
},
{
"id": 3,
"city": "Port Elm",
"name": "Tides",
"fullName": "Port Elm Tides",
"abbreviation": "PET",
"conference": "East",
"venue": "Port Elm Park"
},
{
"id": 4,
"city": "Northgate",
"name": "Owls",
"fullName": "Northgate Owls",
"abbreviation": "NGO",
"conference": "East",
"venue": "Northgate Field"
},
{
"id": 5,
"city": "Copper Canyon",
"name": "Suns",
"fullName": "Copper Canyon Suns",
"abbreviation": "CCS",
"conference": "West",
"venue": "Copper Canyon Stadium"
(truncated — the full response comes back when you run it)
How these leagues differ from balldontlie
Last updated