Stats API

API reference

Stats

Stats are read from the ParlayLedger database and never trigger a fetch from a source. Team and player rows appear once a game has been ingested, usually shortly after it ends.

Every request needs your API key in the X-API-Key header and counts as one call against your monthly quota. See Authentication and Quotas and limits.

List events

GEThttps://api.parlayledger.com/stats/events

The same list as GET /events, except that it returns an empty array while the league is out of season (season status idle).

  • Auth X-API-Key header
  • Quota 1 call per request

Query parameters

  • leagueKeystringrequired

    League key, for example NFL, NCAAF, NBA, WNBA, NCAAB, WNCAAB, NHL, MLB, MLS, EPL or MMA.

  • datestring (YYYY-MM-DD)required

    Calendar day in UTC. Returns events whose startTime falls between 00:00:00 and 23:59:59 UTC that day, earliest first.

Request

curl "https://api.parlayledger.com/stats/events?leagueKey=NBA&date=2026-10-21" \
  -H "X-API-Key: $PARLAYLEDGER_API_KEY"

Response 200 application/json

200 OK
[
  {
    "id": "3f6c2a9e-8d1b-4e7a-9c55-1b2d4e6f8a10",
    "sportKey": "basketball",
    "leagueKey": "NBA",
    "season": "2026",
    "startTime": "2026-10-21T23:30:00.000Z",
    "status": "scheduled",
    "homeTeamId": "c1a9f6e2-4b7d-4e30-9a85-2f6d1b3c7e94",
    "awayTeamId": "9e4b2d7a-6c1f-4a58-b3e0-7d2a5c9f1b68",
    "homeTeamName": "Boston Celtics",
    "awayTeamName": "New York Knicks",
    "displayName": null,
    "stage": null,
    "week": null,
    "venueName": "TD Garden",
    "venueCity": "Boston",
    "meta": null,
    "createdAt": "2026-10-14T06:00:12.381Z",
    "updatedAt": "2026-10-21T06:00:09.114Z"
  }
]

Errors

  • 400leagueKey is required
  • 400date is required (YYYY-MM-DD)
  • 401Valid X-API-Key required
  • 429Monthly API quota exceeded

Get an event

GEThttps://api.parlayledger.com/stats/events/:eventId

One event by its ParlayLedger id.

  • Auth X-API-Key header
  • Quota 1 call per request

Path parameters

  • eventIdstring (UUID)required

    ParlayLedger event id, from GET /events or GET /stats/events.

Request

curl "https://api.parlayledger.com/stats/events/3f6c2a9e-8d1b-4e7a-9c55-1b2d4e6f8a10" \
  -H "X-API-Key: $PARLAYLEDGER_API_KEY"

Response 200 application/json

200 OK
{
  "id": "3f6c2a9e-8d1b-4e7a-9c55-1b2d4e6f8a10",
  "sportKey": "basketball",
  "leagueKey": "NBA",
  "season": "2026",
  "startTime": "2026-10-21T23:30:00.000Z",
  "status": "scheduled",
  "homeTeamId": "c1a9f6e2-4b7d-4e30-9a85-2f6d1b3c7e94",
  "awayTeamId": "9e4b2d7a-6c1f-4a58-b3e0-7d2a5c9f1b68",
  "homeTeamName": "Boston Celtics",
  "awayTeamName": "New York Knicks",
  "displayName": null,
  "stage": null,
  "week": null,
  "venueName": "TD Garden",
  "venueCity": "Boston",
  "meta": null,
  "createdAt": "2026-10-14T06:00:12.381Z",
  "updatedAt": "2026-10-21T06:00:09.114Z"
}

Errors

  • 404Event not found: <eventId>
  • 401Valid X-API-Key required
  • 429Monthly API quota exceeded

Resolve a provider id

GEThttps://api.parlayledger.com/stats/events/resolve/by-ref

Map an upstream provider's event id to the ParlayLedger eventId. eventId is null when there is no match.

  • Auth X-API-Key header
  • Quota 1 call per request

Query parameters

  • providerstringrequired

    Upstream source name, for example collegebasketballdata_ncaab or api_sports_nba.

  • externalIdstringrequired

    The event's id at that provider.

Request

curl "https://api.parlayledger.com/stats/events/resolve/by-ref?provider=collegebasketballdata_ncaab&externalId=12345" \
  -H "X-API-Key: $PARLAYLEDGER_API_KEY"

Response 200 application/json

200 OK
{
  "provider": "collegebasketballdata_ncaab",
  "externalId": "12345",
  "eventId": "3f6c2a9e-8d1b-4e7a-9c55-1b2d4e6f8a10"
}

Errors

  • 400provider is required
  • 400externalId is required
  • 401Valid X-API-Key required
  • 429Monthly API quota exceeded

Team stats

GEThttps://api.parlayledger.com/stats/events/:eventId/team

Box score totals for each team in an event. The keys inside stats depend on the sport and the source. The array is empty until stats are ingested.

  • Auth X-API-Key header
  • Quota 1 call per request

Path parameters

  • eventIdstring (UUID)required

    ParlayLedger event id, from GET /events or GET /stats/events.

Request

curl "https://api.parlayledger.com/stats/events/3f6c2a9e-8d1b-4e7a-9c55-1b2d4e6f8a10/team" \
  -H "X-API-Key: $PARLAYLEDGER_API_KEY"

Response 200 application/json

200 OK
[
  {
    "id": "d8b2e6f1-9c4a-4e37-a1d5-3f7c9e2b4a60",
    "eventId": "3f6c2a9e-8d1b-4e7a-9c55-1b2d4e6f8a10",
    "teamId": "9e4b2d7a-6c1f-4a58-b3e0-7d2a5c9f1b68",
    "provider": "highlightly_nba",
    "externalTeamId": "154",
    "teamName": "New York Knicks",
    "side": "away",
    "points": 105,
    "stats": {
      "points": 105,
      "rebounds": 41,
      "reboundsOffense": 9,
      "reboundsDefense": 32,
      "assists": 22,
      "steals": 7,
      "blocks": 3,
      "turnovers": 14,
      "personalFouls": 20,
      "fgMade": 38,
      "fgAttempts": 86,
      "threePtMade": 12,
      "threePtAttempts": 35,
      "ftMade": 17,
      "ftAttempts": 21
    },
    "createdAt": "2026-10-22T02:41:17.605Z"
  },
  {
    "id": "a3f9c1e7-5b2d-4c86-9e0a-7d4b1f3c6e25",
    "eventId": "3f6c2a9e-8d1b-4e7a-9c55-1b2d4e6f8a10",
    "teamId": "c1a9f6e2-4b7d-4e30-9a85-2f6d1b3c7e94",
    "provider": "highlightly_nba",
    "externalTeamId": "161",
    "teamName": "Boston Celtics",
    "side": "home",
    "points": 112,
    "stats": {
      "points": 112,
      "rebounds": 46,
      "reboundsOffense": 10,
      "reboundsDefense": 36,
      "assists": 27,
      "steals": 8,
      "blocks": 5,
      "turnovers": 12,
      "personalFouls": 18,
      "fgMade": 41,
      "fgAttempts": 88,
      "threePtMade": 16,
      "threePtAttempts": 42,
      "ftMade": 14,
      "ftAttempts": 17
    },
    "createdAt": "2026-10-22T02:41:17.605Z"
  }
]

Errors

  • 401Valid X-API-Key required
  • 429Monthly API quota exceeded

Player stats

GEThttps://api.parlayledger.com/stats/events/:eventId/players

One row per player and stat group, ordered by team, group and player name.

  • Auth X-API-Key header
  • Quota 1 call per request

Path parameters

  • eventIdstring (UUID)required

    ParlayLedger event id, from GET /events or GET /stats/events.

Query parameters

  • teamExternalIdstringoptional

    Only this team's players, by the externalTeamId on the team stats rows.

  • groupNamestringoptional

    Only this stat group, for example Passing or Rushing in the NFL. Sources without groups use All.

Request

curl "https://api.parlayledger.com/stats/events/3f6c2a9e-8d1b-4e7a-9c55-1b2d4e6f8a10/players?teamExternalId=161" \
  -H "X-API-Key: $PARLAYLEDGER_API_KEY"

Response 200 application/json

200 OK
[
  {
    "id": "f4c8a2e6-1d9b-4f53-8a7e-2b6d0c4e8f13",
    "eventId": "3f6c2a9e-8d1b-4e7a-9c55-1b2d4e6f8a10",
    "provider": "highlightly_nba",
    "externalTeamId": "161",
    "teamName": "Boston Celtics",
    "externalPlayerId": "58712",
    "playerName": "Jayson Tatum",
    "playerImage": null,
    "groupName": "All",
    "stats": {
      "minutes": 37,
      "points": 29,
      "rebounds": 9,
      "reboundsOffense": 1,
      "reboundsDefense": 8,
      "assists": 6,
      "steals": 1,
      "blocks": 1,
      "turnovers": 3,
      "personalFouls": 2,
      "fgMade": 10,
      "fgAttempts": 21,
      "threePtMade": 4,
      "threePtAttempts": 10,
      "ftMade": 5,
      "ftAttempts": 6
    },
    "createdAt": "2026-10-22T02:41:17.605Z"
  }
]

Errors

  • 401Valid X-API-Key required
  • 429Monthly API quota exceeded

Team and player stats bundle

GEThttps://api.parlayledger.com/stats/events/:eventId/bundle

Team stats and player stats for an event in one call.

  • Auth X-API-Key header
  • Quota 1 call per request

Path parameters

  • eventIdstring (UUID)required

    ParlayLedger event id, from GET /events or GET /stats/events.

Request

curl "https://api.parlayledger.com/stats/events/3f6c2a9e-8d1b-4e7a-9c55-1b2d4e6f8a10/bundle" \
  -H "X-API-Key: $PARLAYLEDGER_API_KEY"

Response 200 application/json

200 OK
{
  "eventId": "3f6c2a9e-8d1b-4e7a-9c55-1b2d4e6f8a10",
  "teamStats": [
    {
      "id": "d8b2e6f1-9c4a-4e37-a1d5-3f7c9e2b4a60",
      "eventId": "3f6c2a9e-8d1b-4e7a-9c55-1b2d4e6f8a10",
      "teamId": "9e4b2d7a-6c1f-4a58-b3e0-7d2a5c9f1b68",
      "provider": "highlightly_nba",
      "externalTeamId": "154",
      "teamName": "New York Knicks",
      "side": "away",
      "points": 105,
      "stats": {
        "points": 105,
        "rebounds": 41,
        "reboundsOffense": 9,
        "reboundsDefense": 32,
        "assists": 22,
        "steals": 7,
        "blocks": 3,
        "turnovers": 14,
        "personalFouls": 20,
        "fgMade": 38,
        "fgAttempts": 86,
        "threePtMade": 12,
        "threePtAttempts": 35,
        "ftMade": 17,
        "ftAttempts": 21
      },
      "createdAt": "2026-10-22T02:41:17.605Z"
    },
    {
      "id": "a3f9c1e7-5b2d-4c86-9e0a-7d4b1f3c6e25",
      "eventId": "3f6c2a9e-8d1b-4e7a-9c55-1b2d4e6f8a10",
      "teamId": "c1a9f6e2-4b7d-4e30-9a85-2f6d1b3c7e94",
      "provider": "highlightly_nba",
      "externalTeamId": "161",
      "teamName": "Boston Celtics",
      "side": "home",
      "points": 112,
      "stats": {
        "points": 112,
        "rebounds": 46,
        "reboundsOffense": 10,
        "reboundsDefense": 36,
        "assists": 27,
        "steals": 8,
        "blocks": 5,
        "turnovers": 12,
        "personalFouls": 18,
        "fgMade": 41,
        "fgAttempts": 88,
        "threePtMade": 16,
        "threePtAttempts": 42,
        "ftMade": 14,
        "ftAttempts": 17
      },
      "createdAt": "2026-10-22T02:41:17.605Z"
    }
  ],
  "playerStats": [
    {
      "id": "f4c8a2e6-1d9b-4f53-8a7e-2b6d0c4e8f13",
      "eventId": "3f6c2a9e-8d1b-4e7a-9c55-1b2d4e6f8a10",
      "provider": "highlightly_nba",
      "externalTeamId": "161",
      "teamName": "Boston Celtics",
      "externalPlayerId": "58712",
      "playerName": "Jayson Tatum",
      "playerImage": null,
      "groupName": "All",
      "stats": {
        "minutes": 37,
        "points": 29,
        "rebounds": 9,
        "reboundsOffense": 1,
        "reboundsDefense": 8,
        "assists": 6,
        "steals": 1,
        "blocks": 1,
        "turnovers": 3,
        "personalFouls": 2,
        "fgMade": 10,
        "fgAttempts": 21,
        "threePtMade": 4,
        "threePtAttempts": 10,
        "ftMade": 5,
        "ftAttempts": 6
      },
      "createdAt": "2026-10-22T02:41:17.605Z"
    }
  ]
}

Errors

  • 401Valid X-API-Key required
  • 429Monthly API quota exceeded

One player in an event

GEThttps://api.parlayledger.com/stats/events/:eventId/players/:externalPlayerId

One player's rows for an event, one per stat group.

  • Auth X-API-Key header
  • Quota 1 call per request

Path parameters

  • eventIdstring (UUID)required

    ParlayLedger event id, from GET /events or GET /stats/events.

  • externalPlayerIdstringrequired

    The externalPlayerId from the player stats rows.

Query parameters

  • groupNamestringoptional

    Only this stat group.

Request

curl "https://api.parlayledger.com/stats/events/3f6c2a9e-8d1b-4e7a-9c55-1b2d4e6f8a10/players/58712" \
  -H "X-API-Key: $PARLAYLEDGER_API_KEY"

Response 200 application/json

200 OK
[
  {
    "id": "f4c8a2e6-1d9b-4f53-8a7e-2b6d0c4e8f13",
    "eventId": "3f6c2a9e-8d1b-4e7a-9c55-1b2d4e6f8a10",
    "provider": "highlightly_nba",
    "externalTeamId": "161",
    "teamName": "Boston Celtics",
    "externalPlayerId": "58712",
    "playerName": "Jayson Tatum",
    "playerImage": null,
    "groupName": "All",
    "stats": {
      "minutes": 37,
      "points": 29,
      "rebounds": 9,
      "reboundsOffense": 1,
      "reboundsDefense": 8,
      "assists": 6,
      "steals": 1,
      "blocks": 1,
      "turnovers": 3,
      "personalFouls": 2,
      "fgMade": 10,
      "fgAttempts": 21,
      "threePtMade": 4,
      "threePtAttempts": 10,
      "ftMade": 5,
      "ftAttempts": 6
    },
    "createdAt": "2026-10-22T02:41:17.605Z"
  }
]

Errors

  • 401Valid X-API-Key required
  • 429Monthly API quota exceeded