> ## 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 Logs

> Get game-by-game statistics for a specific player

<Warning>
  **V1 Legacy Endpoint** — This is a V1 API endpoint. For new integrations, we recommend using the [Basketball V2 API](/api-reference/basketball-v2/overview) which provides richer data and more endpoints.
</Warning>

## Overview

Returns game-by-game statistics (game logs) for a specific player, useful for tracking player performance trends.

## Query Parameters

<ParamField query="athleteId" type="integer" required>
  Player ID
</ParamField>

<ParamField query="numOfGames" type="integer" default="10">
  Number of games to return
</ParamField>

## Code Examples

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

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

  // Calculate averages over last 10 games
  const avgPoints = games.reduce((sum, g) => sum + g.stats.points, 0) / games.length;
  ```

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

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

## Response Structure

<ResponseField name="games" type="array">
  Array of game log entries

  <Expandable title="Game Log">
    <ResponseField name="gameId" type="integer">
      Game ID
    </ResponseField>

    <ResponseField name="date" type="string">
      Game date
    </ResponseField>

    <ResponseField name="opponent" type="object">
      Opponent team (id, name)
    </ResponseField>

    <ResponseField name="stats" type="object">
      Game statistics

      <Expandable title="Stats">
        <ResponseField name="points" type="integer">
          Points scored
        </ResponseField>

        <ResponseField name="rebounds" type="integer">
          Total rebounds
        </ResponseField>

        <ResponseField name="assists" type="integer">
          Assists
        </ResponseField>

        <ResponseField name="steals" type="integer">
          Steals
        </ResponseField>

        <ResponseField name="blocks" type="integer">
          Blocks
        </ResponseField>

        <ResponseField name="minutes" type="integer">
          Minutes played
        </ResponseField>

        <ResponseField name="fieldGoalsMade" type="integer">
          Field goals made
        </ResponseField>

        <ResponseField name="fieldGoalsAttempted" type="integer">
          Field goals attempted
        </ResponseField>

        <ResponseField name="threePointersMade" type="integer">
          Three-pointers made
        </ResponseField>

        <ResponseField name="threePointersAttempted" type="integer">
          Three-pointers attempted
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>

## Use Case: Player Prop Research

<Tip>
  Use game logs to analyze player trends for betting prop research. Look for patterns in scoring against specific opponents or recent form changes.
</Tip>

```javascript theme={null}
// Analyze recent performance vs prop line
const propLine = 25.5;
const games = await getPlayerGames(playerId);

const overHits = games.filter(g => g.stats.points > propLine).length;
const hitRate = (overHits / games.length) * 100;

console.log(`Over ${propLine} points hit rate: ${hitRate}%`);
```


## OpenAPI

````yaml openapi-basketball GET /athletes/games
openapi: 3.1.0
info:
  title: SportsAPI Pro - Basketball API
  description: >-
    Professional basketball data API providing live scores, standings, player
    statistics, betting odds, and more for NBA, EuroLeague, and 50+ leagues
    worldwide.
  version: 1.0.0
  contact:
    name: SportsAPI Pro Support
    email: support@sportsapipro.com
servers:
  - url: https://v1.basketball.sportsapipro.com
    description: Production API Server
security:
  - ApiKeyAuth: []
tags:
  - name: Games
    description: Live scores, fixtures, and game data
  - name: Competitions
    description: Leagues and tournaments
  - name: Standings
    description: League standings 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 Logs
      description: Get game-by-game statistics for a specific player
      operationId: getAthleteGames
      parameters:
        - name: athleteId
          in: query
          required: true
          description: Player ID
          schema:
            type: integer
            example: 12345
        - name: numOfGames
          in: query
          description: Number of games to return
          schema:
            type: integer
            default: 10
            example: 10
      responses:
        '200':
          description: Player game logs retrieved successfully
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: Your SportsAPI Pro API key

````