> For the complete documentation index, see [llms.txt](https://docs.sportradar.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sportradar.com/golf-media/websockets/play-by-play-shot-commentary.md).

# Play By Play Shot Commentary

This endpoint returns play by play (PBP) shot commentary to be used for significant stroke play and match play events.

### Endpoint URL

Legacy - `wss://dde-streams.data.imgarena.com/golf/tournaments/{tournamentId}/pbpcommentary/holes/{holeno}` (Decommissioning on 30th Sept 2026)

**NEW** - `wss://dde-streams.data.srarena.io/golf/tournaments/{tournamentId}/pbpcommentary/holes/{holeno}`

The authentication token provided will be required to make a connection to this websocket endpoint.

Sample Endpoint URL for The American Express 2025 for hole 2:

`wss://dde-streams.data.imgarena.com/golf/tournaments/1092/pbpcommentary/holes/2`

**Process for connecting to the web socket endpoints**

* Connect to SSL websocket address
* Send JSON packet containing API token
* Receive response indicating that connection is authorised (or a response indicating why the connection cannot be made)
* Receive heartbeat packets every 10 seconds to verify the connection is live
* Receive data packets

Once you have the API token, any further data that you send over the connection will be ignored.

### Request Parameters

This endpoint currently takes no request parameters currently.

### Response Model

| Field Name                | Type      | Description                                                                                                                                          |
| ------------------------- | --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
| distanceToPinYards        | float     | Distance in yards from the player's current ball position to the pin of the hole                                                                     |
| groupNo                   | integer   | The group number of the player, shared with who they are playing their round with                                                                    |
| holeNo                    | integer   | The current Hole Number the event took place on. Holes **1 - 18**                                                                                    |
| latestStrokeNo            | int       | The *n*th shot/stroke on the current hole.                                                                                                           |
| pbpCommentary             | string    | Generated text commentary relative to the shot in question and the surrounding situation of the player's shot                                        |
| playerId                  | integer   | The internal ID of the Player of the current event                                                                                                   |
| tournamentId              | integer   | The unique Tournament ID of the current event                                                                                                        |
| roundNumber               | integer   | The current Round Number the event took place on. Usually would be 1 to 4                                                                            |
| playerName                | string    | The first name and surname of the player                                                                                                             |
| prevDistanceToPinYards    | float     | <p>Distance in yards from the player's previous ball position from their previous shot to the pin of the hole.<br>This field can be optional</p>     |
| teamNumber                | integer   | The player's Team Number for the current Tournament format                                                                                           |
| shotFromLocation          | string    | The description of the location on the hole from where the player took their most recent shot, e.g. rough, fairway, bunker, tee                      |
| shotToLocation            | string    | The description of the location on the hole from where the player's ball has landed after their most recent shot, e.g. rough, fairway, bunker, green |
| latestPlayed              | Binary    | <p>1 = This player within the group was the last to play.<br><br>0 = This player within the group was not the last to play.</p>                      |
| nextToPlay                | Binary    | <p>1 = This player within the group is next to play.<br><br>0 = This player within the group is not the next to play.</p>                            |
| timestamp                 | timestamp | The time stamp of this action.                                                                                                                       |
| tournamentScoreToPar      | string    | The overall player score to par for that tournament. This can be "E" if there are no scoreToPar                                                      |
| groupHoleStartedTimestamp | timestamp | The timestamp of the group on the hole                                                                                                               |
| currentHoleOrder          | integer   | The current hole order                                                                                                                               |
| externalPlayerId          | integer   | The external player id. This field can be optional                                                                                                   |

### Sample Response for Stroke Play

```
{
    "tournamentId": 3369
    "holeNo": 6,
    "seqNum": 799,
    "timestamp": "2025-12-04T15:41:38.000Z",
    "pbpComments": [
        {
            "currentHoleOrder": 1,
            "distanceToPinYards": 138.33836216373763,
            "groupHoleStartedTimestamp": "2025-12-04T15:38:52.000Z",
            "groupNo": 21,
            "holeNo": 6,
            "latestPlayed": 1,
            "latestStrokeNo": 1,
            "nextToPlay": 0,
            "pbpCommentary": "Shot 1: 271yds to Fairway, 138yds to pin",
            "playerId": 27,
            "playerName": "Lee Westwood",
            "prevDistanceToPinYards": 418.0,
            "roundNumber": 4,
            "shotFromLocation": "Tee Box",
            "shotToLocation": "Fairway",
            "teamNumber": 11,
            "timestamp": "2025-12-04T15:41:38.000Z",
            "tournamentId": 3369,
            "tournamentScoreToPar": "-5"
        },
        {
            "currentHoleOrder": 1,
            "distanceToPinYards": 144.99704093028825,
            "groupHoleStartedTimestamp": "2025-12-04T15:38:52.000Z",
            "groupNo": 21,
            "holeNo": 6,
            "latestPlayed": 0,
            "latestStrokeNo": 1,
            "nextToPlay": 0,
            "pbpCommentary": "Shot 1: 264yds to Fairway, 145yds to pin",
            "playerId": 3,
            "playerName": "Matt Wallace",
            "prevDistanceToPinYards": 418.0,
            "roundNumber": 4,
            "shotFromLocation": "Tee Box",
            "shotToLocation": "Fairway",
            "teamNumber": 6,
            "timestamp": "2025-12-04T15:40:31.000Z",
            "tournamentId": 3369,
            "tournamentScoreToPar": "-4"
        }
    ]
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.sportradar.com/golf-media/websockets/play-by-play-shot-commentary.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
