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

Group: Teams

Football: shows at which stage of a match a team scores and concedes across one league season, counting goals in 15-minute bands for all matches, home matches and away matches.

Plans: Every plan, Free included.

Note: The list has three entries (overall, home, away), each split into six bands from 1–15 to 76–90; goals in added time are counted in the band they extend. Empty if the source has no distribution.

## Parameters

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `id` | path | yes | DataSportsAPI team id, a positive integer |
| `league` | query | yes | league id — for example, the league of one of the team’s fixtures |
| `season` | query | yes | season id, as listed by /v2/leagues/{id}/seasons |

## Response

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

## Errors

- 403 history_not_in_plan — the season finished before your plan’s history window begins
- 404 not_found — the season id does not belong to this league

Plus the common errors (https://datasportsapi.com/markdown/docs.md#errors).

## Request

cURL:

```bash
curl -H "Authorization: Bearer sk_live_…" \
    "https://api.datasportsapi.com/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, &datasportsapi.TeamsGoalDistributionParams{League: league, Season: season})
```

CLI:

```bash
$ dsa 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.datasportsapi.com. Authenticate each /v2 call with the header `Authorization: Bearer <key>` (secret keys begin with `sk_live_`).
HTML: https://datasportsapi.com/docs/teams/goal-distribution/ · All docs: https://datasportsapi.com/markdown/docs.md · Data reference: https://datasportsapi.com/markdown/reference.md
