> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sportsapipro.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Player Game History

> Get game-by-game history for a hockey player

## Overview

Returns the game-by-game history for a specific hockey player, including scores, opponent, and performance stats.

## Code Examples

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET "https://api.sportsapipro.com/v1/hockey/athletes/games?athleteId=874&numOfGames=10" \
    -H "x-api-key: YOUR_API_KEY"
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    'https://api.sportsapipro.com/v1/hockey/athletes/games?athleteId=874&numOfGames=10',
    { headers: { 'x-api-key': 'YOUR_API_KEY' } }
  );
  const { games } = await response.json();

  games.forEach(game => {
    console.log(`vs ${game.homeCompetitor.name}: ${game.score}`);
  });
  ```

  ```python Python theme={null}
  import requests

  response = requests.get(
      'https://api.sportsapipro.com/v1/hockey/athletes/games',
      params={'athleteId': 874, 'numOfGames': 10},
      headers={'x-api-key': 'YOUR_API_KEY'}
  )
  ```
</CodeGroup>

<Tip>
  Combine with `/athletes/top` to get player IDs, then fetch their game history.
</Tip>


## OpenAPI

````yaml openapi-hockey GET /athletes/games
openapi: 3.1.0
info:
  title: SportsAPI Pro - Hockey API
  description: >-
    Professional hockey data API providing live scores, team statistics, player
    stats, standings, betting odds, and more for NHL, KHL, and international
    hockey leagues worldwide.
  version: 1.0.0
  contact:
    name: SportsAPI Pro Support
    email: support@sportsapipro.com
servers:
  - url: https://api.sportsapipro.com/v1/hockey
    description: Path-based front door (recommended)
  - url: https://v1.hockey.sportsapipro.com
    description: Classic per-sport vanity host
security:
  - ApiKeyAuth: []
tags:
  - name: Games
    description: Live scores, fixtures, and match data
  - name: Competitions
    description: Leagues and tournaments
  - name: Standings
    description: League tables and rankings
  - name: Athletes
    description: Player statistics and data
  - name: Betting
    description: Betting lines, props, and predictions
  - name: Search
    description: Search entities
  - name: Account
    description: Account status and usage
paths:
  /athletes/games:
    get:
      tags:
        - Athletes
      summary: Player Game History
      description: Get game-by-game history for a specific player
      operationId: getAthleteGames
      parameters:
        - name: athleteId
          in: query
          required: true
          description: Player ID
          schema:
            type: integer
            example: 874
        - name: numOfGames
          in: query
          description: Number of games to return
          schema:
            type: integer
            default: 10
            example: 10
      responses:
        '200':
          description: Player game history retrieved successfully
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: Your SportsAPI Pro API key

````