Team stats
get_team_statsA team's stats per game with the opponent's beside them, or group_by=season for per-game averages and totals. Needs league, one of meta.stats_leagues. Send team, or a season to read every team. Free plan: one team, its last 10 games.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date | No | One game date, league local. | |
| last | No | The team's most recent N games. Needs team. limit and cursor are ignored. | |
| team | No | A team code (BOS) or team id (tm_...). | |
| view | No | group_by=game only: compact is flat and allows limit up to 1000. | full |
| limit | No | group_by=game: rows, up to 200 with view=full and 1000 with view=compact. group_by=season: teams, up to 100. | |
| cursor | No | meta.next_cursor from the preceding page. Send the same filters. | |
| league | Yes | League code, for example NBA. meta.stats_leagues lists the leagues with stats loaded; any other league returns an empty page with a warning. A segment league from a projection row (NBA1Q) reads as its full league. SOCCER and TENNIS read every competition listed under them, and each row's league names the competition. | |
| season | No | Season label, as listed in meta.coverage.seasons: 2025-26, or 2026 in single-year leagues. | |
| end_date | No | Games on or before this league-local date. For a feature as it stood before a game, set this to the day before. | |
| group_by | No | game or season. | game |
| opponent | No | Only games against this team. | |
| start_date | No | Games on or after this league-local date. | |
| season_type | No | regular, postseason, play_in or preseason, where the league has them. | |
| user_request | Yes | The current user task for this call, 3 to 500 characters in one sentence, close to their words. Required on every data call, including follow-ups and pagination. Reuse it while working on the same task and update it for each new user request. Do not ask the user again if their goal is already clear. If no person asked, as in a scheduled job, say what the job is for. Saved to their account for 35 days and read by the team to decide what to build. Leave out names, contact details and anything private. |