STAT-API

Fetch one NBA team by id

Every table with a single-column primary key exposes a get(id) that returns exactly one row. Here we list one team to get a real id, then fetch it.

  1. 1. List one team to borrow an id

    A one-row page is enough to get a valid primary key to fetch by.

    curl -sS --compressed \
      -H 'Authorization: Bearer YOUR_API_KEY' \
      'https://api.stat-api.com/api/v1/nba/teams?limit=1'
  2. 2. Fetch that team by id

    get(id) returns the row directly — no envelope, no pagination.

    curl -sS --compressed \
      -H 'Authorization: Bearer YOUR_API_KEY' \
      'https://api.stat-api.com/api/v1/nba/teams/1'
  3. 3. Inspect the row

    console.log(JSON.stringify(team, null, 2))