# Get a player's pitches in a game (v1)

Returns every pitch a player threw (`kind=pitching`) or faced (`kind=hitting`) in a baseball game. None returns `data: null`.

- Platform: Sofascore
- Request: `GET https://api.toolzerhub.com/v1/sofascore/event/player/pitches`
- Auth: `x-api-key` header
- Cost: 1 credit per successful request. Failed requests are not billed.
- Page: https://docs.toolzerhub.com/reference/sofascore/match-detail/get-baseball-player-pitches

| Parameter | In | Required | Type | Description |
| --- | --- | --- | --- | --- |
| `id` | query | yes | integer | Event id: the id of any event in a list, such as Get Sports Live Events. |
| `player_id` | query | yes | integer | Player id, from a lineup, a squad or Search Sports. |
| `kind` | query | no | enum: pitching, hitting | pitching for pitches thrown, hitting for pitches faced. Default: pitching. |

## Example request

```bash
curl "https://api.toolzerhub.com/v1/sofascore/event/player/pitches?id=<id>&player_id=<player_id>" \
  -H "x-api-key: $TOOLZERHUB_API_KEY"
```

Success responses are wrapped as `{ "data": ... }`. Errors return `{ "error": { "code", "status", "message", "retryable", "details" } }`. See https://docs.toolzerhub.com/docs/responses-and-errors.
