> For the complete documentation index, see [llms.txt](https://rock-odds.gitbook.io/rock-odds-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://rock-odds.gitbook.io/rock-odds-docs/endpoints/games.md).

# List games

Returns current pregame and live games, including their available markets and open lines.

```http
GET /games
```

## Example request

```bash
curl --get \
  --url "https://rockodds.live/api/v2/games" \
  --header "X-API-Key: YOUR_API_KEY" \
  --data-urlencode "sport=NBA" \
  --data-urlencode "live=true" \
  --data-urlencode "market=spread" \
  --data-urlencode "market=total"
```

## Query parameters

| Parameter | Type    | Required | Description                                                                              |
| --------- | ------- | -------- | ---------------------------------------------------------------------------------------- |
| `live`    | boolean | No       | `true` for live games or `false` for non-live games. Omit to return both.                |
| `sport`   | string  | No       | Filter by `NFL`, `NBA`, `NCAA`, `NHL`, `MLB`, or `SOCCER`. Matching is case-insensitive. |
| `period`  | string  | No       | Return games containing at least one market for the requested period.                    |
| `market`  | string  | No       | Include only the requested market type. Repeat the parameter to include multiple types.  |

See [filters and coverage](/rock-odds-docs/filters-and-coverage.md) for period and market values.

## Example response

```json
{
  "count": 1,
  "games": [
    {
      "game_id": "a1b2c3d4-e5f6-47a8-9012-3456789abcde",
      "sport": "NBA",
      "home_team": "Los Angeles Lakers",
      "away_team": "Boston Celtics",
      "start_time": "2026-08-28T19:30:00-04:00",
      "live": true,
      "markets": {
        "game:spread": {
          "market_type": "spread",
          "period": "game",
          "side": null,
          "label": null,
          "limit": 500,
          "lines": [
            {
              "selections": [
                {"name": "home", "odds": "-110", "line": "-3.5"},
                {"name": "away", "odds": "-110", "line": "3.5"}
              ],
              "locked": false,
              "is_mainline": true,
              "updated_at": "2026-08-28T23:25:10+00:00"
            }
          ]
        }
      }
    }
  ]
}
```

## Behavior

* `count` is the number of games in the `games` array.
* An empty result is returned as `{"count":0,"games":[]}`.
* Locked lines are excluded from REST list responses.
* Non-live games that are sufficiently past their scheduled start time are omitted.
* Filters narrow the response; they do not change the response shape.

## Rate limit

This endpoint allows up to 200 requests per minute per API key. A request over the limit returns `429 Too Many Requests`.
