# GET /v2/teams/{id}/goal-distribution

Group: Teams

When in the match a team scores and concedes over one league season: goals per 15-minute band, over all its matches, at home and away (football).

Note: Three entries — overall, home, away — each with six bands (1–15 … 76–90; added time counts in its band). An empty list where the source has none.

## Parameters

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `id` | path | yes | our numeric id (positive integer) |
| `league` | query | yes | a league id (e.g. the team’s fixtures’ league) |
| `season` | query | yes | a season id from /v2/leagues/{id}/seasons |

## Response

- `data`: `GoalDistribution[]`
- `meta`: league, season, count
- Objects: GoalDistribution (https://sportsapi.app/markdown/en/reference.md#goaldistribution)

## Errors

- 403 history_not_in_plan — the season ended before your plan’s history
- 404 not_found — season is not one of this league’s seasons

Plus the common errors (https://sportsapi.app/markdown/en/docs.md#errors).

## Request

cURL:

```bash
curl -H "Authorization: Bearer sk_live_…" \
    "https://api.sportsapi.app/v2/teams/{id}/goal-distribution?league=…&season=…"
```

TypeScript:

```ts
const { data, meta } = await client.teams.goalDistribution(id, { league, season });
```

Python:

```python
res = client.teams.goal_distribution(id, league=league, season=season)
```

Go:

```go
res, err := client.Teams.GoalDistribution(ctx, id, &sportsapi.TeamsGoalDistributionParams{League: league, Season: season})
```

CLI:

```bash
$ sportsapi teams goal-distribution <id> --league <league> --season <season>
```

## Example response

```json
{ "data": [ { "scope": "overall", "fixtureCount": 9, "scored": 12, "conceded": 15,
      "bands": [ { "fromMinute": 1, "toMinute": 15, "scored": 3, "conceded": 2 }, { "fromMinute": 16, "toMinute": 30, "scored": 0, "conceded": 0 }, … ] },
    { "scope": "home", … }, { "scope": "away", … } ],
  "meta": { "league": 200001, "season": 200386, "count": 3 } }
```

---

Base URL: https://api.sportsapi.app. Send your API key as `Authorization: Bearer <key>` on every /v2 request; keys are created in the dashboard (https://sportsapi.app/dashboard).
HTML: https://sportsapi.app/docs/teams/goal-distribution · All docs: https://sportsapi.app/markdown/en/docs.md
